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


public class GetPlaylistMetadata {

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

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

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

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

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

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

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

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

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

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

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

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("duration")
    private Optional<Integer> duration;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("leafCount")
    private Optional<Integer> leafCount;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("addedAt")
    private Optional<Integer> addedAt;

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

    @JsonCreator
    public GetPlaylistMetadata(
            @JsonProperty("content") Optional<String> content,
            @JsonProperty("ratingKey") Optional<String> ratingKey,
            @JsonProperty("key") Optional<String> key,
            @JsonProperty("guid") Optional<String> guid,
            @JsonProperty("type") Optional<String> type,
            @JsonProperty("title") Optional<String> title,
            @JsonProperty("summary") Optional<String> summary,
            @JsonProperty("smart") Optional<Boolean> smart,
            @JsonProperty("playlistType") Optional<String> playlistType,
            @JsonProperty("composite") Optional<String> composite,
            @JsonProperty("icon") Optional<String> icon,
            @JsonProperty("duration") Optional<Integer> duration,
            @JsonProperty("leafCount") Optional<Integer> leafCount,
            @JsonProperty("addedAt") Optional<Integer> addedAt,
            @JsonProperty("updatedAt") Optional<Integer> updatedAt) {
        Utils.checkNotNull(content, "content");
        Utils.checkNotNull(ratingKey, "ratingKey");
        Utils.checkNotNull(key, "key");
        Utils.checkNotNull(guid, "guid");
        Utils.checkNotNull(type, "type");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(summary, "summary");
        Utils.checkNotNull(smart, "smart");
        Utils.checkNotNull(playlistType, "playlistType");
        Utils.checkNotNull(composite, "composite");
        Utils.checkNotNull(icon, "icon");
        Utils.checkNotNull(duration, "duration");
        Utils.checkNotNull(leafCount, "leafCount");
        Utils.checkNotNull(addedAt, "addedAt");
        Utils.checkNotNull(updatedAt, "updatedAt");
        this.content = content;
        this.ratingKey = ratingKey;
        this.key = key;
        this.guid = guid;
        this.type = type;
        this.title = title;
        this.summary = summary;
        this.smart = smart;
        this.playlistType = playlistType;
        this.composite = composite;
        this.icon = icon;
        this.duration = duration;
        this.leafCount = leafCount;
        this.addedAt = addedAt;
        this.updatedAt = updatedAt;
    }
    
