/* 
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

package dev.plexapi.sdk.models.operations;


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;


public class GetMediaMetaDataCountry {

    /**
     * The unique country identifier.
     */
    @JsonProperty("id")
    private int id;

    /**
     * The filter string for the country.
     */
    @JsonProperty("filter")
    private String filter;

    /**
     * The country name.
     */
    @JsonProperty("tag")
    private String tag;

    @JsonCreator
    public GetMediaMetaDataCountry(
            @JsonProperty("id") int id,
            @JsonProperty("filter") String filter,
            @JsonProperty("tag") String tag) {
        Utils.checkNotNull(id, "id");
        Utils.checkNotNull(filter, "filter");
        Utils.checkNotNull(tag, "tag");
        this.id = id;
        this.filter = filter;
        this.tag = tag;
    }

    /**
     * The unique country identifier.
     */
    @JsonIgnore
    public int id() {
        return id;
    }

    /**
     * The filter string for the country.
     */
    @JsonIgnore
    public String filter() {
        return filter;
    }

    /**
     * The country name.
     */
    @JsonIgnore
    public String tag() {
        return tag;
    }

    public final static Builder builder() {
        return new Builder();
    }

    /**
     * The unique country identifier.
     */
    public GetMediaMetaDataCountry withId(int id) {
        Utils.checkNotNull(id, "id");
        this.id = id;
        return this;
    }

    /**
     * The filter string for the country.
     */
    public GetMediaMetaDataCountry withFilter(String filter) {
        Utils.checkNotNull(filter, "filter");
        this.filter = filter;
        return this;
    }

    /**
     * The country name.
     */
    public GetMediaMetaDataCountry withTag(String tag) {
        Utils.checkNotNull(tag, "tag");
        this.tag = tag;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetMediaMetaDataCountry other = (GetMediaMetaDataCountry) o;
        return 
            Objects.deepEquals(this.id, other.id) &&
            Objects.deepEquals(this.filter, other.filter) &&
            Objects.deepEquals(this.tag, other.tag);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            id,
            filter,
            tag);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetMediaMetaDataCountry.class,
                "id", id,
                "filter", filter,
                "tag", tag);
    }
    
    public final static class Builder {
 
        private Integer id;
 
        private String filter;
 
        private String tag;  
        
        private Builder() {
          // force use of static builder() method
        }

        /**
         * The unique country identifier.
         */
        public Builder id(int id) {
            Utils.checkNotNull(id, "id");
            this.id = id;
            return this;
        }

        /**
         * The filter string for the country.
         */
        public Builder filter(String filter) {
            Utils.checkNotNull(filter, "filter");
            this.filter = filter;
            return this;
        }

        /**
         * The country name.
         */
        public Builder tag(String tag) {
            Utils.checkNotNull(tag, "tag");
            this.tag = tag;
            return this;
        }
        
        public GetMediaMetaDataCountry build() {
            return new GetMediaMetaDataCountry(
                id,
                filter,
                tag);
        }
    }
}

