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


public class GetLibraryItemsMetadata {

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

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

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

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

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

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

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

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

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

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

    @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("duration")
    private Optional<Integer> duration;

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

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

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

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

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

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

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

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

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

    @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("Media")
    private Optional<? extends List<GetLibraryItemsMedia>> media;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Genre")
    private Optional<? extends List<GetLibraryItemsGenre>> genre;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Country")
    private Optional<? extends List<GetLibraryItemsCountry>> country;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Director")
    private Optional<? extends List<GetLibraryItemsDirector>> director;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Writer")
    private Optional<? extends List<GetLibraryItemsWriter>> writer;

    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Role")
    private Optional<? extends List<GetLibraryItemsRole>> role;

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

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

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

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

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

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

    @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("childCount")
    private Optional<Integer> childCount;

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

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

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

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

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

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

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

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

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

    @JsonCreator
    public GetLibraryItemsMetadata(
            @JsonProperty("ratingKey") Optional<String> ratingKey,
            @JsonProperty("key") Optional<String> key,
            @JsonProperty("guid") Optional<String> guid,
            @JsonProperty("studio") Optional<String> studio,
            @JsonProperty("type") Optional<String> type,
            @JsonProperty("title") Optional<String> title,
            @JsonProperty("contentRating") Optional<String> contentRating,
            @JsonProperty("summary") Optional<String> summary,
            @JsonProperty("rating") Optional<Double> rating,
            @JsonProperty("audienceRating") Optional<Double> audienceRating,
            @JsonProperty("year") Optional<Integer> year,
            @JsonProperty("tagline") Optional<String> tagline,
            @JsonProperty("thumb") Optional<String> thumb,
            @JsonProperty("art") Optional<String> art,
            @JsonProperty("duration") Optional<Integer> duration,
            @JsonProperty("originallyAvailableAt") Optional<LocalDate> originallyAvailableAt,
            @JsonProperty("addedAt") Optional<Integer> addedAt,
            @JsonProperty("updatedAt") Optional<Integer> updatedAt,
            @JsonProperty("audienceRatingImage") Optional<String> audienceRatingImage,
            @JsonProperty("chapterSource") Optional<String> chapterSource,
            @JsonProperty("primaryExtraKey") Optional<String> primaryExtraKey,
            @JsonProperty("ratingImage") Optional<String> ratingImage,
            @JsonProperty("grandparentRatingKey") Optional<String> grandparentRatingKey,
            @JsonProperty("grandparentGuid") Optional<String> grandparentGuid,
            @JsonProperty("grandparentKey") Optional<String> grandparentKey,
            @JsonProperty("grandparentTitle") Optional<String> grandparentTitle,
            @JsonProperty("grandparentThumb") Optional<String> grandparentThumb,
            @JsonProperty("grandparentArt") Optional<String> grandparentArt,
            @JsonProperty("grandparentTheme") Optional<String> grandparentTheme,
            @JsonProperty("Media") Optional<? extends List<GetLibraryItemsMedia>> media,
            @JsonProperty("Genre") Optional<? extends List<GetLibraryItemsGenre>> genre,
            @JsonProperty("Country") Optional<? extends List<GetLibraryItemsCountry>> country,
            @JsonProperty("Director") Optional<? extends List<GetLibraryItemsDirector>> director,
            @JsonProperty("Writer") Optional<? extends List<GetLibraryItemsWriter>> writer,
            @JsonProperty("Role") Optional<? extends List<GetLibraryItemsRole>> role,
            @JsonProperty("titleSort") Optional<String> titleSort,
            @JsonProperty("viewCount") Optional<Integer> viewCount,
            @JsonProperty("lastViewedAt") Optional<Integer> lastViewedAt,
            @JsonProperty("originalTitle") Optional<String> originalTitle,
            @JsonProperty("viewOffset") Optional<Integer> viewOffset,
            @JsonProperty("skipCount") Optional<Integer> skipCount,
            @JsonProperty("index") Optional<Integer> index,
            @JsonProperty("theme") Optional<String> theme,
            @JsonProperty("leafCount") Optional<Integer> leafCount,
            @JsonProperty("viewedLeafCount") Optional<Integer> viewedLeafCount,
            @JsonProperty("childCount") Optional<Integer> childCount,
            @JsonProperty("hasPremiumExtras") Optional<String> hasPremiumExtras,
            @JsonProperty("hasPremiumPrimaryExtra") Optional<String> hasPremiumPrimaryExtra,
            @JsonProperty("parentRatingKey") Optional<String> parentRatingKey,
            @JsonProperty("parentGuid") Optional<String> parentGuid,
            @JsonProperty("parentStudio") Optional<String> parentStudio,
            @JsonProperty("parentKey") Optional<String> parentKey,
            @JsonProperty("parentTitle") Optional<String> parentTitle,
            @JsonProperty("parentIndex") Optional<Integer> parentIndex,
            @JsonProperty("parentYear") Optional<Integer> parentYear,
            @JsonProperty("parentThumb") Optional<String> parentThumb,
            @JsonProperty("parentTheme") Optional<String> parentTheme) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        Utils.checkNotNull(key, "key");
        Utils.checkNotNull(guid, "guid");
        Utils.checkNotNull(studio, "studio");
        Utils.checkNotNull(type, "type");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(contentRating, "contentRating");
        Utils.checkNotNull(summary, "summary");
        Utils.checkNotNull(rating, "rating");
        Utils.checkNotNull(audienceRating, "audienceRating");
        Utils.checkNotNull(year, "year");
        Utils.checkNotNull(tagline, "tagline");
        Utils.checkNotNull(thumb, "thumb");
        Utils.checkNotNull(art, "art");
        Utils.checkNotNull(duration, "duration");
        Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
        Utils.checkNotNull(addedAt, "addedAt");
        Utils.checkNotNull(updatedAt, "updatedAt");
        Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
        Utils.checkNotNull(chapterSource, "chapterSource");
        Utils.checkNotNull(primaryExtraKey, "primaryExtraKey");
        Utils.checkNotNull(ratingImage, "ratingImage");
        Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
        Utils.checkNotNull(grandparentGuid, "grandparentGuid");
        Utils.checkNotNull(grandparentKey, "grandparentKey");
        Utils.checkNotNull(grandparentTitle, "grandparentTitle");
        Utils.checkNotNull(grandparentThumb, "grandparentThumb");
        Utils.checkNotNull(grandparentArt, "grandparentArt");
        Utils.checkNotNull(grandparentTheme, "grandparentTheme");
        Utils.checkNotNull(media, "media");
        Utils.checkNotNull(genre, "genre");
        Utils.checkNotNull(country, "country");
        Utils.checkNotNull(director, "director");
        Utils.checkNotNull(writer, "writer");
        Utils.checkNotNull(role, "role");
        Utils.checkNotNull(titleSort, "titleSort");
        Utils.checkNotNull(viewCount, "viewCount");
        Utils.checkNotNull(lastViewedAt, "lastViewedAt");
        Utils.checkNotNull(originalTitle, "originalTitle");
        Utils.checkNotNull(viewOffset, "viewOffset");
        Utils.checkNotNull(skipCount, "skipCount");
        Utils.checkNotNull(index, "index");
        Utils.checkNotNull(theme, "theme");
        Utils.checkNotNull(leafCount, "leafCount");
        Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
        Utils.checkNotNull(childCount, "childCount");
        Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras");
        Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra");
        Utils.checkNotNull(parentRatingKey, "parentRatingKey");
        Utils.checkNotNull(parentGuid, "parentGuid");
        Utils.checkNotNull(parentStudio, "parentStudio");
        Utils.checkNotNull(parentKey, "parentKey");
        Utils.checkNotNull(parentTitle, "parentTitle");
        Utils.checkNotNull(parentIndex, "parentIndex");
        Utils.checkNotNull(parentYear, "parentYear");
        Utils.checkNotNull(parentThumb, "parentThumb");
        Utils.checkNotNull(parentTheme, "parentTheme");
        this.ratingKey = ratingKey;
        this.key = key;
        this.guid = guid;
        this.studio = studio;
        this.type = type;
        this.title = title;
        this.contentRating = contentRating;
        this.summary = summary;
        this.rating = rating;
        this.audienceRating = audienceRating;
        this.year = year;
        this.tagline = tagline;
        this.thumb = thumb;
        this.art = art;
        this.duration = duration;
        this.originallyAvailableAt = originallyAvailableAt;
        this.addedAt = addedAt;
        this.updatedAt = updatedAt;
        this.audienceRatingImage = audienceRatingImage;
        this.chapterSource = chapterSource;
        this.primaryExtraKey = primaryExtraKey;
        this.ratingImage = ratingImage;
        this.grandparentRatingKey = grandparentRatingKey;
        this.grandparentGuid = grandparentGuid;
        this.grandparentKey = grandparentKey;
        this.grandparentTitle = grandparentTitle;
        this.grandparentThumb = grandparentThumb;
        this.grandparentArt = grandparentArt;
        this.grandparentTheme = grandparentTheme;
        this.media = media;
        this.genre = genre;
        this.country = country;
        this.director = director;
        this.writer = writer;
        this.role = role;
        this.titleSort = titleSort;
        this.viewCount = viewCount;
        this.lastViewedAt = lastViewedAt;
        this.originalTitle = originalTitle;
        this.viewOffset = viewOffset;
        this.skipCount = skipCount;
        this.index = index;
        this.theme = theme;
        this.leafCount = leafCount;
        this.viewedLeafCount = viewedLeafCount;
        this.childCount = childCount;
        this.hasPremiumExtras = hasPremiumExtras;
        this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra;
        this.parentRatingKey = parentRatingKey;
        this.parentGuid = parentGuid;
        this.parentStudio = parentStudio;
        this.parentKey = parentKey;
        this.parentTitle = parentTitle;
        this.parentIndex = parentIndex;
        this.parentYear = parentYear;
        this.parentThumb = parentThumb;
        this.parentTheme = parentTheme;
    }
    
    public GetLibraryItemsMetadata() {
        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(), 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> guid() {
        return guid;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    public GetLibraryItemsMetadata withStudio(String studio) {
        Utils.checkNotNull(studio, "studio");
        this.studio = Optional.ofNullable(studio);
        return this;
    }

    public GetLibraryItemsMetadata withStudio(Optional<String> studio) {
        Utils.checkNotNull(studio, "studio");
        this.studio = studio;
        return this;
    }

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

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

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

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

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

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

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

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

    public GetLibraryItemsMetadata withRating(double rating) {
        Utils.checkNotNull(rating, "rating");
        this.rating = Optional.ofNullable(rating);
        return this;
    }

    public GetLibraryItemsMetadata withRating(Optional<Double> rating) {
        Utils.checkNotNull(rating, "rating");
        this.rating = rating;
        return this;
    }

    public GetLibraryItemsMetadata withAudienceRating(double audienceRating) {
        Utils.checkNotNull(audienceRating, "audienceRating");
        this.audienceRating = Optional.ofNullable(audienceRating);
        return this;
    }

    public GetLibraryItemsMetadata withAudienceRating(Optional<Double> audienceRating) {
        Utils.checkNotNull(audienceRating, "audienceRating");
        this.audienceRating = audienceRating;
        return this;
    }

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

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

    public GetLibraryItemsMetadata withTagline(String tagline) {
        Utils.checkNotNull(tagline, "tagline");
        this.tagline = Optional.ofNullable(tagline);
        return this;
    }

    public GetLibraryItemsMetadata withTagline(Optional<String> tagline) {
        Utils.checkNotNull(tagline, "tagline");
        this.tagline = tagline;
        return this;
    }

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

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

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

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

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

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

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

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

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

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

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

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

    public GetLibraryItemsMetadata withAudienceRatingImage(String audienceRatingImage) {
        Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
        this.audienceRatingImage = Optional.ofNullable(audienceRatingImage);
        return this;
    }

    public GetLibraryItemsMetadata withAudienceRatingImage(Optional<String> audienceRatingImage) {
        Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
        this.audienceRatingImage = audienceRatingImage;
        return this;
    }

    public GetLibraryItemsMetadata withChapterSource(String chapterSource) {
        Utils.checkNotNull(chapterSource, "chapterSource");
        this.chapterSource = Optional.ofNullable(chapterSource);
        return this;
    }

    public GetLibraryItemsMetadata withChapterSource(Optional<String> chapterSource) {
        Utils.checkNotNull(chapterSource, "chapterSource");
        this.chapterSource = chapterSource;
        return this;
    }

    public GetLibraryItemsMetadata withPrimaryExtraKey(String primaryExtraKey) {
        Utils.checkNotNull(primaryExtraKey, "primaryExtraKey");
        this.primaryExtraKey = Optional.ofNullable(primaryExtraKey);
        return this;
    }

    public GetLibraryItemsMetadata withPrimaryExtraKey(Optional<String> primaryExtraKey) {
        Utils.checkNotNull(primaryExtraKey, "primaryExtraKey");
        this.primaryExtraKey = primaryExtraKey;
        return this;
    }

    public GetLibraryItemsMetadata withRatingImage(String ratingImage) {
        Utils.checkNotNull(ratingImage, "ratingImage");
        this.ratingImage = Optional.ofNullable(ratingImage);
        return this;
    }

    public GetLibraryItemsMetadata withRatingImage(Optional<String> ratingImage) {
        Utils.checkNotNull(ratingImage, "ratingImage");
        this.ratingImage = ratingImage;
        return this;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    public GetLibraryItemsMetadata withGenre(List<GetLibraryItemsGenre> genre) {
        Utils.checkNotNull(genre, "genre");
        this.genre = Optional.ofNullable(genre);
        return this;
    }

    public GetLibraryItemsMetadata withGenre(Optional<? extends List<GetLibraryItemsGenre>> genre) {
        Utils.checkNotNull(genre, "genre");
        this.genre = genre;
        return this;
    }

    public GetLibraryItemsMetadata withCountry(List<GetLibraryItemsCountry> country) {
        Utils.checkNotNull(country, "country");
        this.country = Optional.ofNullable(country);
        return this;
    }

    public GetLibraryItemsMetadata withCountry(Optional<? extends List<GetLibraryItemsCountry>> country) {
        Utils.checkNotNull(country, "country");
        this.country = country;
        return this;
    }

    public GetLibraryItemsMetadata withDirector(List<GetLibraryItemsDirector> director) {
        Utils.checkNotNull(director, "director");
        this.director = Optional.ofNullable(director);
        return this;
    }

    public GetLibraryItemsMetadata withDirector(Optional<? extends List<GetLibraryItemsDirector>> director) {
        Utils.checkNotNull(director, "director");
        this.director = director;
        return this;
    }

    public GetLibraryItemsMetadata withWriter(List<GetLibraryItemsWriter> writer) {
        Utils.checkNotNull(writer, "writer");
        this.writer = Optional.ofNullable(writer);
        return this;
    }

    public GetLibraryItemsMetadata withWriter(Optional<? extends List<GetLibraryItemsWriter>> writer) {
        Utils.checkNotNull(writer, "writer");
        this.writer = writer;
        return this;
    }

    public GetLibraryItemsMetadata withRole(List<GetLibraryItemsRole> role) {
        Utils.checkNotNull(role, "role");
        this.role = Optional.ofNullable(role);
        return this;
    }

    public GetLibraryItemsMetadata withRole(Optional<? extends List<GetLibraryItemsRole>> role) {
        Utils.checkNotNull(role, "role");
        this.role = role;
        return this;
    }

    public GetLibraryItemsMetadata withTitleSort(String titleSort) {
        Utils.checkNotNull(titleSort, "titleSort");
        this.titleSort = Optional.ofNullable(titleSort);
        return this;
    }

    public GetLibraryItemsMetadata withTitleSort(Optional<String> titleSort) {
        Utils.checkNotNull(titleSort, "titleSort");
        this.titleSort = titleSort;
        return this;
    }

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

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

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

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

    public GetLibraryItemsMetadata withOriginalTitle(String originalTitle) {
        Utils.checkNotNull(originalTitle, "originalTitle");
        this.originalTitle = Optional.ofNullable(originalTitle);
        return this;
    }

    public GetLibraryItemsMetadata withOriginalTitle(Optional<String> originalTitle) {
        Utils.checkNotNull(originalTitle, "originalTitle");
        this.originalTitle = originalTitle;
        return this;
    }

    public GetLibraryItemsMetadata withViewOffset(int viewOffset) {
        Utils.checkNotNull(viewOffset, "viewOffset");
        this.viewOffset = Optional.ofNullable(viewOffset);
        return this;
    }

    public GetLibraryItemsMetadata withViewOffset(Optional<Integer> viewOffset) {
        Utils.checkNotNull(viewOffset, "viewOffset");
        this.viewOffset = viewOffset;
        return this;
    }

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

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

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

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

    public GetLibraryItemsMetadata withTheme(String theme) {
        Utils.checkNotNull(theme, "theme");
        this.theme = Optional.ofNullable(theme);
        return this;
    }

    public GetLibraryItemsMetadata withTheme(Optional<String> theme) {
        Utils.checkNotNull(theme, "theme");
        this.theme = theme;
        return this;
    }

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

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

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

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

    public GetLibraryItemsMetadata withChildCount(int childCount) {
        Utils.checkNotNull(childCount, "childCount");
        this.childCount = Optional.ofNullable(childCount);
        return this;
    }

    public GetLibraryItemsMetadata withChildCount(Optional<Integer> childCount) {
        Utils.checkNotNull(childCount, "childCount");
        this.childCount = childCount;
        return this;
    }

    public GetLibraryItemsMetadata withHasPremiumExtras(String hasPremiumExtras) {
        Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras");
        this.hasPremiumExtras = Optional.ofNullable(hasPremiumExtras);
        return this;
    }

    public GetLibraryItemsMetadata withHasPremiumExtras(Optional<String> hasPremiumExtras) {
        Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras");
        this.hasPremiumExtras = hasPremiumExtras;
        return this;
    }

    public GetLibraryItemsMetadata withHasPremiumPrimaryExtra(String hasPremiumPrimaryExtra) {
        Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra");
        this.hasPremiumPrimaryExtra = Optional.ofNullable(hasPremiumPrimaryExtra);
        return this;
    }

    public GetLibraryItemsMetadata withHasPremiumPrimaryExtra(Optional<String> hasPremiumPrimaryExtra) {
        Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra");
        this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra;
        return this;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    public GetLibraryItemsMetadata withParentTheme(Optional<String> parentTheme) {
        Utils.checkNotNull(parentTheme, "parentTheme");
        this.parentTheme = parentTheme;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetLibraryItemsMetadata other = (GetLibraryItemsMetadata) o;
        return 
            Objects.deepEquals(this.ratingKey, other.ratingKey) &&
            Objects.deepEquals(this.key, other.key) &&
            Objects.deepEquals(this.guid, other.guid) &&
            Objects.deepEquals(this.studio, other.studio) &&
            Objects.deepEquals(this.type, other.type) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.contentRating, other.contentRating) &&
            Objects.deepEquals(this.summary, other.summary) &&
            Objects.deepEquals(this.rating, other.rating) &&
            Objects.deepEquals(this.audienceRating, other.audienceRating) &&
            Objects.deepEquals(this.year, other.year) &&
            Objects.deepEquals(this.tagline, other.tagline) &&
            Objects.deepEquals(this.thumb, other.thumb) &&
            Objects.deepEquals(this.art, other.art) &&
            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.audienceRatingImage, other.audienceRatingImage) &&
            Objects.deepEquals(this.chapterSource, other.chapterSource) &&
            Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) &&
            Objects.deepEquals(this.ratingImage, other.ratingImage) &&
            Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) &&
            Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) &&
            Objects.deepEquals(this.grandparentKey, other.grandparentKey) &&
            Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) &&
            Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) &&
            Objects.deepEquals(this.grandparentArt, other.grandparentArt) &&
            Objects.deepEquals(this.grandparentTheme, other.grandparentTheme) &&
            Objects.deepEquals(this.media, other.media) &&
            Objects.deepEquals(this.genre, other.genre) &&
            Objects.deepEquals(this.country, other.country) &&
            Objects.deepEquals(this.director, other.director) &&
            Objects.deepEquals(this.writer, other.writer) &&
            Objects.deepEquals(this.role, other.role) &&
            Objects.deepEquals(this.titleSort, other.titleSort) &&
            Objects.deepEquals(this.viewCount, other.viewCount) &&
            Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) &&
            Objects.deepEquals(this.originalTitle, other.originalTitle) &&
            Objects.deepEquals(this.viewOffset, other.viewOffset) &&
            Objects.deepEquals(this.skipCount, other.skipCount) &&
            Objects.deepEquals(this.index, other.index) &&
            Objects.deepEquals(this.theme, other.theme) &&
            Objects.deepEquals(this.leafCount, other.leafCount) &&
            Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) &&
            Objects.deepEquals(this.childCount, other.childCount) &&
            Objects.deepEquals(this.hasPremiumExtras, other.hasPremiumExtras) &&
            Objects.deepEquals(this.hasPremiumPrimaryExtra, other.hasPremiumPrimaryExtra) &&
            Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) &&
            Objects.deepEquals(this.parentGuid, other.parentGuid) &&
            Objects.deepEquals(this.parentStudio, other.parentStudio) &&
            Objects.deepEquals(this.parentKey, other.parentKey) &&
            Objects.deepEquals(this.parentTitle, other.parentTitle) &&
            Objects.deepEquals(this.parentIndex, other.parentIndex) &&
            Objects.deepEquals(this.parentYear, other.parentYear) &&
            Objects.deepEquals(this.parentThumb, other.parentThumb) &&
            Objects.deepEquals(this.parentTheme, other.parentTheme);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            ratingKey,
            key,
            guid,
            studio,
            type,
            title,
            contentRating,
            summary,
            rating,
            audienceRating,
            year,
            tagline,
            thumb,
            art,
            duration,
            originallyAvailableAt,
            addedAt,
            updatedAt,
            audienceRatingImage,
            chapterSource,
            primaryExtraKey,
            ratingImage,
            grandparentRatingKey,
            grandparentGuid,
            grandparentKey,
            grandparentTitle,
            grandparentThumb,
            grandparentArt,
            grandparentTheme,
            media,
            genre,
            country,
            director,
            writer,
            role,
            titleSort,
            viewCount,
            lastViewedAt,
            originalTitle,
            viewOffset,
            skipCount,
            index,
            theme,
            leafCount,
            viewedLeafCount,
            childCount,
            hasPremiumExtras,
            hasPremiumPrimaryExtra,
            parentRatingKey,
            parentGuid,
            parentStudio,
            parentKey,
            parentTitle,
            parentIndex,
            parentYear,
            parentThumb,
            parentTheme);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetLibraryItemsMetadata.class,
                "ratingKey", ratingKey,
                "key", key,
                "guid", guid,
                "studio", studio,
                "type", type,
                "title", title,
                "contentRating", contentRating,
                "summary", summary,
                "rating", rating,
                "audienceRating", audienceRating,
                "year", year,
                "tagline", tagline,
                "thumb", thumb,
                "art", art,
                "duration", duration,
                "originallyAvailableAt", originallyAvailableAt,
                "addedAt", addedAt,
                "updatedAt", updatedAt,
                "audienceRatingImage", audienceRatingImage,
                "chapterSource", chapterSource,
                "primaryExtraKey", primaryExtraKey,
                "ratingImage", ratingImage,
                "grandparentRatingKey", grandparentRatingKey,
                "grandparentGuid", grandparentGuid,
                "grandparentKey", grandparentKey,
                "grandparentTitle", grandparentTitle,
                "grandparentThumb", grandparentThumb,
                "grandparentArt", grandparentArt,
                "grandparentTheme", grandparentTheme,
                "media", media,
                "genre", genre,
                "country", country,
                "director", director,
                "writer", writer,
                "role", role,
                "titleSort", titleSort,
                "viewCount", viewCount,
                "lastViewedAt", lastViewedAt,
                "originalTitle", originalTitle,
                "viewOffset", viewOffset,
                "skipCount", skipCount,
                "index", index,
                "theme", theme,
                "leafCount", leafCount,
                "viewedLeafCount", viewedLeafCount,
                "childCount", childCount,
                "hasPremiumExtras", hasPremiumExtras,
                "hasPremiumPrimaryExtra", hasPremiumPrimaryExtra,
                "parentRatingKey", parentRatingKey,
                "parentGuid", parentGuid,
                "parentStudio", parentStudio,
                "parentKey", parentKey,
                "parentTitle", parentTitle,
                "parentIndex", parentIndex,
                "parentYear", parentYear,
                "parentThumb", parentThumb,
                "parentTheme", parentTheme);
    }
    
    public final static class Builder {
 
        private Optional<String> ratingKey = Optional.empty();
 
        private Optional<String> key = Optional.empty();
 
        private Optional<String> guid = Optional.empty();
 
        private Optional<String> studio = Optional.empty();
 
        private Optional<String> type = Optional.empty();
 
        private Optional<String> title = Optional.empty();
 
        private Optional<String> contentRating = Optional.empty();
 
        private Optional<String> summary = Optional.empty();
 
        private Optional<Double> rating = Optional.empty();
 
        private Optional<Double> audienceRating = Optional.empty();
 
        private Optional<Integer> year = Optional.empty();
 
        private Optional<String> tagline = Optional.empty();
 
        private Optional<String> thumb = Optional.empty();
 
        private Optional<String> art = Optional.empty();
 
        private Optional<Integer> duration = Optional.empty();
 
        private Optional<LocalDate> originallyAvailableAt = Optional.empty();
 
        private Optional<Integer> addedAt = Optional.empty();
 
        private Optional<Integer> updatedAt = Optional.empty();
 
        private Optional<String> audienceRatingImage = Optional.empty();
 
        private Optional<String> chapterSource = Optional.empty();
 
        private Optional<String> primaryExtraKey = Optional.empty();
 
        private Optional<String> ratingImage = Optional.empty();
 
        private Optional<String> grandparentRatingKey = Optional.empty();
 
        private Optional<String> grandparentGuid = Optional.empty();
 
        private Optional<String> grandparentKey = Optional.empty();
 
        private Optional<String> grandparentTitle = Optional.empty();
 
        private Optional<String> grandparentThumb = Optional.empty();
 
        private Optional<String> grandparentArt = Optional.empty();
 
        private Optional<String> grandparentTheme = Optional.empty();
 
        private Optional<? extends List<GetLibraryItemsMedia>> media = Optional.empty();
 
        private Optional<? extends List<GetLibraryItemsGenre>> genre = Optional.empty();
 
        private Optional<? extends List<GetLibraryItemsCountry>> country = Optional.empty();
 
        private Optional<? extends List<GetLibraryItemsDirector>> director = Optional.empty();
 
        private Optional<? extends List<GetLibraryItemsWriter>> writer = Optional.empty();
 
        private Optional<? extends List<GetLibraryItemsRole>> role = Optional.empty();
 
        private Optional<String> titleSort = Optional.empty();
 
        private Optional<Integer> viewCount = Optional.empty();
 
        private Optional<Integer> lastViewedAt = Optional.empty();
 
        private Optional<String> originalTitle = Optional.empty();
 
        private Optional<Integer> viewOffset = Optional.empty();
 
        private Optional<Integer> skipCount = Optional.empty();
 
        private Optional<Integer> index = Optional.empty();
 
        private Optional<String> theme = Optional.empty();
 
        private Optional<Integer> leafCount = Optional.empty();
 
        private Optional<Integer> viewedLeafCount = Optional.empty();
 
        private Optional<Integer> childCount = Optional.empty();
 
        private Optional<String> hasPremiumExtras = Optional.empty();
 
        private Optional<String> hasPremiumPrimaryExtra = Optional.empty();
 
        private Optional<String> parentRatingKey = Optional.empty();
 
        private Optional<String> parentGuid = Optional.empty();
 
        private Optional<String> parentStudio = Optional.empty();
 
        private Optional<String> parentKey = Optional.empty();
 
        private Optional<String> parentTitle = Optional.empty();
 
        private Optional<Integer> parentIndex = Optional.empty();
 
        private Optional<Integer> parentYear = Optional.empty();
 
        private Optional<String> parentThumb = Optional.empty();
 
        private Optional<String> parentTheme = 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 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 studio(String studio) {
            Utils.checkNotNull(studio, "studio");
            this.studio = Optional.ofNullable(studio);
            return this;
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public Builder hasPremiumPrimaryExtra(Optional<String> hasPremiumPrimaryExtra) {
            Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra");
            this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra;
            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 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 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 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 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 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 GetLibraryItemsMetadata build() {
            return new GetLibraryItemsMetadata(
                ratingKey,
                key,
                guid,
                studio,
                type,
                title,
                contentRating,
                summary,
                rating,
                audienceRating,
                year,
                tagline,
                thumb,
                art,
                duration,
                originallyAvailableAt,
                addedAt,
                updatedAt,
                audienceRatingImage,
                chapterSource,
                primaryExtraKey,
                ratingImage,
                grandparentRatingKey,
                grandparentGuid,
                grandparentKey,
                grandparentTitle,
                grandparentThumb,
                grandparentArt,
                grandparentTheme,
                media,
                genre,
                country,
                director,
                writer,
                role,
                titleSort,
                viewCount,
                lastViewedAt,
                originalTitle,
                viewOffset,
                skipCount,
                index,
                theme,
                leafCount,
                viewedLeafCount,
                childCount,
                hasPremiumExtras,
                hasPremiumPrimaryExtra,
                parentRatingKey,
                parentGuid,
                parentStudio,
                parentKey,
                parentTitle,
                parentIndex,
                parentYear,
                parentThumb,
                parentTheme);
        }
    }
}

