/* 
 * 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.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Boolean;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.List;
import java.util.Objects;
import java.util.Optional;


public class GetMediaProvidersDirectory {

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("hubKey")
    private Optional<String> hubKey;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("title")
    private Optional<String> title;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("agent")
    private Optional<String> agent;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("language")
    private Optional<String> language;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("refreshing")
    private Optional<Boolean> refreshing;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("scanner")
    private Optional<String> scanner;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("uuid")
    private Optional<String> uuid;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("id")
    private Optional<String> id;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("key")
    private Optional<String> key;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("type")
    private Optional<String> type;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("subtype")
    private Optional<String> subtype;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("updatedAt")
    private Optional<Long> updatedAt;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("scannedAt")
    private Optional<Long> scannedAt;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Pivot")
    private Optional<? extends List<Pivot>> pivot;

    @JsonCreator
    public GetMediaProvidersDirectory(
            @JsonProperty("hubKey") Optional<String> hubKey,
            @JsonProperty("title") Optional<String> title,
            @JsonProperty("agent") Optional<String> agent,
            @JsonProperty("language") Optional<String> language,
            @JsonProperty("refreshing") Optional<Boolean> refreshing,
            @JsonProperty("scanner") Optional<String> scanner,
            @JsonProperty("uuid") Optional<String> uuid,
            @JsonProperty("id") Optional<String> id,
            @JsonProperty("key") Optional<String> key,
            @JsonProperty("type") Optional<String> type,
            @JsonProperty("subtype") Optional<String> subtype,
            @JsonProperty("updatedAt") Optional<Long> updatedAt,
            @JsonProperty("scannedAt") Optional<Long> scannedAt,
            @JsonProperty("Pivot") Optional<? extends List<Pivot>> pivot) {
        Utils.checkNotNull(hubKey, "hubKey");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(agent, "agent");
        Utils.checkNotNull(language, "language");
        Utils.checkNotNull(refreshing, "refreshing");
        Utils.checkNotNull(scanner, "scanner");
        Utils.checkNotNull(uuid, "uuid");
        Utils.checkNotNull(id, "id");
        Utils.checkNotNull(key, "key");
        Utils.checkNotNull(type, "type");
        Utils.checkNotNull(subtype, "subtype");
        Utils.checkNotNull(updatedAt, "updatedAt");
        Utils.checkNotNull(scannedAt, "scannedAt");
        Utils.checkNotNull(pivot, "pivot");
        this.hubKey = hubKey;
        this.title = title;
        this.agent = agent;
        this.language = language;
        this.refreshing = refreshing;
        this.scanner = scanner;
        this.uuid = uuid;
        this.id = id;
        this.key = key;
        this.type = type;
        this.subtype = subtype;
        this.updatedAt = updatedAt;
        this.scannedAt = scannedAt;
        this.pivot = pivot;
    }
    
    public GetMediaProvidersDirectory() {
        this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
    }

    @JsonIgnore
    public Optional<String> hubKey() {
        return hubKey;
    }

    @JsonIgnore
    public Optional<String> title() {
        return title;
    }

    @JsonIgnore
    public Optional<String> agent() {
        return agent;
    }

    @JsonIgnore
    public Optional<String> language() {
        return language;
    }

    @JsonIgnore
    public Optional<Boolean> refreshing() {
        return refreshing;
    }

    @JsonIgnore
    public Optional<String> scanner() {
        return scanner;
    }

    @JsonIgnore
    public Optional<String> uuid() {
        return uuid;
    }

    @JsonIgnore
    public Optional<String> id() {
        return id;
    }

    @JsonIgnore
    public Optional<String> key() {
        return key;
    }

    @JsonIgnore
    public Optional<String> type() {
        return type;
    }

    @JsonIgnore
    public Optional<String> subtype() {
        return subtype;
    }

    @JsonIgnore
    public Optional<Long> updatedAt() {
        return updatedAt;
    }

    @JsonIgnore
    public Optional<Long> scannedAt() {
        return scannedAt;
    }

    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<Pivot>> pivot() {
        return (Optional<List<Pivot>>) pivot;
    }

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

    public GetMediaProvidersDirectory withHubKey(String hubKey) {
        Utils.checkNotNull(hubKey, "hubKey");
        this.hubKey = Optional.ofNullable(hubKey);
        return this;
    }

    public GetMediaProvidersDirectory withHubKey(Optional<String> hubKey) {
        Utils.checkNotNull(hubKey, "hubKey");
        this.hubKey = hubKey;
        return this;
    }

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

    public GetMediaProvidersDirectory withTitle(Optional<String> title) {
        Utils.checkNotNull(title, "title");
        this.title = title;
        return this;
    }

    public GetMediaProvidersDirectory withAgent(String agent) {
        Utils.checkNotNull(agent, "agent");
        this.agent = Optional.ofNullable(agent);
        return this;
    }

    public GetMediaProvidersDirectory withAgent(Optional<String> agent) {
        Utils.checkNotNull(agent, "agent");
        this.agent = agent;
        return this;
    }

    public GetMediaProvidersDirectory withLanguage(String language) {
        Utils.checkNotNull(language, "language");
        this.language = Optional.ofNullable(language);
        return this;
    }

    public GetMediaProvidersDirectory withLanguage(Optional<String> language) {
        Utils.checkNotNull(language, "language");
        this.language = language;
        return this;
    }

    public GetMediaProvidersDirectory withRefreshing(boolean refreshing) {
        Utils.checkNotNull(refreshing, "refreshing");
        this.refreshing = Optional.ofNullable(refreshing);
        return this;
    }

    public GetMediaProvidersDirectory withRefreshing(Optional<Boolean> refreshing) {
        Utils.checkNotNull(refreshing, "refreshing");
        this.refreshing = refreshing;
        return this;
    }

    public GetMediaProvidersDirectory withScanner(String scanner) {
        Utils.checkNotNull(scanner, "scanner");
        this.scanner = Optional.ofNullable(scanner);
        return this;
    }

    public GetMediaProvidersDirectory withScanner(Optional<String> scanner) {
        Utils.checkNotNull(scanner, "scanner");
        this.scanner = scanner;
        return this;
    }

    public GetMediaProvidersDirectory withUuid(String uuid) {
        Utils.checkNotNull(uuid, "uuid");
        this.uuid = Optional.ofNullable(uuid);
        return this;
    }

    public GetMediaProvidersDirectory withUuid(Optional<String> uuid) {
        Utils.checkNotNull(uuid, "uuid");
        this.uuid = uuid;
        return this;
    }

    public GetMediaProvidersDirectory withId(String id) {
        Utils.checkNotNull(id, "id");
        this.id = Optional.ofNullable(id);
        return this;
    }

    public GetMediaProvidersDirectory withId(Optional<String> id) {
        Utils.checkNotNull(id, "id");
        this.id = id;
        return this;
    }

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

    public GetMediaProvidersDirectory withKey(Optional<String> key) {
        Utils.checkNotNull(key, "key");
        this.key = key;
        return this;
    }

    public GetMediaProvidersDirectory withType(String type) {
        Utils.checkNotNull(type, "type");
        this.type = Optional.ofNullable(type);
        return this;
    }

    public GetMediaProvidersDirectory withType(Optional<String> type) {
        Utils.checkNotNull(type, "type");
        this.type = type;
        return this;
    }

    public GetMediaProvidersDirectory withSubtype(String subtype) {
        Utils.checkNotNull(subtype, "subtype");
        this.subtype = Optional.ofNullable(subtype);
        return this;
    }

    public GetMediaProvidersDirectory withSubtype(Optional<String> subtype) {
        Utils.checkNotNull(subtype, "subtype");
        this.subtype = subtype;
        return this;
    }

    public GetMediaProvidersDirectory withUpdatedAt(long updatedAt) {
        Utils.checkNotNull(updatedAt, "updatedAt");
        this.updatedAt = Optional.ofNullable(updatedAt);
        return this;
    }

    public GetMediaProvidersDirectory withUpdatedAt(Optional<Long> updatedAt) {
        Utils.checkNotNull(updatedAt, "updatedAt");
        this.updatedAt = updatedAt;
        return this;
    }

    public GetMediaProvidersDirectory withScannedAt(long scannedAt) {
        Utils.checkNotNull(scannedAt, "scannedAt");
        this.scannedAt = Optional.ofNullable(scannedAt);
        return this;
    }

    public GetMediaProvidersDirectory withScannedAt(Optional<Long> scannedAt) {
        Utils.checkNotNull(scannedAt, "scannedAt");
        this.scannedAt = scannedAt;
        return this;
    }

    public GetMediaProvidersDirectory withPivot(List<Pivot> pivot) {
        Utils.checkNotNull(pivot, "pivot");
        this.pivot = Optional.ofNullable(pivot);
        return this;
    }

    public GetMediaProvidersDirectory withPivot(Optional<? extends List<Pivot>> pivot) {
        Utils.checkNotNull(pivot, "pivot");
        this.pivot = pivot;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetMediaProvidersDirectory other = (GetMediaProvidersDirectory) o;
        return 
            Objects.deepEquals(this.hubKey, other.hubKey) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.agent, other.agent) &&
            Objects.deepEquals(this.language, other.language) &&
            Objects.deepEquals(this.refreshing, other.refreshing) &&
            Objects.deepEquals(this.scanner, other.scanner) &&
            Objects.deepEquals(this.uuid, other.uuid) &&
            Objects.deepEquals(this.id, other.id) &&
            Objects.deepEquals(this.key, other.key) &&
            Objects.deepEquals(this.type, other.type) &&
            Objects.deepEquals(this.subtype, other.subtype) &&
            Objects.deepEquals(this.updatedAt, other.updatedAt) &&
            Objects.deepEquals(this.scannedAt, other.scannedAt) &&
            Objects.deepEquals(this.pivot, other.pivot);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            hubKey,
            title,
            agent,
            language,
            refreshing,
            scanner,
            uuid,
            id,
            key,
            type,
            subtype,
            updatedAt,
            scannedAt,
            pivot);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetMediaProvidersDirectory.class,
                "hubKey", hubKey,
                "title", title,
                "agent", agent,
                "language", language,
                "refreshing", refreshing,
                "scanner", scanner,
                "uuid", uuid,
                "id", id,
                "key", key,
                "type", type,
                "subtype", subtype,
                "updatedAt", updatedAt,
                "scannedAt", scannedAt,
                "pivot", pivot);
    }
    
    public final static class Builder {
 
        private Optional<String> hubKey = Optional.empty();
 
        private Optional<String> title = Optional.empty();
 
        private Optional<String> agent = Optional.empty();
 
        private Optional<String> language = Optional.empty();
 
        private Optional<Boolean> refreshing = Optional.empty();
 
        private Optional<String> scanner = Optional.empty();
 
        private Optional<String> uuid = Optional.empty();
 
        private Optional<String> id = Optional.empty();
 
        private Optional<String> key = Optional.empty();
 
        private Optional<String> type = Optional.empty();
 
        private Optional<String> subtype = Optional.empty();
 
        private Optional<Long> updatedAt = Optional.empty();
 
        private Optional<Long> scannedAt = Optional.empty();
 
        private Optional<? extends List<Pivot>> pivot = Optional.empty();  
        
        private Builder() {
          // force use of static builder() method
        }

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

        public Builder hubKey(Optional<String> hubKey) {
            Utils.checkNotNull(hubKey, "hubKey");
            this.hubKey = hubKey;
            return this;
        }

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

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

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

        public Builder agent(Optional<String> agent) {
            Utils.checkNotNull(agent, "agent");
            this.agent = agent;
            return this;
        }

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

        public Builder language(Optional<String> language) {
            Utils.checkNotNull(language, "language");
            this.language = language;
            return this;
        }

        public Builder refreshing(boolean refreshing) {
            Utils.checkNotNull(refreshing, "refreshing");
            this.refreshing = Optional.ofNullable(refreshing);
            return this;
        }

        public Builder refreshing(Optional<Boolean> refreshing) {
            Utils.checkNotNull(refreshing, "refreshing");
            this.refreshing = refreshing;
            return this;
        }

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

        public Builder scanner(Optional<String> scanner) {
            Utils.checkNotNull(scanner, "scanner");
            this.scanner = scanner;
            return this;
        }

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

        public Builder uuid(Optional<String> uuid) {
            Utils.checkNotNull(uuid, "uuid");
            this.uuid = uuid;
            return this;
        }

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

        public Builder id(Optional<String> id) {
            Utils.checkNotNull(id, "id");
            this.id = id;
            return this;
        }

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

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

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

        public Builder type(Optional<String> type) {
            Utils.checkNotNull(type, "type");
            this.type = type;
            return this;
        }

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

        public Builder subtype(Optional<String> subtype) {
            Utils.checkNotNull(subtype, "subtype");
            this.subtype = subtype;
            return this;
        }

        public Builder updatedAt(long updatedAt) {
            Utils.checkNotNull(updatedAt, "updatedAt");
            this.updatedAt = Optional.ofNullable(updatedAt);
            return this;
        }

        public Builder updatedAt(Optional<Long> updatedAt) {
            Utils.checkNotNull(updatedAt, "updatedAt");
            this.updatedAt = updatedAt;
            return this;
        }

        public Builder scannedAt(long scannedAt) {
            Utils.checkNotNull(scannedAt, "scannedAt");
            this.scannedAt = Optional.ofNullable(scannedAt);
            return this;
        }

        public Builder scannedAt(Optional<Long> scannedAt) {
            Utils.checkNotNull(scannedAt, "scannedAt");
            this.scannedAt = scannedAt;
            return this;
        }

        public Builder pivot(List<Pivot> pivot) {
            Utils.checkNotNull(pivot, "pivot");
            this.pivot = Optional.ofNullable(pivot);
            return this;
        }

        public Builder pivot(Optional<? extends List<Pivot>> pivot) {
            Utils.checkNotNull(pivot, "pivot");
            this.pivot = pivot;
            return this;
        }
        
        public GetMediaProvidersDirectory build() {
            return new GetMediaProvidersDirectory(
                hubKey,
                title,
                agent,
                language,
                refreshing,
                scanner,
                uuid,
                id,
                key,
                type,
                subtype,
                updatedAt,
                scannedAt,
                pivot);
        }
    }
}

