All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pet.store.schema.Error Maven / Gradle / Ivy

The newest version!
package pet.store.schema;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.davidmoten.guavamini.Maps;

import jakarta.annotation.Generated;

import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
import java.util.Objects;

import org.davidmoten.oa3.codegen.runtime.Preconditions;
import org.davidmoten.oa3.codegen.util.Util;

import pet.store.Globals;

@JsonInclude(Include.NON_ABSENT)
@JsonAutoDetect(
        fieldVisibility = JsonAutoDetect.Visibility.ANY,
        creatorVisibility = JsonAutoDetect.Visibility.ANY,
        setterVisibility = JsonAutoDetect.Visibility.ANY)
@Generated(value = "com.github.davidmoten:openapi-codegen-runtime:0.1.22")
public final class Error {

    @JsonProperty("message")
    private final String message;

    @JsonCreator
    public Error(
            @JsonProperty("message") String message) {
        if (Globals.config().validateInConstructor().test(Error.class)) {
            Preconditions.checkNotNull(message, "message");
        }
        this.message = message;
    }

    public String message() {
        return message;
    }

    Map _internal_properties() {
        return Maps
                .put("message", (Object) message)
                .build();
    }

    public static Error message(String message) {
        return new Error(message);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Error other = (Error) o;
        return 
            Objects.deepEquals(this.message, other.message);
    }

    @Override
    public int hashCode() {
        return Objects.hash(message);
    }

    @Override
    public String toString() {
        return Util.toString(Error.class, "message", message);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy