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

pet.store.schema.PetId 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.util.Util;

@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 PetId {

    @JsonProperty("id")
    private final long id;

    @JsonCreator
    public PetId(
            @JsonProperty("id") long id) {
        this.id = id;
    }

    public long id() {
        return id;
    }

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

    public static PetId id(long id) {
        return new PetId(id);
    }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy