/* 
 * 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.Double;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Objects;
import java.util.Optional;


public class GetOnDeckMetadata {

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

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("librarySectionID")
    private Optional<Double> librarySectionID;

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

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

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

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

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("parentRatingKey")
    private Optional<Double> parentRatingKey;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("grandparentRatingKey")
    private Optional<Double> grandparentRatingKey;

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

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

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

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

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

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

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

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

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

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

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

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("year")
    private Optional<Double> year;

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

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

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

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

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("originallyAvailableAt")
    private Optional<OffsetDateTime> originallyAvailableAt;

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

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

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Media")
    private Optional<? extends List<GetOnDeckMedia>> media;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Guid")
    private Optional<? extends List<GetOnDeckGuids>> guids;

    @JsonCreator
    public GetOnDeckMetadata(
            @JsonProperty("allowSync") Optional<Boolean> allowSync,
            @JsonProperty("librarySectionID") Optional<Double> librarySectionID,
            @JsonProperty("librarySectionTitle") Optional<String> librarySectionTitle,
            @JsonProperty("librarySectionUUID") Optional<String> librarySectionUUID,
            @JsonProperty("ratingKey") Optional<Double> ratingKey,
            @JsonProperty("key") Optional<String> key,
            @JsonProperty("parentRatingKey") Optional<Double> parentRatingKey,
            @JsonProperty("grandparentRatingKey") Optional<Double> grandparentRatingKey,
            @JsonProperty("guid") Optional<String> guid,
            @JsonProperty("parentGuid") Optional<String> parentGuid,
            @JsonProperty("grandparentGuid") Optional<String> grandparentGuid,
            @JsonProperty("type") Optional<String> type,
            @JsonProperty("title") Optional<String> title,
            @JsonProperty("grandparentKey") Optional<String> grandparentKey,
            @JsonProperty("parentKey") Optional<String> parentKey,
            @JsonProperty("librarySectionKey") Optional<String> librarySectionKey,
            @JsonProperty("grandparentTitle") Optional<String> grandparentTitle,
            @JsonProperty("parentTitle") Optional<String> parentTitle,
            @JsonProperty("contentRating") Optional<String> contentRating,
            @JsonProperty("summary") Optional<String> summary,
            @JsonProperty("index") Optional<Double> index,
            @JsonProperty("parentIndex") Optional<Double> parentIndex,
            @JsonProperty("lastViewedAt") Optional<Double> lastViewedAt,
            @JsonProperty("year") Optional<Double> year,
            @JsonProperty("thumb") Optional<String> thumb,
            @JsonProperty("art") Optional<String> art,
            @JsonProperty("parentThumb") Optional<String> parentThumb,
            @JsonProperty("grandparentThumb") Optional<String> grandparentThumb,
            @JsonProperty("grandparentArt") Optional<String> grandparentArt,
            @JsonProperty("grandparentTheme") Optional<String> grandparentTheme,
            @JsonProperty("duration") Optional<Double> duration,
            @JsonProperty("originallyAvailableAt") Optional<OffsetDateTime> originallyAvailableAt,
            @JsonProperty("addedAt") Optional<Double> addedAt,
            @JsonProperty("updatedAt") Optional<Double> updatedAt,
            @JsonProperty("Media") Optional<? extends List<GetOnDeckMedia>> media,
            @JsonProperty("Guid") Optional<? extends List<GetOnDeckGuids>> guids) {
        Utils.checkNotNull(allowSync, "allowSync");
        Utils.checkNotNull(librarySectionID, "librarySectionID");
        Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
        Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
        Utils.checkNotNull(ratingKey, "ratingKey");
        Utils.checkNotNull(key, "key");
        Utils.checkNotNull(parentRatingKey, "parentRatingKey");
        Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
        Utils.checkNotNull(guid, "guid");
        Utils.checkNotNull(parentGuid, "parentGuid");
        Utils.checkNotNull(grandparentGuid, "grandparentGuid");
        Utils.checkNotNull(type, "type");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(grandparentKey, "grandparentKey");
        Utils.checkNotNull(parentKey, "parentKey");
        Utils.checkNotNull(librarySectionKey, "librarySectionKey");
        Utils.checkNotNull(grandparentTitle, "grandparentTitle");
        Utils.checkNotNull(parentTitle, "parentTitle");
        Utils.checkNotNull(contentRating, "contentRating");
        Utils.checkNotNull(summary, "summary");
        Utils.checkNotNull(index, "index");
        Utils.checkNotNull(parentIndex, "parentIndex");
        Utils.checkNotNull(lastViewedAt, "lastViewedAt");
        Utils.checkNotNull(year, "year");
        Utils.checkNotNull(thumb, "thumb");
        Utils.checkNotNull(art, "art");
        Utils.checkNotNull(parentThumb, "parentThumb");
        Utils.checkNotNull(grandparentThumb, "grandparentThumb");
        Utils.checkNotNull(grandparentArt, "grandparentArt");
        Utils.checkNotNull(grandparentTheme, "grandparentTheme");
        Utils.checkNotNull(duration, "duration");
        Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
        Utils.checkNotNull(addedAt, "addedAt");
        Utils.checkNotNull(updatedAt, "updatedAt");
        Utils.checkNotNull(media, "media");
        Utils.checkNotNull(guids, "guids");
        this.allowSync = allowSync;
        this.librarySectionID = librarySectionID;
        this.librarySectionTitle = librarySectionTitle;
        this.librarySectionUUID = librarySectionUUID;
        this.ratingKey = ratingKey;
        this.key = key;
        this.parentRatingKey = parentRatingKey;
        this.grandparentRatingKey = grandparentRatingKey;
        this.guid = guid;
        this.parentGuid = parentGuid;
        this.grandparentGuid = grandparentGuid;
        this.type = type;
        this.title = title;
        this.grandparentKey = grandparentKey;
        this.parentKey = parentKey;
        this.librarySectionKey = librarySectionKey;
        this.grandparentTitle = grandparentTitle;
        this.parentTitle = parentTitle;
        this.contentRating = contentRating;
        this.summary = summary;
        this.index = index;
        this.parentIndex = parentIndex;
        this.lastViewedAt = lastViewedAt;
        this.year = year;
        this.thumb = thumb;
        this.art = art;
        this.parentThumb = parentThumb;
        this.grandparentThumb = grandparentThumb;
        this.grandparentArt = grandparentArt;
        this.grandparentTheme = grandparentTheme;
        this.duration = duration;
        this.originallyAvailableAt = originallyAvailableAt;
        this.addedAt = addedAt;
        this.updatedAt = updatedAt;
        this.media = media;
        this.guids = guids;
    }
    
    public GetOnDeckMetadata() {
        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(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
    }

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

    @JsonIgnore
    public Optional<Double> librarySectionID() {
        return librarySectionID;
    }

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

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

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

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

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

    @JsonIgnore
    public Optional<Double> grandparentRatingKey() {
        return grandparentRatingKey;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @JsonIgnore
    public Optional<Double> year() {
        return year;
    }

    @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> grandparentThumb() {
        return grandparentThumb;
    }

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

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

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

    @JsonIgnore
    public Optional<OffsetDateTime> originallyAvailableAt() {
        return originallyAvailableAt;
    }

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

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

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

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

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

    public GetOnDeckMetadata withAllowSync(boolean allowSync) {
        Utils.checkNotNull(allowSync, "allowSync");
        this.allowSync = Optional.ofNullable(allowSync);
        return this;
    }

    public GetOnDeckMetadata withAllowSync(Optional<Boolean> allowSync) {
        Utils.checkNotNull(allowSync, "allowSync");
        this.allowSync = allowSync;
        return this;
    }

    public GetOnDeckMetadata withLibrarySectionID(double librarySectionID) {
        Utils.checkNotNull(librarySectionID, "librarySectionID");
        this.librarySectionID = Optional.ofNullable(librarySectionID);
        return this;
    }

    public GetOnDeckMetadata withLibrarySectionID(Optional<Double> librarySectionID) {
        Utils.checkNotNull(librarySectionID, "librarySectionID");
        this.librarySectionID = librarySectionID;
        return this;
    }

    public GetOnDeckMetadata withLibrarySectionTitle(String librarySectionTitle) {
        Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
        this.librarySectionTitle = Optional.ofNullable(librarySectionTitle);
        return this;
    }

    public GetOnDeckMetadata withLibrarySectionTitle(Optional<String> librarySectionTitle) {
        Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
        this.librarySectionTitle = librarySectionTitle;
        return this;
    }

    public GetOnDeckMetadata withLibrarySectionUUID(String librarySectionUUID) {
        Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
        this.librarySectionUUID = Optional.ofNullable(librarySectionUUID);
        return this;
    }

    public GetOnDeckMetadata withLibrarySectionUUID(Optional<String> librarySectionUUID) {
        Utils.checkNotNull(librarySectionUUID, "librarySectionUUID");
        this.librarySectionUUID = librarySectionUUID;
        return this;
    }

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

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

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

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

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

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

    public GetOnDeckMetadata withGrandparentRatingKey(double grandparentRatingKey) {
        Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
        this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey);
        return this;
    }

    public GetOnDeckMetadata withGrandparentRatingKey(Optional<Double> grandparentRatingKey) {
        Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
        this.grandparentRatingKey = grandparentRatingKey;
        return this;
    }

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

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

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

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

    public GetOnDeckMetadata withGrandparentGuid(String grandparentGuid) {
        Utils.checkNotNull(grandparentGuid, "grandparentGuid");
        this.grandparentGuid = Optional.ofNullable(grandparentGuid);
        return this;
    }

    public GetOnDeckMetadata withGrandparentGuid(Optional<String> grandparentGuid) {
        Utils.checkNotNull(grandparentGuid, "grandparentGuid");
        this.grandparentGuid = grandparentGuid;
        return this;
    }

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

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

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

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

    public GetOnDeckMetadata withGrandparentKey(String grandparentKey) {
        Utils.checkNotNull(grandparentKey, "grandparentKey");
        this.grandparentKey = Optional.ofNullable(grandparentKey);
        return this;
    }

    public GetOnDeckMetadata withGrandparentKey(Optional<String> grandparentKey) {
        Utils.checkNotNull(grandparentKey, "grandparentKey");
        this.grandparentKey = grandparentKey;
        return this;
    }

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

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

    public GetOnDeckMetadata withLibrarySectionKey(String librarySectionKey) {
        Utils.checkNotNull(librarySectionKey, "librarySectionKey");
        this.librarySectionKey = Optional.ofNullable(librarySectionKey);
        return this;
    }

    public GetOnDeckMetadata withLibrarySectionKey(Optional<String> librarySectionKey) {
        Utils.checkNotNull(librarySectionKey, "librarySectionKey");
        this.librarySectionKey = librarySectionKey;
        return this;
    }

    public GetOnDeckMetadata withGrandparentTitle(String grandparentTitle) {
        Utils.checkNotNull(grandparentTitle, "grandparentTitle");
        this.grandparentTitle = Optional.ofNullable(grandparentTitle);
        return this;
    }

    public GetOnDeckMetadata withGrandparentTitle(Optional<String> grandparentTitle) {
        Utils.checkNotNull(grandparentTitle, "grandparentTitle");
        this.grandparentTitle = grandparentTitle;
        return this;
    }

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

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

    public GetOnDeckMetadata withContentRating(String contentRating) {
        Utils.checkNotNull(contentRating, "contentRating");
        this.contentRating = Optional.ofNullable(contentRating);
        return this;
    }

    public GetOnDeckMetadata withContentRating(Optional<String> contentRating) {
        Utils.checkNotNull(contentRating, "contentRating");
        this.contentRating = contentRating;
        return this;
    }

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

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

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

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

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

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

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

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

    public GetOnDeckMetadata withYear(double year) {
        Utils.checkNotNull(year, "year");
        this.year = Optional.ofNullable(year);
        return this;
    }

    public GetOnDeckMetadata withYear(Optional<Double> year) {
        Utils.checkNotNull(year, "year");
        this.year = year;
        return this;
    }

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

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

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

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

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

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

    public GetOnDeckMetadata withGrandparentThumb(String grandparentThumb) {
        Utils.checkNotNull(grandparentThumb, "grandparentThumb");
        this.grandparentThumb = Optional.ofNullable(grandparentThumb);
        return this;
    }

    public GetOnDeckMetadata withGrandparentThumb(Optional<String> grandparentThumb) {
        Utils.checkNotNull(grandparentThumb, "grandparentThumb");
        this.grandparentThumb = grandparentThumb;
        return this;
    }

    public GetOnDeckMetadata withGrandparentArt(String grandparentArt) {
        Utils.checkNotNull(grandparentArt, "grandparentArt");
        this.grandparentArt = Optional.ofNullable(grandparentArt);
        return this;
    }

    public GetOnDeckMetadata withGrandparentArt(Optional<String> grandparentArt) {
        Utils.checkNotNull(grandparentArt, "grandparentArt");
        this.grandparentArt = grandparentArt;
        return this;
    }

    public GetOnDeckMetadata withGrandparentTheme(String grandparentTheme) {
        Utils.checkNotNull(grandparentTheme, "grandparentTheme");
        this.grandparentTheme = Optional.ofNullable(grandparentTheme);
        return this;
    }

    public GetOnDeckMetadata withGrandparentTheme(Optional<String> grandparentTheme) {
        Utils.checkNotNull(grandparentTheme, "grandparentTheme");
        this.grandparentTheme = grandparentTheme;
        return this;
    }

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

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

    public GetOnDeckMetadata withOriginallyAvailableAt(OffsetDateTime originallyAvailableAt) {
        Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
        this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
        return this;
    }

    public GetOnDeckMetadata withOriginallyAvailableAt(Optional<OffsetDateTime> originallyAvailableAt) {
        Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
        this.originallyAvailableAt = originallyAvailableAt;
        return this;
    }

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

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

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

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

    public GetOnDeckMetadata withMedia(List<GetOnDeckMedia> media) {
        Utils.checkNotNull(media, "media");
        this.media = Optional.ofNullable(media);
        return this;
    }

    public GetOnDeckMetadata withMedia(Optional<? extends List<GetOnDeckMedia>> media) {
        Utils.checkNotNull(media, "media");
        this.media = media;
        return this;
    }

    public GetOnDeckMetadata withGuids(List<GetOnDeckGuids> guids) {
        Utils.checkNotNull(guids, "guids");
        this.guids = Optional.ofNullable(guids);
        return this;
    }

    public GetOnDeckMetadata withGuids(Optional<? extends List<GetOnDeckGuids>> guids) {
        Utils.checkNotNull(guids, "guids");
        this.guids = guids;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetOnDeckMetadata other = (GetOnDeckMetadata) o;
        return 
            Objects.deepEquals(this.allowSync, other.allowSync) &&
            Objects.deepEquals(this.librarySectionID, other.librarySectionID) &&
            Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) &&
            Objects.deepEquals(this.librarySectionUUID, other.librarySectionUUID) &&
            Objects.deepEquals(this.ratingKey, other.ratingKey) &&
            Objects.deepEquals(this.key, other.key) &&
            Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) &&
            Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) &&
            Objects.deepEquals(this.guid, other.guid) &&
            Objects.deepEquals(this.parentGuid, other.parentGuid) &&
            Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) &&
            Objects.deepEquals(this.type, other.type) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.grandparentKey, other.grandparentKey) &&
            Objects.deepEquals(this.parentKey, other.parentKey) &&
            Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) &&
            Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) &&
            Objects.deepEquals(this.parentTitle, other.parentTitle) &&
            Objects.deepEquals(this.contentRating, other.contentRating) &&
            Objects.deepEquals(this.summary, other.summary) &&
            Objects.deepEquals(this.index, other.index) &&
            Objects.deepEquals(this.parentIndex, other.parentIndex) &&
            Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) &&
            Objects.deepEquals(this.year, other.year) &&
            Objects.deepEquals(this.thumb, other.thumb) &&
            Objects.deepEquals(this.art, other.art) &&
            Objects.deepEquals(this.parentThumb, other.parentThumb) &&
            Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) &&
            Objects.deepEquals(this.grandparentArt, other.grandparentArt) &&
            Objects.deepEquals(this.grandparentTheme, other.grandparentTheme) &&
            Objects.deepEquals(this.duration, other.duration) &&
            Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) &&
            Objects.deepEquals(this.addedAt, other.addedAt) &&
            Objects.deepEquals(this.updatedAt, other.updatedAt) &&
            Objects.deepEquals(this.media, other.media) &&
            Objects.deepEquals(this.guids, other.guids);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            allowSync,
            librarySectionID,
            librarySectionTitle,
            librarySectionUUID,
            ratingKey,
            key,
            parentRatingKey,
            grandparentRatingKey,
            guid,
            parentGuid,
            grandparentGuid,
            type,
            title,
            grandparentKey,
            parentKey,
            librarySectionKey,
            grandparentTitle,
            parentTitle,
            contentRating,
            summary,
            index,
            parentIndex,
            lastViewedAt,
            year,
            thumb,
            art,
            parentThumb,
            grandparentThumb,
            grandparentArt,
            grandparentTheme,
            duration,
            originallyAvailableAt,
            addedAt,
            updatedAt,
            media,
            guids);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetOnDeckMetadata.class,
                "allowSync", allowSync,
                "librarySectionID", librarySectionID,
                "librarySectionTitle", librarySectionTitle,
                "librarySectionUUID", librarySectionUUID,
                "ratingKey", ratingKey,
                "key", key,
                "parentRatingKey", parentRatingKey,
                "grandparentRatingKey", grandparentRatingKey,
                "guid", guid,
                "parentGuid", parentGuid,
                "grandparentGuid", grandparentGuid,
                "type", type,
                "title", title,
                "grandparentKey", grandparentKey,
                "parentKey", parentKey,
                "librarySectionKey", librarySectionKey,
                "grandparentTitle", grandparentTitle,
                "parentTitle", parentTitle,
                "contentRating", contentRating,
                "summary", summary,
                "index", index,
                "parentIndex", parentIndex,
                "lastViewedAt", lastViewedAt,
                "year", year,
                "thumb", thumb,
                "art", art,
                "parentThumb", parentThumb,
                "grandparentThumb", grandparentThumb,
                "grandparentArt", grandparentArt,
                "grandparentTheme", grandparentTheme,
                "duration", duration,
                "originallyAvailableAt", originallyAvailableAt,
                "addedAt", addedAt,
                "updatedAt", updatedAt,
                "media", media,
                "guids", guids);
    }
    
    public final static class Builder {
 
        private Optional<Boolean> allowSync = Optional.empty();
 
        private Optional<Double> librarySectionID = Optional.empty();
 
        private Optional<String> librarySectionTitle = Optional.empty();
 
        private Optional<String> librarySectionUUID = Optional.empty();
 
        private Optional<Double> ratingKey = Optional.empty();
 
        private Optional<String> key = Optional.empty();
 
        private Optional<Double> parentRatingKey = Optional.empty();
 
        private Optional<Double> grandparentRatingKey = Optional.empty();
 
        private Optional<String> guid = Optional.empty();
 
        private Optional<String> parentGuid = Optional.empty();
 
        private Optional<String> grandparentGuid = Optional.empty();
 
        private Optional<String> type = Optional.empty();
 
        private Optional<String> title = Optional.empty();
 
        private Optional<String> grandparentKey = Optional.empty();
 
        private Optional<String> parentKey = Optional.empty();
 
        private Optional<String> librarySectionKey = Optional.empty();
 
        private Optional<String> grandparentTitle = Optional.empty();
 
        private Optional<String> parentTitle = Optional.empty();
 
        private Optional<String> contentRating = Optional.empty();
 
        private Optional<String> summary = Optional.empty();
 
        private Optional<Double> index = Optional.empty();
 
        private Optional<Double> parentIndex = Optional.empty();
 
        private Optional<Double> lastViewedAt = Optional.empty();
 
        private Optional<Double> year = Optional.empty();
 
        private Optional<String> thumb = Optional.empty();
 
        private Optional<String> art = Optional.empty();
 
        private Optional<String> parentThumb = Optional.empty();
 
        private Optional<String> grandparentThumb = Optional.empty();
 
        private Optional<String> grandparentArt = Optional.empty();
 
        private Optional<String> grandparentTheme = Optional.empty();
 
        private Optional<Double> duration = Optional.empty();
 
        private Optional<OffsetDateTime> originallyAvailableAt = Optional.empty();
 
        private Optional<Double> addedAt = Optional.empty();
 
        private Optional<Double> updatedAt = Optional.empty();
 
        private Optional<? extends List<GetOnDeckMedia>> media = Optional.empty();
 
        private Optional<? extends List<GetOnDeckGuids>> guids = Optional.empty();  
        
        private Builder() {
          // force use of static builder() method
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public Builder media(Optional<? extends List<GetOnDeckMedia>> media) {
            Utils.checkNotNull(media, "media");
            this.media = media;
            return this;
        }

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

        public Builder guids(Optional<? extends List<GetOnDeckGuids>> guids) {
            Utils.checkNotNull(guids, "guids");
            this.guids = guids;
            return this;
        }
        
        public GetOnDeckMetadata build() {
            return new GetOnDeckMetadata(
                allowSync,
                librarySectionID,
                librarySectionTitle,
                librarySectionUUID,
                ratingKey,
                key,
                parentRatingKey,
                grandparentRatingKey,
                guid,
                parentGuid,
                grandparentGuid,
                type,
                title,
                grandparentKey,
                parentKey,
                librarySectionKey,
                grandparentTitle,
                parentTitle,
                contentRating,
                summary,
                index,
                parentIndex,
                lastViewedAt,
                year,
                thumb,
                art,
                parentThumb,
                grandparentThumb,
                grandparentArt,
                grandparentTheme,
                duration,
                originallyAvailableAt,
                addedAt,
                updatedAt,
                media,
                guids);
        }
    }
}

