/* 
 * 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.Override;
import java.lang.String;
import java.util.Objects;


public class GetRecentlyAddedFilter {

    @JsonProperty("filter")
    private String filter;

    @JsonProperty("filterType")
    private String filterType;

    @JsonProperty("key")
    private String key;

    @JsonProperty("title")
    private String title;

    @JsonProperty("type")
    private String type;

    @JsonCreator
    public GetRecentlyAddedFilter(
            @JsonProperty("filter") String filter,
            @JsonProperty("filterType") String filterType,
            @JsonProperty("key") String key,
            @JsonProperty("title") String title,
            @JsonProperty("type") String type) {
        Utils.checkNotNull(filter, "filter");
        Utils.checkNotNull(filterType, "filterType");
        Utils.checkNotNull(key, "key");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(type, "type");
        this.filter = filter;
        this.filterType = filterType;
        this.key = key;
        this.title = title;
        this.type = type;
    }

    @JsonIgnore
    public String filter() {
        return filter;
    }

    @JsonIgnore
    public String filterType() {
        return filterType;
    }

    @JsonIgnore
    public String key() {
        return key;
    }

    @JsonIgnore
    public String title() {
        return title;
    }

    @JsonIgnore
    public String type() {
        return type;
    }

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

    public GetRecentlyAddedFilter withFilter(String filter) {
        Utils.checkNotNull(filter, "filter");
        this.filter = filter;
        return this;
    }

    public GetRecentlyAddedFilter withFilterType(String filterType) {
        Utils.checkNotNull(filterType, "filterType");
        this.filterType = filterType;
        return this;
    }

    public GetRecentlyAddedFilter withKey(String key) {
        Utils.checkNotNull(key, "key");
        this.key = key;
        return this;
    }

    public GetRecentlyAddedFilter withTitle(String title) {
        Utils.checkNotNull(title, "title");
        this.title = title;
        return this;
    }

    public GetRecentlyAddedFilter withType(String type) {
        Utils.checkNotNull(type, "type");
        this.type = type;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetRecentlyAddedFilter other = (GetRecentlyAddedFilter) o;
        return 
            Objects.deepEquals(this.filter, other.filter) &&
            Objects.deepEquals(this.filterType, other.filterType) &&
            Objects.deepEquals(this.key, other.key) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.type, other.type);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            filter,
            filterType,
            key,
            title,
            type);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetRecentlyAddedFilter.class,
                "filter", filter,
                "filterType", filterType,
                "key", key,
                "title", title,
                "type", type);
    }
    
    public final static class Builder {
 
        private String filter;
 
        private String filterType;
 
        private String key;
 
        private String title;
 
        private String type;  
        
        private Builder() {
          // force use of static builder() method
        }

        public Builder filter(String filter) {
            Utils.checkNotNull(filter, "filter");
            this.filter = filter;
            return this;
        }

        public Builder filterType(String filterType) {
            Utils.checkNotNull(filterType, "filterType");
            this.filterType = filterType;
            return this;
        }

        public Builder key(String key) {
            Utils.checkNotNull(key, "key");
            this.key = key;
            return this;
        }

        public Builder title(String title) {
            Utils.checkNotNull(title, "title");
            this.title = title;
            return this;
        }

        public Builder type(String type) {
            Utils.checkNotNull(type, "type");
            this.type = type;
            return this;
        }
        
        public GetRecentlyAddedFilter build() {
            return new GetRecentlyAddedFilter(
                filter,
                filterType,
                key,
                title,
                type);
        }
    }
}

