/* 
 * 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 ResponseBody {

    @JsonProperty("identifier")
    private String identifier;

    @JsonProperty("baseURL")
    private String baseURL;

    @JsonProperty("title")
    private String title;

    @JsonProperty("linkURL")
    private String linkURL;

    @JsonProperty("provides")
    private String provides;

    /**
     * The plex authtoken used to identify with
     */
    @JsonProperty("token")
    private String token;

    @JsonCreator
    public ResponseBody(
            @JsonProperty("identifier") String identifier,
            @JsonProperty("baseURL") String baseURL,
            @JsonProperty("title") String title,
            @JsonProperty("linkURL") String linkURL,
            @JsonProperty("provides") String provides,
            @JsonProperty("token") String token) {
        Utils.checkNotNull(identifier, "identifier");
        Utils.checkNotNull(baseURL, "baseURL");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(linkURL, "linkURL");
        Utils.checkNotNull(provides, "provides");
        Utils.checkNotNull(token, "token");
        this.identifier = identifier;
        this.baseURL = baseURL;
        this.title = title;
        this.linkURL = linkURL;
        this.provides = provides;
        this.token = token;
    }

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

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

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

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

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

    /**
     * The plex authtoken used to identify with
     */
    @JsonIgnore
    public String token() {
        return token;
    }

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

    public ResponseBody withIdentifier(String identifier) {
        Utils.checkNotNull(identifier, "identifier");
        this.identifier = identifier;
        return this;
    }

    public ResponseBody withBaseURL(String baseURL) {
        Utils.checkNotNull(baseURL, "baseURL");
        this.baseURL = baseURL;
        return this;
    }

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

    public ResponseBody withLinkURL(String linkURL) {
        Utils.checkNotNull(linkURL, "linkURL");
        this.linkURL = linkURL;
        return this;
    }

    public ResponseBody withProvides(String provides) {
        Utils.checkNotNull(provides, "provides");
        this.provides = provides;
        return this;
    }

    /**
     * The plex authtoken used to identify with
     */
    public ResponseBody withToken(String token) {
        Utils.checkNotNull(token, "token");
        this.token = token;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ResponseBody other = (ResponseBody) o;
        return 
            Objects.deepEquals(this.identifier, other.identifier) &&
            Objects.deepEquals(this.baseURL, other.baseURL) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.linkURL, other.linkURL) &&
            Objects.deepEquals(this.provides, other.provides) &&
            Objects.deepEquals(this.token, other.token);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            identifier,
            baseURL,
            title,
            linkURL,
            provides,
            token);
    }
    
    @Override
    public String toString() {
        return Utils.toString(ResponseBody.class,
                "identifier", identifier,
                "baseURL", baseURL,
                "title", title,
                "linkURL", linkURL,
                "provides", provides,
                "token", token);
    }
    
    public final static class Builder {
 
        private String identifier;
 
        private String baseURL;
 
        private String title;
 
        private String linkURL;
 
        private String provides;
 
        private String token;  
        
        private Builder() {
          // force use of static builder() method
        }

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

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

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

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

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

        /**
         * The plex authtoken used to identify with
         */
        public Builder token(String token) {
            Utils.checkNotNull(token, "token");
            this.token = token;
            return this;
        }
        
        public ResponseBody build() {
            return new ResponseBody(
                identifier,
                baseURL,
                title,
                linkURL,
                provides,
                token);
        }
    }
}