    public GetPlaylistMetadata() {
        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(), Optional.empty());
    }

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

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

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

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

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

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

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

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

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

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

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

    @JsonIgnore
    public Optional<Integer> duration() {
        return duration;
    }

    @JsonIgnore
    public Optional<Integer> leafCount() {
        return leafCount;
    }

    @JsonIgnore
    public Optional<Integer> addedAt() {
        return addedAt;
    }

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

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

    public GetPlaylistMetadata withContent(String content) {
        Utils.checkNotNull(content, "content");
        this.content = Optional.ofNullable(content);
        return this;
    }

    public GetPlaylistMetadata withContent(Optional<String> content) {
        Utils.checkNotNull(content, "content");
        this.content = content;
        return this;
    }

    public GetPlaylistMetadata withRatingKey(String ratingKey) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        this.ratingKey = Optional.ofNullable(ratingKey);
        return this;
    }

    public GetPlaylistMetadata withRatingKey(Optional<String> ratingKey) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        this.ratingKey = ratingKey;
        return this;
    }

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

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

    public GetPlaylistMetadata withGuid(String guid) {
        Utils.checkNotNull(guid, "guid");
        this.guid = Optional.ofNullable(guid);
        return this;
    }

    public GetPlaylistMetadata withGuid(Optional<String> guid) {
        Utils.checkNotNull(guid, "guid");
        this.guid = guid;
        return this;
    }

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

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

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

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

    public GetPlaylistMetadata withSummary(String summary) {
        Utils.checkNotNull(summary, "summary");
        this.summary = Optional.ofNullable(summary);
        return this;
    }

    public GetPlaylistMetadata withSummary(Optional<String> summary) {
        Utils.checkNotNull(summary, "summary");
        this.summary = summary;
        return this;
    }

    public GetPlaylistMetadata withSmart(boolean smart) {
        Utils.checkNotNull(smart, "smart");
        this.smart = Optional.ofNullable(smart);
        return this;
    }

    public GetPlaylistMetadata withSmart(Optional<Boolean> smart) {
        Utils.checkNotNull(smart, "smart");
        this.smart = smart;
        return this;
    }

    public GetPlaylistMetadata withPlaylistType(String playlistType) {
        Utils.checkNotNull(playlistType, "playlistType");
        this.playlistType = Optional.ofNullable(playlistType);
        return this;
    }

    public GetPlaylistMetadata withPlaylistType(Optional<String> playlistType) {
        Utils.checkNotNull(playlistType, "playlistType");
        this.playlistType = playlistType;
        return this;
    }

    public GetPlaylistMetadata withComposite(String composite) {
        Utils.checkNotNull(composite, "composite");
        this.composite = Optional.ofNullable(composite);
        return this;
    }

    public GetPlaylistMetadata withComposite(Optional<String> composite) {
        Utils.checkNotNull(composite, "composite");
        this.composite = composite;
        return this;
    }

    public GetPlaylistMetadata withIcon(String icon) {
        Utils.checkNotNull(icon, "icon");
        this.icon = Optional.ofNullable(icon);
        return this;
    }

    public GetPlaylistMetadata withIcon(Optional<String> icon) {
        Utils.checkNotNull(icon, "icon");
        this.icon = icon;
        return this;
    }

    public GetPlaylistMetadata withDuration(int duration) {
        Utils.checkNotNull(duration, "duration");
        this.duration = Optional.ofNullable(duration);
        return this;
    }

    public GetPlaylistMetadata withDuration(Optional<Integer> duration) {
        Utils.checkNotNull(duration, "duration");
        this.duration = duration;
        return this;
    }

    public GetPlaylistMetadata withLeafCount(int leafCount) {
        Utils.checkNotNull(leafCount, "leafCount");
        this.leafCount = Optional.ofNullable(leafCount);
        return this;
    }

    public GetPlaylistMetadata withLeafCount(Optional<Integer> leafCount) {
        Utils.checkNotNull(leafCount, "leafCount");
        this.leafCount = leafCount;
        return this;
    }

    public GetPlaylistMetadata withAddedAt(int addedAt) {
        Utils.checkNotNull(addedAt, "addedAt");
        this.addedAt = Optional.ofNullable(addedAt);
        return this;
    }

    public GetPlaylistMetadata withAddedAt(Optional<Integer> addedAt) {
        Utils.checkNotNull(addedAt, "addedAt");
        this.addedAt = addedAt;
        return this;
    }

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

    public GetPlaylistMetadata withUpdatedAt(Optional<Integer> updatedAt) {
        Utils.checkNotNull(updatedAt, "updatedAt");
        this.updatedAt = updatedAt;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetPlaylistMetadata other = (GetPlaylistMetadata) o;
        return 
            Objects.deepEquals(this.content, other.content) &&
            Objects.deepEquals(this.ratingKey, other.ratingKey) &&
            Objects.deepEquals(this.key, other.key) &&
            Objects.deepEquals(this.guid, other.guid) &&
            Objects.deepEquals(this.type, other.type) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.summary, other.summary) &&
            Objects.deepEquals(this.smart, other.smart) &&
            Objects.deepEquals(this.playlistType, other.playlistType) &&
            Objects.deepEquals(this.composite, other.composite) &&
            Objects.deepEquals(this.icon, other.icon) &&
            Objects.deepEquals(this.duration, other.duration) &&
            Objects.deepEquals(this.leafCount, other.leafCount) &&
            Objects.deepEquals(this.addedAt, other.addedAt) &&
            Objects.deepEquals(this.updatedAt, other.updatedAt);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            content,
            ratingKey,
            key,
            guid,
            type,
            title,
            summary,
            smart,
            playlistType,
            composite,
            icon,
            duration,
            leafCount,
            addedAt,
            updatedAt);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetPlaylistMetadata.class,
                "content", content,
                "ratingKey", ratingKey,
                "key", key,
                "guid", guid,
                "type", type,
                "title", title,
                "summary", summary,
                "smart", smart,
                "playlistType", playlistType,
                "composite", composite,
                "icon", icon,
                "duration", duration,
                "leafCount", leafCount,
                "addedAt", addedAt,
                "updatedAt", updatedAt);
    }
    
    public final static class Builder {
 
        private Optional<String> content = Optional.empty();
 
        private Optional<String> ratingKey = Optional.empty();
 
        private Optional<String> key = Optional.empty();
 
        private Optional<String> guid = Optional.empty();
 
        private Optional<String> type = Optional.empty();
 
        private Optional<String> title = Optional.empty();
 
        private Optional<String> summary = Optional.empty();
 
        private Optional<Boolean> smart = Optional.empty();
 
        private Optional<String> playlistType = Optional.empty();
 
        private Optional<String> composite = Optional.empty();
 
        private Optional<String> icon = Optional.empty();
 
        private Optional<Integer> duration = Optional.empty();
 
        private Optional<Integer> leafCount = Optional.empty();
 
        private Optional<Integer> addedAt = Optional.empty();
 
        private Optional<Integer> updatedAt = Optional.empty();  
        
        private Builder() {
          // force use of static builder() method
        }

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

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

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

        public Builder ratingKey(Optional<String> ratingKey) {
            Utils.checkNotNull(ratingKey, "ratingKey");
            this.ratingKey = ratingKey;
            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 guid(String guid) {
            Utils.checkNotNull(guid, "guid");
            this.guid = Optional.ofNullable(guid);
            return this;
        }

        public Builder guid(Optional<String> guid) {
            Utils.checkNotNull(guid, "guid");
            this.guid = guid;
            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 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 summary(String summary) {
            Utils.checkNotNull(summary, "summary");
            this.summary = Optional.ofNullable(summary);
            return this;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public Builder updatedAt(Optional<Integer> updatedAt) {
            Utils.checkNotNull(updatedAt, "updatedAt");
            this.updatedAt = updatedAt;
            return this;
        }
        
        public GetPlaylistMetadata build() {
            return new GetPlaylistMetadata(
                content,
                ratingKey,
                key,
                guid,
                type,
                title,
                summary,
                smart,
                playlistType,
                composite,
                icon,
                duration,
                leafCount,
                addedAt,
                updatedAt);
        }
    }
}

