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


public class GetMetadataChildrenMetadata {

    @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("parentRatingKey")
    private Optional<String> parentRatingKey;

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

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

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

    @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("parentKey")
    private Optional<String> parentKey;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @JsonCreator
    public GetMetadataChildrenMetadata(
            @JsonProperty("ratingKey") Optional<String> ratingKey,
            @JsonProperty("key") Optional<String> key,
            @JsonProperty("parentRatingKey") Optional<String> parentRatingKey,
            @JsonProperty("guid") Optional<String> guid,
            @JsonProperty("parentGuid") Optional<String> parentGuid,
            @JsonProperty("parentStudio") Optional<String> parentStudio,
            @JsonProperty("type") Optional<String> type,
            @JsonProperty("title") Optional<String> title,
            @JsonProperty("parentKey") Optional<String> parentKey,
            @JsonProperty("parentTitle") Optional<String> parentTitle,
            @JsonProperty("summary") Optional<String> summary,
            @JsonProperty("index") Optional<Integer> index,
            @JsonProperty("parentIndex") Optional<Integer> parentIndex,
            @JsonProperty("viewCount") Optional<Integer> viewCount,
            @JsonProperty("lastViewedAt") Optional<Integer> lastViewedAt,
            @JsonProperty("parentYear") Optional<Integer> parentYear,
            @JsonProperty("thumb") Optional<String> thumb,
            @JsonProperty("art") Optional<String> art,
            @JsonProperty("parentThumb") Optional<String> parentThumb,
            @JsonProperty("parentTheme") Optional<String> parentTheme,
            @JsonProperty("leafCount") Optional<Integer> leafCount,
            @JsonProperty("viewedLeafCount") Optional<Integer> viewedLeafCount,
            @JsonProperty("addedAt") Optional<Integer> addedAt,
            @JsonProperty("updatedAt") Optional<Integer> updatedAt,
            @JsonProperty("userRating") Optional<Integer> userRating,
            @JsonProperty("skipCount") Optional<Integer> skipCount,
            @JsonProperty("lastRatedAt") Optional<Integer> lastRatedAt) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        Utils.checkNotNull(key, "key");
        Utils.checkNotNull(parentRatingKey, "parentRatingKey");
        Utils.checkNotNull(guid, "guid");
        Utils.checkNotNull(parentGuid, "parentGuid");
        Utils.checkNotNull(parentStudio, "parentStudio");
        Utils.checkNotNull(type, "type");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(parentKey, "parentKey");
        Utils.checkNotNull(parentTitle, "parentTitle");
        Utils.checkNotNull(summary, "summary");
        Utils.checkNotNull(index, "index");
        Utils.checkNotNull(parentIndex, "parentIndex");
        Utils.checkNotNull(viewCount, "viewCount");
        Utils.checkNotNull(lastViewedAt, "lastViewedAt");
        Utils.checkNotNull(parentYear, "parentYear");
        Utils.checkNotNull(thumb, "thumb");
        Utils.checkNotNull(art, "art");
        Utils.checkNotNull(parentThumb, "parentThumb");
        Utils.checkNotNull(parentTheme, "parentTheme");
        Utils.checkNotNull(leafCount, "leafCount");
        Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
        Utils.checkNotNull(addedAt, "addedAt");
        Utils.checkNotNull(updatedAt, "updatedAt");
        Utils.checkNotNull(userRating, "userRating");
        Utils.checkNotNull(skipCount, "skipCount");
        Utils.checkNotNull(lastRatedAt, "lastRatedAt");
        this.ratingKey = ratingKey;
        this.key = key;
        this.parentRatingKey = parentRatingKey;
        this.guid = guid;
        this.parentGuid = parentGuid;
        this.parentStudio = parentStudio;
        this.type = type;
        this.title = title;
        this.parentKey = parentKey;
        this.parentTitle = parentTitle;
        this.summary = summary;
        this.index = index;
        this.parentIndex = parentIndex;
        this.viewCount = viewCount;
        this.lastViewedAt = lastViewedAt;
        this.parentYear = parentYear;
        this.thumb = thumb;
        this.art = art;
        this.parentThumb = parentThumb;
        this.parentTheme = parentTheme;
        this.leafCount = leafCount;
        this.viewedLeafCount = viewedLeafCount;
        this.addedAt = addedAt;
        this.updatedAt = updatedAt;
        this.userRating = userRating;
        this.skipCount = skipCount;
        this.lastRatedAt = lastRatedAt;
    }
    
    public GetMetadataChildrenMetadata() {
        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(), 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> ratingKey() {
        return ratingKey;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    public GetMetadataChildrenMetadata withParentRatingKey(String parentRatingKey) {
        Utils.checkNotNull(parentRatingKey, "parentRatingKey");
        this.parentRatingKey = Optional.ofNullable(parentRatingKey);
        return this;
    }

    public GetMetadataChildrenMetadata withParentRatingKey(Optional<String> parentRatingKey) {
        Utils.checkNotNull(parentRatingKey, "parentRatingKey");
        this.parentRatingKey = parentRatingKey;
        return this;
    }

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

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

    public GetMetadataChildrenMetadata withParentGuid(String parentGuid) {
        Utils.checkNotNull(parentGuid, "parentGuid");
        this.parentGuid = Optional.ofNullable(parentGuid);
        return this;
    }

    public GetMetadataChildrenMetadata withParentGuid(Optional<String> parentGuid) {
        Utils.checkNotNull(parentGuid, "parentGuid");
        this.parentGuid = parentGuid;
        return this;
    }

    public GetMetadataChildrenMetadata withParentStudio(String parentStudio) {
        Utils.checkNotNull(parentStudio, "parentStudio");
        this.parentStudio = Optional.ofNullable(parentStudio);
        return this;
    }

    public GetMetadataChildrenMetadata withParentStudio(Optional<String> parentStudio) {
        Utils.checkNotNull(parentStudio, "parentStudio");
        this.parentStudio = parentStudio;
        return this;
    }

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

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

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

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

    public GetMetadataChildrenMetadata withParentKey(String parentKey) {
        Utils.checkNotNull(parentKey, "parentKey");
        this.parentKey = Optional.ofNullable(parentKey);
        return this;
    }

    public GetMetadataChildrenMetadata withParentKey(Optional<String> parentKey) {
        Utils.checkNotNull(parentKey, "parentKey");
        this.parentKey = parentKey;
        return this;
    }

    public GetMetadataChildrenMetadata withParentTitle(String parentTitle) {
        Utils.checkNotNull(parentTitle, "parentTitle");
        this.parentTitle = Optional.ofNullable(parentTitle);
        return this;
    }

    public GetMetadataChildrenMetadata withParentTitle(Optional<String> parentTitle) {
        Utils.checkNotNull(parentTitle, "parentTitle");
        this.parentTitle = parentTitle;
        return this;
    }

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

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

    public GetMetadataChildrenMetadata withIndex(int index) {
        Utils.checkNotNull(index, "index");
        this.index = Optional.ofNullable(index);
        return this;
    }

    public GetMetadataChildrenMetadata withIndex(Optional<Integer> index) {
        Utils.checkNotNull(index, "index");
        this.index = index;
        return this;
    }

    public GetMetadataChildrenMetadata withParentIndex(int parentIndex) {
        Utils.checkNotNull(parentIndex, "parentIndex");
        this.parentIndex = Optional.ofNullable(parentIndex);
        return this;
    }

    public GetMetadataChildrenMetadata withParentIndex(Optional<Integer> parentIndex) {
        Utils.checkNotNull(parentIndex, "parentIndex");
        this.parentIndex = parentIndex;
        return this;
    }

    public GetMetadataChildrenMetadata withViewCount(int viewCount) {
        Utils.checkNotNull(viewCount, "viewCount");
        this.viewCount = Optional.ofNullable(viewCount);
        return this;
    }

    public GetMetadataChildrenMetadata withViewCount(Optional<Integer> viewCount) {
        Utils.checkNotNull(viewCount, "viewCount");
        this.viewCount = viewCount;
        return this;
    }

    public GetMetadataChildrenMetadata withLastViewedAt(int lastViewedAt) {
        Utils.checkNotNull(lastViewedAt, "lastViewedAt");
        this.lastViewedAt = Optional.ofNullable(lastViewedAt);
        return this;
    }

    public GetMetadataChildrenMetadata withLastViewedAt(Optional<Integer> lastViewedAt) {
        Utils.checkNotNull(lastViewedAt, "lastViewedAt");
        this.lastViewedAt = lastViewedAt;
        return this;
    }

    public GetMetadataChildrenMetadata withParentYear(int parentYear) {
        Utils.checkNotNull(parentYear, "parentYear");
        this.parentYear = Optional.ofNullable(parentYear);
        return this;
    }

    public GetMetadataChildrenMetadata withParentYear(Optional<Integer> parentYear) {
        Utils.checkNotNull(parentYear, "parentYear");
        this.parentYear = parentYear;
        return this;
    }

    public GetMetadataChildrenMetadata withThumb(String thumb) {
        Utils.checkNotNull(thumb, "thumb");
        this.thumb = Optional.ofNullable(thumb);
        return this;
    }

    public GetMetadataChildrenMetadata withThumb(Optional<String> thumb) {
        Utils.checkNotNull(thumb, "thumb");
        this.thumb = thumb;
        return this;
    }

    public GetMetadataChildrenMetadata withArt(String art) {
        Utils.checkNotNull(art, "art");
        this.art = Optional.ofNullable(art);
        return this;
    }

    public GetMetadataChildrenMetadata withArt(Optional<String> art) {
        Utils.checkNotNull(art, "art");
        this.art = art;
        return this;
    }

    public GetMetadataChildrenMetadata withParentThumb(String parentThumb) {
        Utils.checkNotNull(parentThumb, "parentThumb");
        this.parentThumb = Optional.ofNullable(parentThumb);
        return this;
    }

    public GetMetadataChildrenMetadata withParentThumb(Optional<String> parentThumb) {
        Utils.checkNotNull(parentThumb, "parentThumb");
        this.parentThumb = parentThumb;
        return this;
    }

    public GetMetadataChildrenMetadata withParentTheme(String parentTheme) {
        Utils.checkNotNull(parentTheme, "parentTheme");
        this.parentTheme = Optional.ofNullable(parentTheme);
        return this;
    }

    public GetMetadataChildrenMetadata withParentTheme(Optional<String> parentTheme) {
        Utils.checkNotNull(parentTheme, "parentTheme");
        this.parentTheme = parentTheme;
        return this;
    }

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

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

    public GetMetadataChildrenMetadata withViewedLeafCount(int viewedLeafCount) {
        Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
        this.viewedLeafCount = Optional.ofNullable(viewedLeafCount);
        return this;
    }

    public GetMetadataChildrenMetadata withViewedLeafCount(Optional<Integer> viewedLeafCount) {
        Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
        this.viewedLeafCount = viewedLeafCount;
        return this;
    }

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

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

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

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

    public GetMetadataChildrenMetadata withUserRating(int userRating) {
        Utils.checkNotNull(userRating, "userRating");
        this.userRating = Optional.ofNullable(userRating);
        return this;
    }

    public GetMetadataChildrenMetadata withUserRating(Optional<Integer> userRating) {
        Utils.checkNotNull(userRating, "userRating");
        this.userRating = userRating;
        return this;
    }

    public GetMetadataChildrenMetadata withSkipCount(int skipCount) {
        Utils.checkNotNull(skipCount, "skipCount");
        this.skipCount = Optional.ofNullable(skipCount);
        return this;
    }

    public GetMetadataChildrenMetadata withSkipCount(Optional<Integer> skipCount) {
        Utils.checkNotNull(skipCount, "skipCount");
        this.skipCount = skipCount;
        return this;
    }

    public GetMetadataChildrenMetadata withLastRatedAt(int lastRatedAt) {
        Utils.checkNotNull(lastRatedAt, "lastRatedAt");
        this.lastRatedAt = Optional.ofNullable(lastRatedAt);
        return this;
    }

    public GetMetadataChildrenMetadata withLastRatedAt(Optional<Integer> lastRatedAt) {
        Utils.checkNotNull(lastRatedAt, "lastRatedAt");
        this.lastRatedAt = lastRatedAt;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetMetadataChildrenMetadata other = (GetMetadataChildrenMetadata) o;
        return 
            Objects.deepEquals(this.ratingKey, other.ratingKey) &&
            Objects.deepEquals(this.key, other.key) &&
            Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) &&
            Objects.deepEquals(this.guid, other.guid) &&
            Objects.deepEquals(this.parentGuid, other.parentGuid) &&
            Objects.deepEquals(this.parentStudio, other.parentStudio) &&
            Objects.deepEquals(this.type, other.type) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.parentKey, other.parentKey) &&
            Objects.deepEquals(this.parentTitle, other.parentTitle) &&
            Objects.deepEquals(this.summary, other.summary) &&
            Objects.deepEquals(this.index, other.index) &&
            Objects.deepEquals(this.parentIndex, other.parentIndex) &&
            Objects.deepEquals(this.viewCount, other.viewCount) &&
            Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) &&
            Objects.deepEquals(this.parentYear, other.parentYear) &&
            Objects.deepEquals(this.thumb, other.thumb) &&
            Objects.deepEquals(this.art, other.art) &&
            Objects.deepEquals(this.parentThumb, other.parentThumb) &&
            Objects.deepEquals(this.parentTheme, other.parentTheme) &&
            Objects.deepEquals(this.leafCount, other.leafCount) &&
            Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) &&
            Objects.deepEquals(this.addedAt, other.addedAt) &&
            Objects.deepEquals(this.updatedAt, other.updatedAt) &&
            Objects.deepEquals(this.userRating, other.userRating) &&
            Objects.deepEquals(this.skipCount, other.skipCount) &&
            Objects.deepEquals(this.lastRatedAt, other.lastRatedAt);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            ratingKey,
            key,
            parentRatingKey,
            guid,
            parentGuid,
            parentStudio,
            type,
            title,
            parentKey,
            parentTitle,
            summary,
            index,
            parentIndex,
            viewCount,
            lastViewedAt,
            parentYear,
            thumb,
            art,
            parentThumb,
            parentTheme,
            leafCount,
            viewedLeafCount,
            addedAt,
            updatedAt,
            userRating,
            skipCount,
            lastRatedAt);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetMetadataChildrenMetadata.class,
                "ratingKey", ratingKey,
                "key", key,
                "parentRatingKey", parentRatingKey,
                "guid", guid,
                "parentGuid", parentGuid,
                "parentStudio", parentStudio,
                "type", type,
                "title", title,
                "parentKey", parentKey,
                "parentTitle", parentTitle,
                "summary", summary,
                "index", index,
                "parentIndex", parentIndex,
                "viewCount", viewCount,
                "lastViewedAt", lastViewedAt,
                "parentYear", parentYear,
                "thumb", thumb,
                "art", art,
                "parentThumb", parentThumb,
                "parentTheme", parentTheme,
                "leafCount", leafCount,
                "viewedLeafCount", viewedLeafCount,
                "addedAt", addedAt,
                "updatedAt", updatedAt,
                "userRating", userRating,
                "skipCount", skipCount,
                "lastRatedAt", lastRatedAt);
    }
    
    public final static class Builder {
 
        private Optional<String> ratingKey = Optional.empty();
 
        private Optional<String> key = Optional.empty();
 
        private Optional<String> parentRatingKey = Optional.empty();
 
        private Optional<String> guid = Optional.empty();
 
        private Optional<String> parentGuid = Optional.empty();
 
        private Optional<String> parentStudio = Optional.empty();
 
        private Optional<String> type = Optional.empty();
 
        private Optional<String> title = Optional.empty();
 
        private Optional<String> parentKey = Optional.empty();
 
        private Optional<String> parentTitle = Optional.empty();
 
        private Optional<String> summary = Optional.empty();
 
        private Optional<Integer> index = Optional.empty();
 
        private Optional<Integer> parentIndex = Optional.empty();
 
        private Optional<Integer> viewCount = Optional.empty();
 
        private Optional<Integer> lastViewedAt = Optional.empty();
 
        private Optional<Integer> parentYear = Optional.empty();
 
        private Optional<String> thumb = Optional.empty();
 
        private Optional<String> art = Optional.empty();
 
        private Optional<String> parentThumb = Optional.empty();
 
        private Optional<String> parentTheme = Optional.empty();
 
        private Optional<Integer> leafCount = Optional.empty();
 
        private Optional<Integer> viewedLeafCount = Optional.empty();
 
        private Optional<Integer> addedAt = Optional.empty();
 
        private Optional<Integer> updatedAt = Optional.empty();
 
        private Optional<Integer> userRating = Optional.empty();
 
        private Optional<Integer> skipCount = Optional.empty();
 
        private Optional<Integer> lastRatedAt = Optional.empty();  
        
        private Builder() {
          // force use of static builder() method
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public Builder viewedLeafCount(Optional<Integer> viewedLeafCount) {
            Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
            this.viewedLeafCount = viewedLeafCount;
            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 Builder userRating(int userRating) {
            Utils.checkNotNull(userRating, "userRating");
            this.userRating = Optional.ofNullable(userRating);
            return this;
        }

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

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

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

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

        public Builder lastRatedAt(Optional<Integer> lastRatedAt) {
            Utils.checkNotNull(lastRatedAt, "lastRatedAt");
            this.lastRatedAt = lastRatedAt;
            return this;
        }
        
        public GetMetadataChildrenMetadata build() {
            return new GetMetadataChildrenMetadata(
                ratingKey,
                key,
                parentRatingKey,
                guid,
                parentGuid,
                parentStudio,
                type,
                title,
                parentKey,
                parentTitle,
                summary,
                index,
                parentIndex,
                viewCount,
                lastViewedAt,
                parentYear,
                thumb,
                art,
                parentThumb,
                parentTheme,
                leafCount,
                viewedLeafCount,
                addedAt,
                updatedAt,
                userRating,
                skipCount,
                lastRatedAt);
        }
    }
}

