/* 
 * 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.Float;
import java.lang.Integer;
import java.lang.Long;
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 GetMediaMetaDataMetadata {

    /**
     * The rating key of the metadata item.
     */
    @JsonProperty("ratingKey")
    private String ratingKey;

    /**
     * The rating key of the parent of this metadata item.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("parentRatingKey")
    private Optional<String> parentRatingKey;

    /**
     * The rating key of the grandparent of this metadata item.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("grandparentRatingKey")
    private Optional<String> grandparentRatingKey;

    /**
     * A GUID identifying the parent entity (e.g., season) for the item.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("parentGuid")
    private Optional<String> parentGuid;

    /**
     * A GUID identifying the grandparent entity (e.g., show).
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("grandparentGuid")
    private Optional<String> grandparentGuid;

    /**
     * A URL-friendly identifier (slug) for the grandparent entity.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("grandparentSlug")
    private Optional<String> grandparentSlug;

    /**
     * A key identifying the grandparent metadata in the library.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("grandparentKey")
    private Optional<String> grandparentKey;

    /**
     * A key identifying the parent metadata in the library.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("parentKey")
    private Optional<String> parentKey;

    /**
     * The API key to access metadata details.
     */
    @JsonProperty("key")
    private String key;

    /**
     * The globally unique identifier for the item.
     */
    @JsonProperty("guid")
    private String guid;

    /**
     * A URL-friendly identifier for the item.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("slug")
    private Optional<String> slug;

    /**
     * The studio that produced the content.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("studio")
    private Optional<String> studio;

    /**
     * The type of content (e.g., show, movie).
     */
    @JsonProperty("type")
    private String type;

    /**
     * The title of the content.
     */
    @JsonProperty("title")
    private String title;

    /**
     * The original title of the content.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("originalTitle")
    private Optional<String> originalTitle;

    /**
     * The title of the library section.
     */
    @JsonProperty("librarySectionTitle")
    private String librarySectionTitle;

    /**
     * The ID of the library section.
     */
    @JsonProperty("librarySectionID")
    private long librarySectionID;

    /**
     * The key of the library section.
     */
    @JsonProperty("librarySectionKey")
    private String librarySectionKey;

    /**
     * The content rating (e.g., TV-MA).
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("contentRating")
    private Optional<String> contentRating;

    /**
     * A summary of the content.
     */
    @JsonProperty("summary")
    private String summary;

    /**
     * The index or order of the item.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("index")
    private Optional<Long> index;

    /**
     * The title of the grandparent entity (typically the show's title).
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("grandparentTitle")
    private Optional<String> grandparentTitle;

    /**
     * The title of the parent entity (typically the season's title).
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("parentTitle")
    private Optional<String> parentTitle;

    /**
     * The audience rating for the content.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("audienceRating")
    private Optional<Float> audienceRating;

    /**
     * The number of times the item has been viewed.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("viewCount")
    private Optional<Long> viewCount;

    /**
     * The number of times the item has been skipped.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("skipCount")
    private Optional<Long> skipCount;

    /**
     * Unix timestamp of when the item was last viewed.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("lastViewedAt")
    private Optional<Long> lastViewedAt;

    /**
     * The release year.
     */
    @JsonProperty("year")
    private int year;

    /**
     * The general rating
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("rating")
    private Optional<Float> rating;

    /**
     * The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("ratingImage")
    private Optional<String> ratingImage;

    /**
     * The tagline of the content.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("tagline")
    private Optional<String> tagline;

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

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

    /**
     * URL of the thumbnail image.
     */
    @JsonProperty("thumb")
    private String thumb;

    /**
     * URL of the art image.
     */
    @JsonProperty("art")
    private String art;

    /**
     * URL of the theme image.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("theme")
    private Optional<String> theme;

    /**
     * Duration of the content in milliseconds.
     */
    @JsonProperty("duration")
    private int duration;

    /**
     * The original release date.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("originallyAvailableAt")
    private Optional<LocalDate> originallyAvailableAt;

    /**
     * The total number of episodes (or leaves).
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("leafCount")
    private Optional<Long> leafCount;

    /**
     * The number of episodes that have been viewed.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("viewedLeafCount")
    private Optional<Long> viewedLeafCount;

    /**
     * The number of child items.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("childCount")
    private Optional<Integer> childCount;

    @JsonProperty("addedAt")
    private long addedAt;

    @JsonProperty("updatedAt")
    private long updatedAt;

    /**
     * The URL for the audience rating image.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("audienceRatingImage")
    private Optional<String> audienceRatingImage;

    /**
     * The index number of the parent entity, which could indicate its order or position.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("parentIndex")
    private Optional<Long> parentIndex;

    /**
     * The URL of the parent's thumbnail image.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("parentThumb")
    private Optional<String> parentThumb;

    /**
     * The URL of the grandparent's thumbnail image.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("grandparentThumb")
    private Optional<String> grandparentThumb;

    /**
     * The URL of the grandparent's art image.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("grandparentArt")
    private Optional<String> grandparentArt;

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

    /**
     * An array of image objects.
     */
    @JsonProperty("Image")
    private List<GetMediaMetaDataImage> image;

    @JsonProperty("UltraBlurColors")
    private GetMediaMetaDataUltraBlurColors ultraBlurColors;

    /**
     * An array of genre tags.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Genre")
    private Optional<? extends List<GetMediaMetaDataGenre>> genre;

    /**
     * An array of country tags.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Country")
    private Optional<? extends List<GetMediaMetaDataCountry>> country;

    /**
     * An array of GUID objects.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Guid")
    private Optional<? extends List<GetMediaMetaDataGuids>> guids;

    /**
     * An array of rating objects.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Rating")
    private Optional<? extends List<Ratings>> ratings;

    /**
     * An array of Actor roles.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Role")
    private Optional<? extends List<GetMediaMetaDataRole>> role;

    /**
     * An array of Director roles.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Director")
    private Optional<? extends List<GetMediaMetaDataDirector>> director;

    /**
     * An array of Writer roles.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Writer")
    private Optional<? extends List<GetMediaMetaDataWriter>> writer;

    /**
     * An array of Writer roles.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Producer")
    private Optional<? extends List<Producer>> producer;

    /**
     * An array of similar content objects.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Similar")
    private Optional<? extends List<Similar>> similar;

    /**
     * An array of location objects.
     */
    @JsonInclude(Include.NON_ABSENT)
    @JsonProperty("Location")
    private Optional<? extends List<GetMediaMetaDataLocation>> location;

    @JsonCreator
    public GetMediaMetaDataMetadata(
            @JsonProperty("ratingKey") String ratingKey,
            @JsonProperty("parentRatingKey") Optional<String> parentRatingKey,
            @JsonProperty("grandparentRatingKey") Optional<String> grandparentRatingKey,
            @JsonProperty("parentGuid") Optional<String> parentGuid,
            @JsonProperty("grandparentGuid") Optional<String> grandparentGuid,
            @JsonProperty("grandparentSlug") Optional<String> grandparentSlug,
            @JsonProperty("grandparentKey") Optional<String> grandparentKey,
            @JsonProperty("parentKey") Optional<String> parentKey,
            @JsonProperty("key") String key,
            @JsonProperty("guid") String guid,
            @JsonProperty("slug") Optional<String> slug,
            @JsonProperty("studio") Optional<String> studio,
            @JsonProperty("type") String type,
            @JsonProperty("title") String title,
            @JsonProperty("originalTitle") Optional<String> originalTitle,
            @JsonProperty("librarySectionTitle") String librarySectionTitle,
            @JsonProperty("librarySectionID") long librarySectionID,
            @JsonProperty("librarySectionKey") String librarySectionKey,
            @JsonProperty("contentRating") Optional<String> contentRating,
            @JsonProperty("summary") String summary,
            @JsonProperty("index") Optional<Long> index,
            @JsonProperty("grandparentTitle") Optional<String> grandparentTitle,
            @JsonProperty("parentTitle") Optional<String> parentTitle,
            @JsonProperty("audienceRating") Optional<Float> audienceRating,
            @JsonProperty("viewCount") Optional<Long> viewCount,
            @JsonProperty("skipCount") Optional<Long> skipCount,
            @JsonProperty("lastViewedAt") Optional<Long> lastViewedAt,
            @JsonProperty("year") int year,
            @JsonProperty("rating") Optional<Float> rating,
            @JsonProperty("ratingImage") Optional<String> ratingImage,
            @JsonProperty("tagline") Optional<String> tagline,
            @JsonProperty("chapterSource") Optional<String> chapterSource,
            @JsonProperty("primaryExtraKey") Optional<String> primaryExtraKey,
            @JsonProperty("thumb") String thumb,
            @JsonProperty("art") String art,
            @JsonProperty("theme") Optional<String> theme,
            @JsonProperty("duration") int duration,
            @JsonProperty("originallyAvailableAt") Optional<LocalDate> originallyAvailableAt,
            @JsonProperty("leafCount") Optional<Long> leafCount,
            @JsonProperty("viewedLeafCount") Optional<Long> viewedLeafCount,
            @JsonProperty("childCount") Optional<Integer> childCount,
            @JsonProperty("addedAt") long addedAt,
            @JsonProperty("updatedAt") long updatedAt,
            @JsonProperty("audienceRatingImage") Optional<String> audienceRatingImage,
            @JsonProperty("parentIndex") Optional<Long> parentIndex,
            @JsonProperty("parentThumb") Optional<String> parentThumb,
            @JsonProperty("grandparentThumb") Optional<String> grandparentThumb,
            @JsonProperty("grandparentArt") Optional<String> grandparentArt,
            @JsonProperty("Media") Optional<? extends List<GetMediaMetaDataMedia>> media,
            @JsonProperty("Image") List<GetMediaMetaDataImage> image,
            @JsonProperty("UltraBlurColors") GetMediaMetaDataUltraBlurColors ultraBlurColors,
            @JsonProperty("Genre") Optional<? extends List<GetMediaMetaDataGenre>> genre,
            @JsonProperty("Country") Optional<? extends List<GetMediaMetaDataCountry>> country,
            @JsonProperty("Guid") Optional<? extends List<GetMediaMetaDataGuids>> guids,
            @JsonProperty("Rating") Optional<? extends List<Ratings>> ratings,
            @JsonProperty("Role") Optional<? extends List<GetMediaMetaDataRole>> role,
            @JsonProperty("Director") Optional<? extends List<GetMediaMetaDataDirector>> director,
            @JsonProperty("Writer") Optional<? extends List<GetMediaMetaDataWriter>> writer,
            @JsonProperty("Producer") Optional<? extends List<Producer>> producer,
            @JsonProperty("Similar") Optional<? extends List<Similar>> similar,
            @JsonProperty("Location") Optional<? extends List<GetMediaMetaDataLocation>> location) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        Utils.checkNotNull(parentRatingKey, "parentRatingKey");
        Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
        Utils.checkNotNull(parentGuid, "parentGuid");
        Utils.checkNotNull(grandparentGuid, "grandparentGuid");
        Utils.checkNotNull(grandparentSlug, "grandparentSlug");
        Utils.checkNotNull(grandparentKey, "grandparentKey");
        Utils.checkNotNull(parentKey, "parentKey");
        Utils.checkNotNull(key, "key");
        Utils.checkNotNull(guid, "guid");
        Utils.checkNotNull(slug, "slug");
        Utils.checkNotNull(studio, "studio");
        Utils.checkNotNull(type, "type");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(originalTitle, "originalTitle");
        Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
        Utils.checkNotNull(librarySectionID, "librarySectionID");
        Utils.checkNotNull(librarySectionKey, "librarySectionKey");
        Utils.checkNotNull(contentRating, "contentRating");
        Utils.checkNotNull(summary, "summary");
        Utils.checkNotNull(index, "index");
        Utils.checkNotNull(grandparentTitle, "grandparentTitle");
        Utils.checkNotNull(parentTitle, "parentTitle");
        Utils.checkNotNull(audienceRating, "audienceRating");
        Utils.checkNotNull(viewCount, "viewCount");
        Utils.checkNotNull(skipCount, "skipCount");
        Utils.checkNotNull(lastViewedAt, "lastViewedAt");
        Utils.checkNotNull(year, "year");
        Utils.checkNotNull(rating, "rating");
        Utils.checkNotNull(ratingImage, "ratingImage");
        Utils.checkNotNull(tagline, "tagline");
        Utils.checkNotNull(chapterSource, "chapterSource");
        Utils.checkNotNull(primaryExtraKey, "primaryExtraKey");
        Utils.checkNotNull(thumb, "thumb");
        Utils.checkNotNull(art, "art");
        Utils.checkNotNull(theme, "theme");
        Utils.checkNotNull(duration, "duration");
        Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
        Utils.checkNotNull(leafCount, "leafCount");
        Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
        Utils.checkNotNull(childCount, "childCount");
        Utils.checkNotNull(addedAt, "addedAt");
        Utils.checkNotNull(updatedAt, "updatedAt");
        Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
        Utils.checkNotNull(parentIndex, "parentIndex");
        Utils.checkNotNull(parentThumb, "parentThumb");
        Utils.checkNotNull(grandparentThumb, "grandparentThumb");
        Utils.checkNotNull(grandparentArt, "grandparentArt");
        Utils.checkNotNull(media, "media");
        Utils.checkNotNull(image, "image");
        Utils.checkNotNull(ultraBlurColors, "ultraBlurColors");
        Utils.checkNotNull(genre, "genre");
        Utils.checkNotNull(country, "country");
        Utils.checkNotNull(guids, "guids");
        Utils.checkNotNull(ratings, "ratings");
        Utils.checkNotNull(role, "role");
        Utils.checkNotNull(director, "director");
        Utils.checkNotNull(writer, "writer");
        Utils.checkNotNull(producer, "producer");
        Utils.checkNotNull(similar, "similar");
        Utils.checkNotNull(location, "location");
        this.ratingKey = ratingKey;
        this.parentRatingKey = parentRatingKey;
        this.grandparentRatingKey = grandparentRatingKey;
        this.parentGuid = parentGuid;
        this.grandparentGuid = grandparentGuid;
        this.grandparentSlug = grandparentSlug;
        this.grandparentKey = grandparentKey;
        this.parentKey = parentKey;
        this.key = key;
        this.guid = guid;
        this.slug = slug;
        this.studio = studio;
        this.type = type;
        this.title = title;
        this.originalTitle = originalTitle;
        this.librarySectionTitle = librarySectionTitle;
        this.librarySectionID = librarySectionID;
        this.librarySectionKey = librarySectionKey;
        this.contentRating = contentRating;
        this.summary = summary;
        this.index = index;
        this.grandparentTitle = grandparentTitle;
        this.parentTitle = parentTitle;
        this.audienceRating = audienceRating;
        this.viewCount = viewCount;
        this.skipCount = skipCount;
        this.lastViewedAt = lastViewedAt;
        this.year = year;
        this.rating = rating;
        this.ratingImage = ratingImage;
        this.tagline = tagline;
        this.chapterSource = chapterSource;
        this.primaryExtraKey = primaryExtraKey;
        this.thumb = thumb;
        this.art = art;
        this.theme = theme;
        this.duration = duration;
        this.originallyAvailableAt = originallyAvailableAt;
        this.leafCount = leafCount;
        this.viewedLeafCount = viewedLeafCount;
        this.childCount = childCount;
        this.addedAt = addedAt;
        this.updatedAt = updatedAt;
        this.audienceRatingImage = audienceRatingImage;
        this.parentIndex = parentIndex;
        this.parentThumb = parentThumb;
        this.grandparentThumb = grandparentThumb;
        this.grandparentArt = grandparentArt;
        this.media = media;
        this.image = image;
        this.ultraBlurColors = ultraBlurColors;
        this.genre = genre;
        this.country = country;
        this.guids = guids;
        this.ratings = ratings;
        this.role = role;
        this.director = director;
        this.writer = writer;
        this.producer = producer;
        this.similar = similar;
        this.location = location;
    }
    
    public GetMediaMetaDataMetadata(
            String ratingKey,
            String key,
            String guid,
            String type,
            String title,
            String librarySectionTitle,
            long librarySectionID,
            String librarySectionKey,
            String summary,
            int year,
            String thumb,
            String art,
            int duration,
            long addedAt,
            long updatedAt,
            List<GetMediaMetaDataImage> image,
            GetMediaMetaDataUltraBlurColors ultraBlurColors) {
        this(ratingKey, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), key, guid, Optional.empty(), Optional.empty(), type, title, Optional.empty(), librarySectionTitle, librarySectionID, librarySectionKey, Optional.empty(), summary, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), year, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), thumb, art, Optional.empty(), duration, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), addedAt, updatedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), image, ultraBlurColors, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
    }

    /**
     * The rating key of the metadata item.
     */
    @JsonIgnore
    public String ratingKey() {
        return ratingKey;
    }

    /**
     * The rating key of the parent of this metadata item.
     */
    @JsonIgnore
    public Optional<String> parentRatingKey() {
        return parentRatingKey;
    }

    /**
     * The rating key of the grandparent of this metadata item.
     */
    @JsonIgnore
    public Optional<String> grandparentRatingKey() {
        return grandparentRatingKey;
    }

    /**
     * A GUID identifying the parent entity (e.g., season) for the item.
     */
    @JsonIgnore
    public Optional<String> parentGuid() {
        return parentGuid;
    }

    /**
     * A GUID identifying the grandparent entity (e.g., show).
     */
    @JsonIgnore
    public Optional<String> grandparentGuid() {
        return grandparentGuid;
    }

    /**
     * A URL-friendly identifier (slug) for the grandparent entity.
     */
    @JsonIgnore
    public Optional<String> grandparentSlug() {
        return grandparentSlug;
    }

    /**
     * A key identifying the grandparent metadata in the library.
     */
    @JsonIgnore
    public Optional<String> grandparentKey() {
        return grandparentKey;
    }

    /**
     * A key identifying the parent metadata in the library.
     */
    @JsonIgnore
    public Optional<String> parentKey() {
        return parentKey;
    }

    /**
     * The API key to access metadata details.
     */
    @JsonIgnore
    public String key() {
        return key;
    }

    /**
     * The globally unique identifier for the item.
     */
    @JsonIgnore
    public String guid() {
        return guid;
    }

    /**
     * A URL-friendly identifier for the item.
     */
    @JsonIgnore
    public Optional<String> slug() {
        return slug;
    }

    /**
     * The studio that produced the content.
     */
    @JsonIgnore
    public Optional<String> studio() {
        return studio;
    }

    /**
     * The type of content (e.g., show, movie).
     */
    @JsonIgnore
    public String type() {
        return type;
    }

    /**
     * The title of the content.
     */
    @JsonIgnore
    public String title() {
        return title;
    }

    /**
     * The original title of the content.
     */
    @JsonIgnore
    public Optional<String> originalTitle() {
        return originalTitle;
    }

    /**
     * The title of the library section.
     */
    @JsonIgnore
    public String librarySectionTitle() {
        return librarySectionTitle;
    }

    /**
     * The ID of the library section.
     */
    @JsonIgnore
    public long librarySectionID() {
        return librarySectionID;
    }

    /**
     * The key of the library section.
     */
    @JsonIgnore
    public String librarySectionKey() {
        return librarySectionKey;
    }

    /**
     * The content rating (e.g., TV-MA).
     */
    @JsonIgnore
    public Optional<String> contentRating() {
        return contentRating;
    }

    /**
     * A summary of the content.
     */
    @JsonIgnore
    public String summary() {
        return summary;
    }

    /**
     * The index or order of the item.
     */
    @JsonIgnore
    public Optional<Long> index() {
        return index;
    }

    /**
     * The title of the grandparent entity (typically the show's title).
     */
    @JsonIgnore
    public Optional<String> grandparentTitle() {
        return grandparentTitle;
    }

    /**
     * The title of the parent entity (typically the season's title).
     */
    @JsonIgnore
    public Optional<String> parentTitle() {
        return parentTitle;
    }

    /**
     * The audience rating for the content.
     */
    @JsonIgnore
    public Optional<Float> audienceRating() {
        return audienceRating;
    }

    /**
     * The number of times the item has been viewed.
     */
    @JsonIgnore
    public Optional<Long> viewCount() {
        return viewCount;
    }

    /**
     * The number of times the item has been skipped.
     */
    @JsonIgnore
    public Optional<Long> skipCount() {
        return skipCount;
    }

    /**
     * Unix timestamp of when the item was last viewed.
     */
    @JsonIgnore
    public Optional<Long> lastViewedAt() {
        return lastViewedAt;
    }

    /**
     * The release year.
     */
    @JsonIgnore
    public int year() {
        return year;
    }

    /**
     * The general rating
     */
    @JsonIgnore
    public Optional<Float> rating() {
        return rating;
    }

    /**
     * The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
     */
    @JsonIgnore
    public Optional<String> ratingImage() {
        return ratingImage;
    }

    /**
     * The tagline of the content.
     */
    @JsonIgnore
    public Optional<String> tagline() {
        return tagline;
    }

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

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

    /**
     * URL of the thumbnail image.
     */
    @JsonIgnore
    public String thumb() {
        return thumb;
    }

    /**
     * URL of the art image.
     */
    @JsonIgnore
    public String art() {
        return art;
    }

    /**
     * URL of the theme image.
     */
    @JsonIgnore
    public Optional<String> theme() {
        return theme;
    }

    /**
     * Duration of the content in milliseconds.
     */
    @JsonIgnore
    public int duration() {
        return duration;
    }

    /**
     * The original release date.
     */
    @JsonIgnore
    public Optional<LocalDate> originallyAvailableAt() {
        return originallyAvailableAt;
    }

    /**
     * The total number of episodes (or leaves).
     */
    @JsonIgnore
    public Optional<Long> leafCount() {
        return leafCount;
    }

    /**
     * The number of episodes that have been viewed.
     */
    @JsonIgnore
    public Optional<Long> viewedLeafCount() {
        return viewedLeafCount;
    }

    /**
     * The number of child items.
     */
    @JsonIgnore
    public Optional<Integer> childCount() {
        return childCount;
    }

    @JsonIgnore
    public long addedAt() {
        return addedAt;
    }

    @JsonIgnore
    public long updatedAt() {
        return updatedAt;
    }

    /**
     * The URL for the audience rating image.
     */
    @JsonIgnore
    public Optional<String> audienceRatingImage() {
        return audienceRatingImage;
    }

    /**
     * The index number of the parent entity, which could indicate its order or position.
     */
    @JsonIgnore
    public Optional<Long> parentIndex() {
        return parentIndex;
    }

    /**
     * The URL of the parent's thumbnail image.
     */
    @JsonIgnore
    public Optional<String> parentThumb() {
        return parentThumb;
    }

    /**
     * The URL of the grandparent's thumbnail image.
     */
    @JsonIgnore
    public Optional<String> grandparentThumb() {
        return grandparentThumb;
    }

    /**
     * The URL of the grandparent's art image.
     */
    @JsonIgnore
    public Optional<String> grandparentArt() {
        return grandparentArt;
    }

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

    /**
     * An array of image objects.
     */
    @JsonIgnore
    public List<GetMediaMetaDataImage> image() {
        return image;
    }

    @JsonIgnore
    public GetMediaMetaDataUltraBlurColors ultraBlurColors() {
        return ultraBlurColors;
    }

    /**
     * An array of genre tags.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<GetMediaMetaDataGenre>> genre() {
        return (Optional<List<GetMediaMetaDataGenre>>) genre;
    }

    /**
     * An array of country tags.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<GetMediaMetaDataCountry>> country() {
        return (Optional<List<GetMediaMetaDataCountry>>) country;
    }

    /**
     * An array of GUID objects.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<GetMediaMetaDataGuids>> guids() {
        return (Optional<List<GetMediaMetaDataGuids>>) guids;
    }

    /**
     * An array of rating objects.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<Ratings>> ratings() {
        return (Optional<List<Ratings>>) ratings;
    }

    /**
     * An array of Actor roles.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<GetMediaMetaDataRole>> role() {
        return (Optional<List<GetMediaMetaDataRole>>) role;
    }

    /**
     * An array of Director roles.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<GetMediaMetaDataDirector>> director() {
        return (Optional<List<GetMediaMetaDataDirector>>) director;
    }

    /**
     * An array of Writer roles.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<GetMediaMetaDataWriter>> writer() {
        return (Optional<List<GetMediaMetaDataWriter>>) writer;
    }

    /**
     * An array of Writer roles.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<Producer>> producer() {
        return (Optional<List<Producer>>) producer;
    }

    /**
     * An array of similar content objects.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<Similar>> similar() {
        return (Optional<List<Similar>>) similar;
    }

    /**
     * An array of location objects.
     */
    @SuppressWarnings("unchecked")
    @JsonIgnore
    public Optional<List<GetMediaMetaDataLocation>> location() {
        return (Optional<List<GetMediaMetaDataLocation>>) location;
    }

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

    /**
     * The rating key of the metadata item.
     */
    public GetMediaMetaDataMetadata withRatingKey(String ratingKey) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        this.ratingKey = ratingKey;
        return this;
    }

    /**
     * The rating key of the parent of this metadata item.
     */
    public GetMediaMetaDataMetadata withParentRatingKey(String parentRatingKey) {
        Utils.checkNotNull(parentRatingKey, "parentRatingKey");
        this.parentRatingKey = Optional.ofNullable(parentRatingKey);
        return this;
    }

    /**
     * The rating key of the parent of this metadata item.
     */
    public GetMediaMetaDataMetadata withParentRatingKey(Optional<String> parentRatingKey) {
        Utils.checkNotNull(parentRatingKey, "parentRatingKey");
        this.parentRatingKey = parentRatingKey;
        return this;
    }

    /**
     * The rating key of the grandparent of this metadata item.
     */
    public GetMediaMetaDataMetadata withGrandparentRatingKey(String grandparentRatingKey) {
        Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
        this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey);
        return this;
    }

    /**
     * The rating key of the grandparent of this metadata item.
     */
    public GetMediaMetaDataMetadata withGrandparentRatingKey(Optional<String> grandparentRatingKey) {
        Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
        this.grandparentRatingKey = grandparentRatingKey;
        return this;
    }

    /**
     * A GUID identifying the parent entity (e.g., season) for the item.
     */
    public GetMediaMetaDataMetadata withParentGuid(String parentGuid) {
        Utils.checkNotNull(parentGuid, "parentGuid");
        this.parentGuid = Optional.ofNullable(parentGuid);
        return this;
    }

    /**
     * A GUID identifying the parent entity (e.g., season) for the item.
     */
    public GetMediaMetaDataMetadata withParentGuid(Optional<String> parentGuid) {
        Utils.checkNotNull(parentGuid, "parentGuid");
        this.parentGuid = parentGuid;
        return this;
    }

    /**
     * A GUID identifying the grandparent entity (e.g., show).
     */
    public GetMediaMetaDataMetadata withGrandparentGuid(String grandparentGuid) {
        Utils.checkNotNull(grandparentGuid, "grandparentGuid");
        this.grandparentGuid = Optional.ofNullable(grandparentGuid);
        return this;
    }

    /**
     * A GUID identifying the grandparent entity (e.g., show).
     */
    public GetMediaMetaDataMetadata withGrandparentGuid(Optional<String> grandparentGuid) {
        Utils.checkNotNull(grandparentGuid, "grandparentGuid");
        this.grandparentGuid = grandparentGuid;
        return this;
    }

    /**
     * A URL-friendly identifier (slug) for the grandparent entity.
     */
    public GetMediaMetaDataMetadata withGrandparentSlug(String grandparentSlug) {
        Utils.checkNotNull(grandparentSlug, "grandparentSlug");
        this.grandparentSlug = Optional.ofNullable(grandparentSlug);
        return this;
    }

    /**
     * A URL-friendly identifier (slug) for the grandparent entity.
     */
    public GetMediaMetaDataMetadata withGrandparentSlug(Optional<String> grandparentSlug) {
        Utils.checkNotNull(grandparentSlug, "grandparentSlug");
        this.grandparentSlug = grandparentSlug;
        return this;
    }

    /**
     * A key identifying the grandparent metadata in the library.
     */
    public GetMediaMetaDataMetadata withGrandparentKey(String grandparentKey) {
        Utils.checkNotNull(grandparentKey, "grandparentKey");
        this.grandparentKey = Optional.ofNullable(grandparentKey);
        return this;
    }

    /**
     * A key identifying the grandparent metadata in the library.
     */
    public GetMediaMetaDataMetadata withGrandparentKey(Optional<String> grandparentKey) {
        Utils.checkNotNull(grandparentKey, "grandparentKey");
        this.grandparentKey = grandparentKey;
        return this;
    }

    /**
     * A key identifying the parent metadata in the library.
     */
    public GetMediaMetaDataMetadata withParentKey(String parentKey) {
        Utils.checkNotNull(parentKey, "parentKey");
        this.parentKey = Optional.ofNullable(parentKey);
        return this;
    }

    /**
     * A key identifying the parent metadata in the library.
     */
    public GetMediaMetaDataMetadata withParentKey(Optional<String> parentKey) {
        Utils.checkNotNull(parentKey, "parentKey");
        this.parentKey = parentKey;
        return this;
    }

    /**
     * The API key to access metadata details.
     */
    public GetMediaMetaDataMetadata withKey(String key) {
        Utils.checkNotNull(key, "key");
        this.key = key;
        return this;
    }

    /**
     * The globally unique identifier for the item.
     */
    public GetMediaMetaDataMetadata withGuid(String guid) {
        Utils.checkNotNull(guid, "guid");
        this.guid = guid;
        return this;
    }

    /**
     * A URL-friendly identifier for the item.
     */
    public GetMediaMetaDataMetadata withSlug(String slug) {
        Utils.checkNotNull(slug, "slug");
        this.slug = Optional.ofNullable(slug);
        return this;
    }

    /**
     * A URL-friendly identifier for the item.
     */
    public GetMediaMetaDataMetadata withSlug(Optional<String> slug) {
        Utils.checkNotNull(slug, "slug");
        this.slug = slug;
        return this;
    }

    /**
     * The studio that produced the content.
     */
    public GetMediaMetaDataMetadata withStudio(String studio) {
        Utils.checkNotNull(studio, "studio");
        this.studio = Optional.ofNullable(studio);
        return this;
    }

    /**
     * The studio that produced the content.
     */
    public GetMediaMetaDataMetadata withStudio(Optional<String> studio) {
        Utils.checkNotNull(studio, "studio");
        this.studio = studio;
        return this;
    }

    /**
     * The type of content (e.g., show, movie).
     */
    public GetMediaMetaDataMetadata withType(String type) {
        Utils.checkNotNull(type, "type");
        this.type = type;
        return this;
    }

    /**
     * The title of the content.
     */
    public GetMediaMetaDataMetadata withTitle(String title) {
        Utils.checkNotNull(title, "title");
        this.title = title;
        return this;
    }

    /**
     * The original title of the content.
     */
    public GetMediaMetaDataMetadata withOriginalTitle(String originalTitle) {
        Utils.checkNotNull(originalTitle, "originalTitle");
        this.originalTitle = Optional.ofNullable(originalTitle);
        return this;
    }

    /**
     * The original title of the content.
     */
    public GetMediaMetaDataMetadata withOriginalTitle(Optional<String> originalTitle) {
        Utils.checkNotNull(originalTitle, "originalTitle");
        this.originalTitle = originalTitle;
        return this;
    }

    /**
     * The title of the library section.
     */
    public GetMediaMetaDataMetadata withLibrarySectionTitle(String librarySectionTitle) {
        Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
        this.librarySectionTitle = librarySectionTitle;
        return this;
    }

    /**
     * The ID of the library section.
     */
    public GetMediaMetaDataMetadata withLibrarySectionID(long librarySectionID) {
        Utils.checkNotNull(librarySectionID, "librarySectionID");
        this.librarySectionID = librarySectionID;
        return this;
    }

    /**
     * The key of the library section.
     */
    public GetMediaMetaDataMetadata withLibrarySectionKey(String librarySectionKey) {
        Utils.checkNotNull(librarySectionKey, "librarySectionKey");
        this.librarySectionKey = librarySectionKey;
        return this;
    }

    /**
     * The content rating (e.g., TV-MA).
     */
    public GetMediaMetaDataMetadata withContentRating(String contentRating) {
        Utils.checkNotNull(contentRating, "contentRating");
        this.contentRating = Optional.ofNullable(contentRating);
        return this;
    }

    /**
     * The content rating (e.g., TV-MA).
     */
    public GetMediaMetaDataMetadata withContentRating(Optional<String> contentRating) {
        Utils.checkNotNull(contentRating, "contentRating");
        this.contentRating = contentRating;
        return this;
    }

    /**
     * A summary of the content.
     */
    public GetMediaMetaDataMetadata withSummary(String summary) {
        Utils.checkNotNull(summary, "summary");
        this.summary = summary;
        return this;
    }

    /**
     * The index or order of the item.
     */
    public GetMediaMetaDataMetadata withIndex(long index) {
        Utils.checkNotNull(index, "index");
        this.index = Optional.ofNullable(index);
        return this;
    }

    /**
     * The index or order of the item.
     */
    public GetMediaMetaDataMetadata withIndex(Optional<Long> index) {
        Utils.checkNotNull(index, "index");
        this.index = index;
        return this;
    }

    /**
     * The title of the grandparent entity (typically the show's title).
     */
    public GetMediaMetaDataMetadata withGrandparentTitle(String grandparentTitle) {
        Utils.checkNotNull(grandparentTitle, "grandparentTitle");
        this.grandparentTitle = Optional.ofNullable(grandparentTitle);
        return this;
    }

    /**
     * The title of the grandparent entity (typically the show's title).
     */
    public GetMediaMetaDataMetadata withGrandparentTitle(Optional<String> grandparentTitle) {
        Utils.checkNotNull(grandparentTitle, "grandparentTitle");
        this.grandparentTitle = grandparentTitle;
        return this;
    }

    /**
     * The title of the parent entity (typically the season's title).
     */
    public GetMediaMetaDataMetadata withParentTitle(String parentTitle) {
        Utils.checkNotNull(parentTitle, "parentTitle");
        this.parentTitle = Optional.ofNullable(parentTitle);
        return this;
    }

    /**
     * The title of the parent entity (typically the season's title).
     */
    public GetMediaMetaDataMetadata withParentTitle(Optional<String> parentTitle) {
        Utils.checkNotNull(parentTitle, "parentTitle");
        this.parentTitle = parentTitle;
        return this;
    }

    /**
     * The audience rating for the content.
     */
    public GetMediaMetaDataMetadata withAudienceRating(float audienceRating) {
        Utils.checkNotNull(audienceRating, "audienceRating");
        this.audienceRating = Optional.ofNullable(audienceRating);
        return this;
    }

    /**
     * The audience rating for the content.
     */
    public GetMediaMetaDataMetadata withAudienceRating(Optional<Float> audienceRating) {
        Utils.checkNotNull(audienceRating, "audienceRating");
        this.audienceRating = audienceRating;
        return this;
    }

    /**
     * The number of times the item has been viewed.
     */
    public GetMediaMetaDataMetadata withViewCount(long viewCount) {
        Utils.checkNotNull(viewCount, "viewCount");
        this.viewCount = Optional.ofNullable(viewCount);
        return this;
    }

    /**
     * The number of times the item has been viewed.
     */
    public GetMediaMetaDataMetadata withViewCount(Optional<Long> viewCount) {
        Utils.checkNotNull(viewCount, "viewCount");
        this.viewCount = viewCount;
        return this;
    }

    /**
     * The number of times the item has been skipped.
     */
    public GetMediaMetaDataMetadata withSkipCount(long skipCount) {
        Utils.checkNotNull(skipCount, "skipCount");
        this.skipCount = Optional.ofNullable(skipCount);
        return this;
    }

    /**
     * The number of times the item has been skipped.
     */
    public GetMediaMetaDataMetadata withSkipCount(Optional<Long> skipCount) {
        Utils.checkNotNull(skipCount, "skipCount");
        this.skipCount = skipCount;
        return this;
    }

    /**
     * Unix timestamp of when the item was last viewed.
     */
    public GetMediaMetaDataMetadata withLastViewedAt(long lastViewedAt) {
        Utils.checkNotNull(lastViewedAt, "lastViewedAt");
        this.lastViewedAt = Optional.ofNullable(lastViewedAt);
        return this;
    }

    /**
     * Unix timestamp of when the item was last viewed.
     */
    public GetMediaMetaDataMetadata withLastViewedAt(Optional<Long> lastViewedAt) {
        Utils.checkNotNull(lastViewedAt, "lastViewedAt");
        this.lastViewedAt = lastViewedAt;
        return this;
    }

    /**
     * The release year.
     */
    public GetMediaMetaDataMetadata withYear(int year) {
        Utils.checkNotNull(year, "year");
        this.year = year;
        return this;
    }

    /**
     * The general rating
     */
    public GetMediaMetaDataMetadata withRating(float rating) {
        Utils.checkNotNull(rating, "rating");
        this.rating = Optional.ofNullable(rating);
        return this;
    }

    /**
     * The general rating
     */
    public GetMediaMetaDataMetadata withRating(Optional<Float> rating) {
        Utils.checkNotNull(rating, "rating");
        this.rating = rating;
        return this;
    }

    /**
     * The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
     */
    public GetMediaMetaDataMetadata withRatingImage(String ratingImage) {
        Utils.checkNotNull(ratingImage, "ratingImage");
        this.ratingImage = Optional.ofNullable(ratingImage);
        return this;
    }

    /**
     * The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
     */
    public GetMediaMetaDataMetadata withRatingImage(Optional<String> ratingImage) {
        Utils.checkNotNull(ratingImage, "ratingImage");
        this.ratingImage = ratingImage;
        return this;
    }

    /**
     * The tagline of the content.
     */
    public GetMediaMetaDataMetadata withTagline(String tagline) {
        Utils.checkNotNull(tagline, "tagline");
        this.tagline = Optional.ofNullable(tagline);
        return this;
    }

    /**
     * The tagline of the content.
     */
    public GetMediaMetaDataMetadata withTagline(Optional<String> tagline) {
        Utils.checkNotNull(tagline, "tagline");
        this.tagline = tagline;
        return this;
    }

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

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

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

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

    /**
     * URL of the thumbnail image.
     */
    public GetMediaMetaDataMetadata withThumb(String thumb) {
        Utils.checkNotNull(thumb, "thumb");
        this.thumb = thumb;
        return this;
    }

    /**
     * URL of the art image.
     */
    public GetMediaMetaDataMetadata withArt(String art) {
        Utils.checkNotNull(art, "art");
        this.art = art;
        return this;
    }

    /**
     * URL of the theme image.
     */
    public GetMediaMetaDataMetadata withTheme(String theme) {
        Utils.checkNotNull(theme, "theme");
        this.theme = Optional.ofNullable(theme);
        return this;
    }

    /**
     * URL of the theme image.
     */
    public GetMediaMetaDataMetadata withTheme(Optional<String> theme) {
        Utils.checkNotNull(theme, "theme");
        this.theme = theme;
        return this;
    }

    /**
     * Duration of the content in milliseconds.
     */
    public GetMediaMetaDataMetadata withDuration(int duration) {
        Utils.checkNotNull(duration, "duration");
        this.duration = duration;
        return this;
    }

    /**
     * The original release date.
     */
    public GetMediaMetaDataMetadata withOriginallyAvailableAt(LocalDate originallyAvailableAt) {
        Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
        this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
        return this;
    }

    /**
     * The original release date.
     */
    public GetMediaMetaDataMetadata withOriginallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
        Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
        this.originallyAvailableAt = originallyAvailableAt;
        return this;
    }

    /**
     * The total number of episodes (or leaves).
     */
    public GetMediaMetaDataMetadata withLeafCount(long leafCount) {
        Utils.checkNotNull(leafCount, "leafCount");
        this.leafCount = Optional.ofNullable(leafCount);
        return this;
    }

    /**
     * The total number of episodes (or leaves).
     */
    public GetMediaMetaDataMetadata withLeafCount(Optional<Long> leafCount) {
        Utils.checkNotNull(leafCount, "leafCount");
        this.leafCount = leafCount;
        return this;
    }

    /**
     * The number of episodes that have been viewed.
     */
    public GetMediaMetaDataMetadata withViewedLeafCount(long viewedLeafCount) {
        Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
        this.viewedLeafCount = Optional.ofNullable(viewedLeafCount);
        return this;
    }

    /**
     * The number of episodes that have been viewed.
     */
    public GetMediaMetaDataMetadata withViewedLeafCount(Optional<Long> viewedLeafCount) {
        Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
        this.viewedLeafCount = viewedLeafCount;
        return this;
    }

    /**
     * The number of child items.
     */
    public GetMediaMetaDataMetadata withChildCount(int childCount) {
        Utils.checkNotNull(childCount, "childCount");
        this.childCount = Optional.ofNullable(childCount);
        return this;
    }

    /**
     * The number of child items.
     */
    public GetMediaMetaDataMetadata withChildCount(Optional<Integer> childCount) {
        Utils.checkNotNull(childCount, "childCount");
        this.childCount = childCount;
        return this;
    }

    public GetMediaMetaDataMetadata withAddedAt(long addedAt) {
        Utils.checkNotNull(addedAt, "addedAt");
        this.addedAt = addedAt;
        return this;
    }

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

    /**
     * The URL for the audience rating image.
     */
    public GetMediaMetaDataMetadata withAudienceRatingImage(String audienceRatingImage) {
        Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
        this.audienceRatingImage = Optional.ofNullable(audienceRatingImage);
        return this;
    }

    /**
     * The URL for the audience rating image.
     */
    public GetMediaMetaDataMetadata withAudienceRatingImage(Optional<String> audienceRatingImage) {
        Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
        this.audienceRatingImage = audienceRatingImage;
        return this;
    }

    /**
     * The index number of the parent entity, which could indicate its order or position.
     */
    public GetMediaMetaDataMetadata withParentIndex(long parentIndex) {
        Utils.checkNotNull(parentIndex, "parentIndex");
        this.parentIndex = Optional.ofNullable(parentIndex);
        return this;
    }

    /**
     * The index number of the parent entity, which could indicate its order or position.
     */
    public GetMediaMetaDataMetadata withParentIndex(Optional<Long> parentIndex) {
        Utils.checkNotNull(parentIndex, "parentIndex");
        this.parentIndex = parentIndex;
        return this;
    }

    /**
     * The URL of the parent's thumbnail image.
     */
    public GetMediaMetaDataMetadata withParentThumb(String parentThumb) {
        Utils.checkNotNull(parentThumb, "parentThumb");
        this.parentThumb = Optional.ofNullable(parentThumb);
        return this;
    }

    /**
     * The URL of the parent's thumbnail image.
     */
    public GetMediaMetaDataMetadata withParentThumb(Optional<String> parentThumb) {
        Utils.checkNotNull(parentThumb, "parentThumb");
        this.parentThumb = parentThumb;
        return this;
    }

    /**
     * The URL of the grandparent's thumbnail image.
     */
    public GetMediaMetaDataMetadata withGrandparentThumb(String grandparentThumb) {
        Utils.checkNotNull(grandparentThumb, "grandparentThumb");
        this.grandparentThumb = Optional.ofNullable(grandparentThumb);
        return this;
    }

    /**
     * The URL of the grandparent's thumbnail image.
     */
    public GetMediaMetaDataMetadata withGrandparentThumb(Optional<String> grandparentThumb) {
        Utils.checkNotNull(grandparentThumb, "grandparentThumb");
        this.grandparentThumb = grandparentThumb;
        return this;
    }

    /**
     * The URL of the grandparent's art image.
     */
    public GetMediaMetaDataMetadata withGrandparentArt(String grandparentArt) {
        Utils.checkNotNull(grandparentArt, "grandparentArt");
        this.grandparentArt = Optional.ofNullable(grandparentArt);
        return this;
    }

    /**
     * The URL of the grandparent's art image.
     */
    public GetMediaMetaDataMetadata withGrandparentArt(Optional<String> grandparentArt) {
        Utils.checkNotNull(grandparentArt, "grandparentArt");
        this.grandparentArt = grandparentArt;
        return this;
    }

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

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

    /**
     * An array of image objects.
     */
    public GetMediaMetaDataMetadata withImage(List<GetMediaMetaDataImage> image) {
        Utils.checkNotNull(image, "image");
        this.image = image;
        return this;
    }

    public GetMediaMetaDataMetadata withUltraBlurColors(GetMediaMetaDataUltraBlurColors ultraBlurColors) {
        Utils.checkNotNull(ultraBlurColors, "ultraBlurColors");
        this.ultraBlurColors = ultraBlurColors;
        return this;
    }

    /**
     * An array of genre tags.
     */
    public GetMediaMetaDataMetadata withGenre(List<GetMediaMetaDataGenre> genre) {
        Utils.checkNotNull(genre, "genre");
        this.genre = Optional.ofNullable(genre);
        return this;
    }

    /**
     * An array of genre tags.
     */
    public GetMediaMetaDataMetadata withGenre(Optional<? extends List<GetMediaMetaDataGenre>> genre) {
        Utils.checkNotNull(genre, "genre");
        this.genre = genre;
        return this;
    }

    /**
     * An array of country tags.
     */
    public GetMediaMetaDataMetadata withCountry(List<GetMediaMetaDataCountry> country) {
        Utils.checkNotNull(country, "country");
        this.country = Optional.ofNullable(country);
        return this;
    }

    /**
     * An array of country tags.
     */
    public GetMediaMetaDataMetadata withCountry(Optional<? extends List<GetMediaMetaDataCountry>> country) {
        Utils.checkNotNull(country, "country");
        this.country = country;
        return this;
    }

    /**
     * An array of GUID objects.
     */
    public GetMediaMetaDataMetadata withGuids(List<GetMediaMetaDataGuids> guids) {
        Utils.checkNotNull(guids, "guids");
        this.guids = Optional.ofNullable(guids);
        return this;
    }

    /**
     * An array of GUID objects.
     */
    public GetMediaMetaDataMetadata withGuids(Optional<? extends List<GetMediaMetaDataGuids>> guids) {
        Utils.checkNotNull(guids, "guids");
        this.guids = guids;
        return this;
    }

    /**
     * An array of rating objects.
     */
    public GetMediaMetaDataMetadata withRatings(List<Ratings> ratings) {
        Utils.checkNotNull(ratings, "ratings");
        this.ratings = Optional.ofNullable(ratings);
        return this;
    }

    /**
     * An array of rating objects.
     */
    public GetMediaMetaDataMetadata withRatings(Optional<? extends List<Ratings>> ratings) {
        Utils.checkNotNull(ratings, "ratings");
        this.ratings = ratings;
        return this;
    }

    /**
     * An array of Actor roles.
     */
    public GetMediaMetaDataMetadata withRole(List<GetMediaMetaDataRole> role) {
        Utils.checkNotNull(role, "role");
        this.role = Optional.ofNullable(role);
        return this;
    }

    /**
     * An array of Actor roles.
     */
    public GetMediaMetaDataMetadata withRole(Optional<? extends List<GetMediaMetaDataRole>> role) {
        Utils.checkNotNull(role, "role");
        this.role = role;
        return this;
    }

    /**
     * An array of Director roles.
     */
    public GetMediaMetaDataMetadata withDirector(List<GetMediaMetaDataDirector> director) {
        Utils.checkNotNull(director, "director");
        this.director = Optional.ofNullable(director);
        return this;
    }

    /**
     * An array of Director roles.
     */
    public GetMediaMetaDataMetadata withDirector(Optional<? extends List<GetMediaMetaDataDirector>> director) {
        Utils.checkNotNull(director, "director");
        this.director = director;
        return this;
    }

    /**
     * An array of Writer roles.
     */
    public GetMediaMetaDataMetadata withWriter(List<GetMediaMetaDataWriter> writer) {
        Utils.checkNotNull(writer, "writer");
        this.writer = Optional.ofNullable(writer);
        return this;
    }

    /**
     * An array of Writer roles.
     */
    public GetMediaMetaDataMetadata withWriter(Optional<? extends List<GetMediaMetaDataWriter>> writer) {
        Utils.checkNotNull(writer, "writer");
        this.writer = writer;
        return this;
    }

    /**
     * An array of Writer roles.
     */
    public GetMediaMetaDataMetadata withProducer(List<Producer> producer) {
        Utils.checkNotNull(producer, "producer");
        this.producer = Optional.ofNullable(producer);
        return this;
    }

    /**
     * An array of Writer roles.
     */
    public GetMediaMetaDataMetadata withProducer(Optional<? extends List<Producer>> producer) {
        Utils.checkNotNull(producer, "producer");
        this.producer = producer;
        return this;
    }

    /**
     * An array of similar content objects.
     */
    public GetMediaMetaDataMetadata withSimilar(List<Similar> similar) {
        Utils.checkNotNull(similar, "similar");
        this.similar = Optional.ofNullable(similar);
        return this;
    }

    /**
     * An array of similar content objects.
     */
    public GetMediaMetaDataMetadata withSimilar(Optional<? extends List<Similar>> similar) {
        Utils.checkNotNull(similar, "similar");
        this.similar = similar;
        return this;
    }

    /**
     * An array of location objects.
     */
    public GetMediaMetaDataMetadata withLocation(List<GetMediaMetaDataLocation> location) {
        Utils.checkNotNull(location, "location");
        this.location = Optional.ofNullable(location);
        return this;
    }

    /**
     * An array of location objects.
     */
    public GetMediaMetaDataMetadata withLocation(Optional<? extends List<GetMediaMetaDataLocation>> location) {
        Utils.checkNotNull(location, "location");
        this.location = location;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetMediaMetaDataMetadata other = (GetMediaMetaDataMetadata) o;
        return 
            Objects.deepEquals(this.ratingKey, other.ratingKey) &&
            Objects.deepEquals(this.parentRatingKey, other.parentRatingKey) &&
            Objects.deepEquals(this.grandparentRatingKey, other.grandparentRatingKey) &&
            Objects.deepEquals(this.parentGuid, other.parentGuid) &&
            Objects.deepEquals(this.grandparentGuid, other.grandparentGuid) &&
            Objects.deepEquals(this.grandparentSlug, other.grandparentSlug) &&
            Objects.deepEquals(this.grandparentKey, other.grandparentKey) &&
            Objects.deepEquals(this.parentKey, other.parentKey) &&
            Objects.deepEquals(this.key, other.key) &&
            Objects.deepEquals(this.guid, other.guid) &&
            Objects.deepEquals(this.slug, other.slug) &&
            Objects.deepEquals(this.studio, other.studio) &&
            Objects.deepEquals(this.type, other.type) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.originalTitle, other.originalTitle) &&
            Objects.deepEquals(this.librarySectionTitle, other.librarySectionTitle) &&
            Objects.deepEquals(this.librarySectionID, other.librarySectionID) &&
            Objects.deepEquals(this.librarySectionKey, other.librarySectionKey) &&
            Objects.deepEquals(this.contentRating, other.contentRating) &&
            Objects.deepEquals(this.summary, other.summary) &&
            Objects.deepEquals(this.index, other.index) &&
            Objects.deepEquals(this.grandparentTitle, other.grandparentTitle) &&
            Objects.deepEquals(this.parentTitle, other.parentTitle) &&
            Objects.deepEquals(this.audienceRating, other.audienceRating) &&
            Objects.deepEquals(this.viewCount, other.viewCount) &&
            Objects.deepEquals(this.skipCount, other.skipCount) &&
            Objects.deepEquals(this.lastViewedAt, other.lastViewedAt) &&
            Objects.deepEquals(this.year, other.year) &&
            Objects.deepEquals(this.rating, other.rating) &&
            Objects.deepEquals(this.ratingImage, other.ratingImage) &&
            Objects.deepEquals(this.tagline, other.tagline) &&
            Objects.deepEquals(this.chapterSource, other.chapterSource) &&
            Objects.deepEquals(this.primaryExtraKey, other.primaryExtraKey) &&
            Objects.deepEquals(this.thumb, other.thumb) &&
            Objects.deepEquals(this.art, other.art) &&
            Objects.deepEquals(this.theme, other.theme) &&
            Objects.deepEquals(this.duration, other.duration) &&
            Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) &&
            Objects.deepEquals(this.leafCount, other.leafCount) &&
            Objects.deepEquals(this.viewedLeafCount, other.viewedLeafCount) &&
            Objects.deepEquals(this.childCount, other.childCount) &&
            Objects.deepEquals(this.addedAt, other.addedAt) &&
            Objects.deepEquals(this.updatedAt, other.updatedAt) &&
            Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) &&
            Objects.deepEquals(this.parentIndex, other.parentIndex) &&
            Objects.deepEquals(this.parentThumb, other.parentThumb) &&
            Objects.deepEquals(this.grandparentThumb, other.grandparentThumb) &&
            Objects.deepEquals(this.grandparentArt, other.grandparentArt) &&
            Objects.deepEquals(this.media, other.media) &&
            Objects.deepEquals(this.image, other.image) &&
            Objects.deepEquals(this.ultraBlurColors, other.ultraBlurColors) &&
            Objects.deepEquals(this.genre, other.genre) &&
            Objects.deepEquals(this.country, other.country) &&
            Objects.deepEquals(this.guids, other.guids) &&
            Objects.deepEquals(this.ratings, other.ratings) &&
            Objects.deepEquals(this.role, other.role) &&
            Objects.deepEquals(this.director, other.director) &&
            Objects.deepEquals(this.writer, other.writer) &&
            Objects.deepEquals(this.producer, other.producer) &&
            Objects.deepEquals(this.similar, other.similar) &&
            Objects.deepEquals(this.location, other.location);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            ratingKey,
            parentRatingKey,
            grandparentRatingKey,
            parentGuid,
            grandparentGuid,
            grandparentSlug,
            grandparentKey,
            parentKey,
            key,
            guid,
            slug,
            studio,
            type,
            title,
            originalTitle,
            librarySectionTitle,
            librarySectionID,
            librarySectionKey,
            contentRating,
            summary,
            index,
            grandparentTitle,
            parentTitle,
            audienceRating,
            viewCount,
            skipCount,
            lastViewedAt,
            year,
            rating,
            ratingImage,
            tagline,
            chapterSource,
            primaryExtraKey,
            thumb,
            art,
            theme,
            duration,
            originallyAvailableAt,
            leafCount,
            viewedLeafCount,
            childCount,
            addedAt,
            updatedAt,
            audienceRatingImage,
            parentIndex,
            parentThumb,
            grandparentThumb,
            grandparentArt,
            media,
            image,
            ultraBlurColors,
            genre,
            country,
            guids,
            ratings,
            role,
            director,
            writer,
            producer,
            similar,
            location);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetMediaMetaDataMetadata.class,
                "ratingKey", ratingKey,
                "parentRatingKey", parentRatingKey,
                "grandparentRatingKey", grandparentRatingKey,
                "parentGuid", parentGuid,
                "grandparentGuid", grandparentGuid,
                "grandparentSlug", grandparentSlug,
                "grandparentKey", grandparentKey,
                "parentKey", parentKey,
                "key", key,
                "guid", guid,
                "slug", slug,
                "studio", studio,
                "type", type,
                "title", title,
                "originalTitle", originalTitle,
                "librarySectionTitle", librarySectionTitle,
                "librarySectionID", librarySectionID,
                "librarySectionKey", librarySectionKey,
                "contentRating", contentRating,
                "summary", summary,
                "index", index,
                "grandparentTitle", grandparentTitle,
                "parentTitle", parentTitle,
                "audienceRating", audienceRating,
                "viewCount", viewCount,
                "skipCount", skipCount,
                "lastViewedAt", lastViewedAt,
                "year", year,
                "rating", rating,
                "ratingImage", ratingImage,
                "tagline", tagline,
                "chapterSource", chapterSource,
                "primaryExtraKey", primaryExtraKey,
                "thumb", thumb,
                "art", art,
                "theme", theme,
                "duration", duration,
                "originallyAvailableAt", originallyAvailableAt,
                "leafCount", leafCount,
                "viewedLeafCount", viewedLeafCount,
                "childCount", childCount,
                "addedAt", addedAt,
                "updatedAt", updatedAt,
                "audienceRatingImage", audienceRatingImage,
                "parentIndex", parentIndex,
                "parentThumb", parentThumb,
                "grandparentThumb", grandparentThumb,
                "grandparentArt", grandparentArt,
                "media", media,
                "image", image,
                "ultraBlurColors", ultraBlurColors,
                "genre", genre,
                "country", country,
                "guids", guids,
                "ratings", ratings,
                "role", role,
                "director", director,
                "writer", writer,
                "producer", producer,
                "similar", similar,
                "location", location);
    }
    
    public final static class Builder {
 
        private String ratingKey;
 
        private Optional<String> parentRatingKey = Optional.empty();
 
        private Optional<String> grandparentRatingKey = Optional.empty();
 
        private Optional<String> parentGuid = Optional.empty();
 
        private Optional<String> grandparentGuid = Optional.empty();
 
        private Optional<String> grandparentSlug = Optional.empty();
 
        private Optional<String> grandparentKey = Optional.empty();
 
        private Optional<String> parentKey = Optional.empty();
 
        private String key;
 
        private String guid;
 
        private Optional<String> slug = Optional.empty();
 
        private Optional<String> studio = Optional.empty();
 
        private String type;
 
        private String title;
 
        private Optional<String> originalTitle = Optional.empty();
 
        private String librarySectionTitle;
 
        private Long librarySectionID;
 
        private String librarySectionKey;
 
        private Optional<String> contentRating = Optional.empty();
 
        private String summary;
 
        private Optional<Long> index = Optional.empty();
 
        private Optional<String> grandparentTitle = Optional.empty();
 
        private Optional<String> parentTitle = Optional.empty();
 
        private Optional<Float> audienceRating = Optional.empty();
 
        private Optional<Long> viewCount = Optional.empty();
 
        private Optional<Long> skipCount = Optional.empty();
 
        private Optional<Long> lastViewedAt = Optional.empty();
 
        private Integer year;
 
        private Optional<Float> rating = Optional.empty();
 
        private Optional<String> ratingImage = Optional.empty();
 
        private Optional<String> tagline = Optional.empty();
 
        private Optional<String> chapterSource = Optional.empty();
 
        private Optional<String> primaryExtraKey = Optional.empty();
 
        private String thumb;
 
        private String art;
 
        private Optional<String> theme = Optional.empty();
 
        private Integer duration;
 
        private Optional<LocalDate> originallyAvailableAt = Optional.empty();
 
        private Optional<Long> leafCount = Optional.empty();
 
        private Optional<Long> viewedLeafCount = Optional.empty();
 
        private Optional<Integer> childCount = Optional.empty();
 
        private Long addedAt;
 
        private Long updatedAt;
 
        private Optional<String> audienceRatingImage = Optional.empty();
 
        private Optional<Long> parentIndex = Optional.empty();
 
        private Optional<String> parentThumb = Optional.empty();
 
        private Optional<String> grandparentThumb = Optional.empty();
 
        private Optional<String> grandparentArt = Optional.empty();
 
        private Optional<? extends List<GetMediaMetaDataMedia>> media = Optional.empty();
 
        private List<GetMediaMetaDataImage> image;
 
        private GetMediaMetaDataUltraBlurColors ultraBlurColors;
 
        private Optional<? extends List<GetMediaMetaDataGenre>> genre = Optional.empty();
 
        private Optional<? extends List<GetMediaMetaDataCountry>> country = Optional.empty();
 
        private Optional<? extends List<GetMediaMetaDataGuids>> guids = Optional.empty();
 
        private Optional<? extends List<Ratings>> ratings = Optional.empty();
 
        private Optional<? extends List<GetMediaMetaDataRole>> role = Optional.empty();
 
        private Optional<? extends List<GetMediaMetaDataDirector>> director = Optional.empty();
 
        private Optional<? extends List<GetMediaMetaDataWriter>> writer = Optional.empty();
 
        private Optional<? extends List<Producer>> producer = Optional.empty();
 
        private Optional<? extends List<Similar>> similar = Optional.empty();
 
        private Optional<? extends List<GetMediaMetaDataLocation>> location = Optional.empty();  
        
        private Builder() {
          // force use of static builder() method
        }

        /**
         * The rating key of the metadata item.
         */
        public Builder ratingKey(String ratingKey) {
            Utils.checkNotNull(ratingKey, "ratingKey");
            this.ratingKey = ratingKey;
            return this;
        }

        /**
         * The rating key of the parent of this metadata item.
         */
        public Builder parentRatingKey(String parentRatingKey) {
            Utils.checkNotNull(parentRatingKey, "parentRatingKey");
            this.parentRatingKey = Optional.ofNullable(parentRatingKey);
            return this;
        }

        /**
         * The rating key of the parent of this metadata item.
         */
        public Builder parentRatingKey(Optional<String> parentRatingKey) {
            Utils.checkNotNull(parentRatingKey, "parentRatingKey");
            this.parentRatingKey = parentRatingKey;
            return this;
        }

        /**
         * The rating key of the grandparent of this metadata item.
         */
        public Builder grandparentRatingKey(String grandparentRatingKey) {
            Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
            this.grandparentRatingKey = Optional.ofNullable(grandparentRatingKey);
            return this;
        }

        /**
         * The rating key of the grandparent of this metadata item.
         */
        public Builder grandparentRatingKey(Optional<String> grandparentRatingKey) {
            Utils.checkNotNull(grandparentRatingKey, "grandparentRatingKey");
            this.grandparentRatingKey = grandparentRatingKey;
            return this;
        }

        /**
         * A GUID identifying the parent entity (e.g., season) for the item.
         */
        public Builder parentGuid(String parentGuid) {
            Utils.checkNotNull(parentGuid, "parentGuid");
            this.parentGuid = Optional.ofNullable(parentGuid);
            return this;
        }

        /**
         * A GUID identifying the parent entity (e.g., season) for the item.
         */
        public Builder parentGuid(Optional<String> parentGuid) {
            Utils.checkNotNull(parentGuid, "parentGuid");
            this.parentGuid = parentGuid;
            return this;
        }

        /**
         * A GUID identifying the grandparent entity (e.g., show).
         */
        public Builder grandparentGuid(String grandparentGuid) {
            Utils.checkNotNull(grandparentGuid, "grandparentGuid");
            this.grandparentGuid = Optional.ofNullable(grandparentGuid);
            return this;
        }

        /**
         * A GUID identifying the grandparent entity (e.g., show).
         */
        public Builder grandparentGuid(Optional<String> grandparentGuid) {
            Utils.checkNotNull(grandparentGuid, "grandparentGuid");
            this.grandparentGuid = grandparentGuid;
            return this;
        }

        /**
         * A URL-friendly identifier (slug) for the grandparent entity.
         */
        public Builder grandparentSlug(String grandparentSlug) {
            Utils.checkNotNull(grandparentSlug, "grandparentSlug");
            this.grandparentSlug = Optional.ofNullable(grandparentSlug);
            return this;
        }

        /**
         * A URL-friendly identifier (slug) for the grandparent entity.
         */
        public Builder grandparentSlug(Optional<String> grandparentSlug) {
            Utils.checkNotNull(grandparentSlug, "grandparentSlug");
            this.grandparentSlug = grandparentSlug;
            return this;
        }

        /**
         * A key identifying the grandparent metadata in the library.
         */
        public Builder grandparentKey(String grandparentKey) {
            Utils.checkNotNull(grandparentKey, "grandparentKey");
            this.grandparentKey = Optional.ofNullable(grandparentKey);
            return this;
        }

        /**
         * A key identifying the grandparent metadata in the library.
         */
        public Builder grandparentKey(Optional<String> grandparentKey) {
            Utils.checkNotNull(grandparentKey, "grandparentKey");
            this.grandparentKey = grandparentKey;
            return this;
        }

        /**
         * A key identifying the parent metadata in the library.
         */
        public Builder parentKey(String parentKey) {
            Utils.checkNotNull(parentKey, "parentKey");
            this.parentKey = Optional.ofNullable(parentKey);
            return this;
        }

        /**
         * A key identifying the parent metadata in the library.
         */
        public Builder parentKey(Optional<String> parentKey) {
            Utils.checkNotNull(parentKey, "parentKey");
            this.parentKey = parentKey;
            return this;
        }

        /**
         * The API key to access metadata details.
         */
        public Builder key(String key) {
            Utils.checkNotNull(key, "key");
            this.key = key;
            return this;
        }

        /**
         * The globally unique identifier for the item.
         */
        public Builder guid(String guid) {
            Utils.checkNotNull(guid, "guid");
            this.guid = guid;
            return this;
        }

        /**
         * A URL-friendly identifier for the item.
         */
        public Builder slug(String slug) {
            Utils.checkNotNull(slug, "slug");
            this.slug = Optional.ofNullable(slug);
            return this;
        }

        /**
         * A URL-friendly identifier for the item.
         */
        public Builder slug(Optional<String> slug) {
            Utils.checkNotNull(slug, "slug");
            this.slug = slug;
            return this;
        }

        /**
         * The studio that produced the content.
         */
        public Builder studio(String studio) {
            Utils.checkNotNull(studio, "studio");
            this.studio = Optional.ofNullable(studio);
            return this;
        }

        /**
         * The studio that produced the content.
         */
        public Builder studio(Optional<String> studio) {
            Utils.checkNotNull(studio, "studio");
            this.studio = studio;
            return this;
        }

        /**
         * The type of content (e.g., show, movie).
         */
        public Builder type(String type) {
            Utils.checkNotNull(type, "type");
            this.type = type;
            return this;
        }

        /**
         * The title of the content.
         */
        public Builder title(String title) {
            Utils.checkNotNull(title, "title");
            this.title = title;
            return this;
        }

        /**
         * The original title of the content.
         */
        public Builder originalTitle(String originalTitle) {
            Utils.checkNotNull(originalTitle, "originalTitle");
            this.originalTitle = Optional.ofNullable(originalTitle);
            return this;
        }

        /**
         * The original title of the content.
         */
        public Builder originalTitle(Optional<String> originalTitle) {
            Utils.checkNotNull(originalTitle, "originalTitle");
            this.originalTitle = originalTitle;
            return this;
        }

        /**
         * The title of the library section.
         */
        public Builder librarySectionTitle(String librarySectionTitle) {
            Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
            this.librarySectionTitle = librarySectionTitle;
            return this;
        }

        /**
         * The ID of the library section.
         */
        public Builder librarySectionID(long librarySectionID) {
            Utils.checkNotNull(librarySectionID, "librarySectionID");
            this.librarySectionID = librarySectionID;
            return this;
        }

        /**
         * The key of the library section.
         */
        public Builder librarySectionKey(String librarySectionKey) {
            Utils.checkNotNull(librarySectionKey, "librarySectionKey");
            this.librarySectionKey = librarySectionKey;
            return this;
        }

        /**
         * The content rating (e.g., TV-MA).
         */
        public Builder contentRating(String contentRating) {
            Utils.checkNotNull(contentRating, "contentRating");
            this.contentRating = Optional.ofNullable(contentRating);
            return this;
        }

        /**
         * The content rating (e.g., TV-MA).
         */
        public Builder contentRating(Optional<String> contentRating) {
            Utils.checkNotNull(contentRating, "contentRating");
            this.contentRating = contentRating;
            return this;
        }

        /**
         * A summary of the content.
         */
        public Builder summary(String summary) {
            Utils.checkNotNull(summary, "summary");
            this.summary = summary;
            return this;
        }

        /**
         * The index or order of the item.
         */
        public Builder index(long index) {
            Utils.checkNotNull(index, "index");
            this.index = Optional.ofNullable(index);
            return this;
        }

        /**
         * The index or order of the item.
         */
        public Builder index(Optional<Long> index) {
            Utils.checkNotNull(index, "index");
            this.index = index;
            return this;
        }

        /**
         * The title of the grandparent entity (typically the show's title).
         */
        public Builder grandparentTitle(String grandparentTitle) {
            Utils.checkNotNull(grandparentTitle, "grandparentTitle");
            this.grandparentTitle = Optional.ofNullable(grandparentTitle);
            return this;
        }

        /**
         * The title of the grandparent entity (typically the show's title).
         */
        public Builder grandparentTitle(Optional<String> grandparentTitle) {
            Utils.checkNotNull(grandparentTitle, "grandparentTitle");
            this.grandparentTitle = grandparentTitle;
            return this;
        }

        /**
         * The title of the parent entity (typically the season's title).
         */
        public Builder parentTitle(String parentTitle) {
            Utils.checkNotNull(parentTitle, "parentTitle");
            this.parentTitle = Optional.ofNullable(parentTitle);
            return this;
        }

        /**
         * The title of the parent entity (typically the season's title).
         */
        public Builder parentTitle(Optional<String> parentTitle) {
            Utils.checkNotNull(parentTitle, "parentTitle");
            this.parentTitle = parentTitle;
            return this;
        }

        /**
         * The audience rating for the content.
         */
        public Builder audienceRating(float audienceRating) {
            Utils.checkNotNull(audienceRating, "audienceRating");
            this.audienceRating = Optional.ofNullable(audienceRating);
            return this;
        }

        /**
         * The audience rating for the content.
         */
        public Builder audienceRating(Optional<Float> audienceRating) {
            Utils.checkNotNull(audienceRating, "audienceRating");
            this.audienceRating = audienceRating;
            return this;
        }

        /**
         * The number of times the item has been viewed.
         */
        public Builder viewCount(long viewCount) {
            Utils.checkNotNull(viewCount, "viewCount");
            this.viewCount = Optional.ofNullable(viewCount);
            return this;
        }

        /**
         * The number of times the item has been viewed.
         */
        public Builder viewCount(Optional<Long> viewCount) {
            Utils.checkNotNull(viewCount, "viewCount");
            this.viewCount = viewCount;
            return this;
        }

        /**
         * The number of times the item has been skipped.
         */
        public Builder skipCount(long skipCount) {
            Utils.checkNotNull(skipCount, "skipCount");
            this.skipCount = Optional.ofNullable(skipCount);
            return this;
        }

        /**
         * The number of times the item has been skipped.
         */
        public Builder skipCount(Optional<Long> skipCount) {
            Utils.checkNotNull(skipCount, "skipCount");
            this.skipCount = skipCount;
            return this;
        }

        /**
         * Unix timestamp of when the item was last viewed.
         */
        public Builder lastViewedAt(long lastViewedAt) {
            Utils.checkNotNull(lastViewedAt, "lastViewedAt");
            this.lastViewedAt = Optional.ofNullable(lastViewedAt);
            return this;
        }

        /**
         * Unix timestamp of when the item was last viewed.
         */
        public Builder lastViewedAt(Optional<Long> lastViewedAt) {
            Utils.checkNotNull(lastViewedAt, "lastViewedAt");
            this.lastViewedAt = lastViewedAt;
            return this;
        }

        /**
         * The release year.
         */
        public Builder year(int year) {
            Utils.checkNotNull(year, "year");
            this.year = year;
            return this;
        }

        /**
         * The general rating
         */
        public Builder rating(float rating) {
            Utils.checkNotNull(rating, "rating");
            this.rating = Optional.ofNullable(rating);
            return this;
        }

        /**
         * The general rating
         */
        public Builder rating(Optional<Float> rating) {
            Utils.checkNotNull(rating, "rating");
            this.rating = rating;
            return this;
        }

        /**
         * The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
         */
        public Builder ratingImage(String ratingImage) {
            Utils.checkNotNull(ratingImage, "ratingImage");
            this.ratingImage = Optional.ofNullable(ratingImage);
            return this;
        }

        /**
         * The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image).
         */
        public Builder ratingImage(Optional<String> ratingImage) {
            Utils.checkNotNull(ratingImage, "ratingImage");
            this.ratingImage = ratingImage;
            return this;
        }

        /**
         * The tagline of the content.
         */
        public Builder tagline(String tagline) {
            Utils.checkNotNull(tagline, "tagline");
            this.tagline = Optional.ofNullable(tagline);
            return this;
        }

        /**
         * The tagline of the content.
         */
        public Builder tagline(Optional<String> tagline) {
            Utils.checkNotNull(tagline, "tagline");
            this.tagline = tagline;
            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;
        }

        /**
         * URL of the thumbnail image.
         */
        public Builder thumb(String thumb) {
            Utils.checkNotNull(thumb, "thumb");
            this.thumb = thumb;
            return this;
        }

        /**
         * URL of the art image.
         */
        public Builder art(String art) {
            Utils.checkNotNull(art, "art");
            this.art = art;
            return this;
        }

        /**
         * URL of the theme image.
         */
        public Builder theme(String theme) {
            Utils.checkNotNull(theme, "theme");
            this.theme = Optional.ofNullable(theme);
            return this;
        }

        /**
         * URL of the theme image.
         */
        public Builder theme(Optional<String> theme) {
            Utils.checkNotNull(theme, "theme");
            this.theme = theme;
            return this;
        }

        /**
         * Duration of the content in milliseconds.
         */
        public Builder duration(int duration) {
            Utils.checkNotNull(duration, "duration");
            this.duration = duration;
            return this;
        }

        /**
         * The original release date.
         */
        public Builder originallyAvailableAt(LocalDate originallyAvailableAt) {
            Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
            this.originallyAvailableAt = Optional.ofNullable(originallyAvailableAt);
            return this;
        }

        /**
         * The original release date.
         */
        public Builder originallyAvailableAt(Optional<LocalDate> originallyAvailableAt) {
            Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
            this.originallyAvailableAt = originallyAvailableAt;
            return this;
        }

        /**
         * The total number of episodes (or leaves).
         */
        public Builder leafCount(long leafCount) {
            Utils.checkNotNull(leafCount, "leafCount");
            this.leafCount = Optional.ofNullable(leafCount);
            return this;
        }

        /**
         * The total number of episodes (or leaves).
         */
        public Builder leafCount(Optional<Long> leafCount) {
            Utils.checkNotNull(leafCount, "leafCount");
            this.leafCount = leafCount;
            return this;
        }

        /**
         * The number of episodes that have been viewed.
         */
        public Builder viewedLeafCount(long viewedLeafCount) {
            Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
            this.viewedLeafCount = Optional.ofNullable(viewedLeafCount);
            return this;
        }

        /**
         * The number of episodes that have been viewed.
         */
        public Builder viewedLeafCount(Optional<Long> viewedLeafCount) {
            Utils.checkNotNull(viewedLeafCount, "viewedLeafCount");
            this.viewedLeafCount = viewedLeafCount;
            return this;
        }

        /**
         * The number of child items.
         */
        public Builder childCount(int childCount) {
            Utils.checkNotNull(childCount, "childCount");
            this.childCount = Optional.ofNullable(childCount);
            return this;
        }

        /**
         * The number of child items.
         */
        public Builder childCount(Optional<Integer> childCount) {
            Utils.checkNotNull(childCount, "childCount");
            this.childCount = childCount;
            return this;
        }

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

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

        /**
         * The URL for the audience rating image.
         */
        public Builder audienceRatingImage(String audienceRatingImage) {
            Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
            this.audienceRatingImage = Optional.ofNullable(audienceRatingImage);
            return this;
        }

        /**
         * The URL for the audience rating image.
         */
        public Builder audienceRatingImage(Optional<String> audienceRatingImage) {
            Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
            this.audienceRatingImage = audienceRatingImage;
            return this;
        }

        /**
         * The index number of the parent entity, which could indicate its order or position.
         */
        public Builder parentIndex(long parentIndex) {
            Utils.checkNotNull(parentIndex, "parentIndex");
            this.parentIndex = Optional.ofNullable(parentIndex);
            return this;
        }

        /**
         * The index number of the parent entity, which could indicate its order or position.
         */
        public Builder parentIndex(Optional<Long> parentIndex) {
            Utils.checkNotNull(parentIndex, "parentIndex");
            this.parentIndex = parentIndex;
            return this;
        }

        /**
         * The URL of the parent's thumbnail image.
         */
        public Builder parentThumb(String parentThumb) {
            Utils.checkNotNull(parentThumb, "parentThumb");
            this.parentThumb = Optional.ofNullable(parentThumb);
            return this;
        }

        /**
         * The URL of the parent's thumbnail image.
         */
        public Builder parentThumb(Optional<String> parentThumb) {
            Utils.checkNotNull(parentThumb, "parentThumb");
            this.parentThumb = parentThumb;
            return this;
        }

        /**
         * The URL of the grandparent's thumbnail image.
         */
        public Builder grandparentThumb(String grandparentThumb) {
            Utils.checkNotNull(grandparentThumb, "grandparentThumb");
            this.grandparentThumb = Optional.ofNullable(grandparentThumb);
            return this;
        }

        /**
         * The URL of the grandparent's thumbnail image.
         */
        public Builder grandparentThumb(Optional<String> grandparentThumb) {
            Utils.checkNotNull(grandparentThumb, "grandparentThumb");
            this.grandparentThumb = grandparentThumb;
            return this;
        }

        /**
         * The URL of the grandparent's art image.
         */
        public Builder grandparentArt(String grandparentArt) {
            Utils.checkNotNull(grandparentArt, "grandparentArt");
            this.grandparentArt = Optional.ofNullable(grandparentArt);
            return this;
        }

        /**
         * The URL of the grandparent's art image.
         */
        public Builder grandparentArt(Optional<String> grandparentArt) {
            Utils.checkNotNull(grandparentArt, "grandparentArt");
            this.grandparentArt = grandparentArt;
            return this;
        }

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

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

        /**
         * An array of image objects.
         */
        public Builder image(List<GetMediaMetaDataImage> image) {
            Utils.checkNotNull(image, "image");
            this.image = image;
            return this;
        }

        public Builder ultraBlurColors(GetMediaMetaDataUltraBlurColors ultraBlurColors) {
            Utils.checkNotNull(ultraBlurColors, "ultraBlurColors");
            this.ultraBlurColors = ultraBlurColors;
            return this;
        }

        /**
         * An array of genre tags.
         */
        public Builder genre(List<GetMediaMetaDataGenre> genre) {
            Utils.checkNotNull(genre, "genre");
            this.genre = Optional.ofNullable(genre);
            return this;
        }

        /**
         * An array of genre tags.
         */
        public Builder genre(Optional<? extends List<GetMediaMetaDataGenre>> genre) {
            Utils.checkNotNull(genre, "genre");
            this.genre = genre;
            return this;
        }

        /**
         * An array of country tags.
         */
        public Builder country(List<GetMediaMetaDataCountry> country) {
            Utils.checkNotNull(country, "country");
            this.country = Optional.ofNullable(country);
            return this;
        }

        /**
         * An array of country tags.
         */
        public Builder country(Optional<? extends List<GetMediaMetaDataCountry>> country) {
            Utils.checkNotNull(country, "country");
            this.country = country;
            return this;
        }

        /**
         * An array of GUID objects.
         */
        public Builder guids(List<GetMediaMetaDataGuids> guids) {
            Utils.checkNotNull(guids, "guids");
            this.guids = Optional.ofNullable(guids);
            return this;
        }

        /**
         * An array of GUID objects.
         */
        public Builder guids(Optional<? extends List<GetMediaMetaDataGuids>> guids) {
            Utils.checkNotNull(guids, "guids");
            this.guids = guids;
            return this;
        }

        /**
         * An array of rating objects.
         */
        public Builder ratings(List<Ratings> ratings) {
            Utils.checkNotNull(ratings, "ratings");
            this.ratings = Optional.ofNullable(ratings);
            return this;
        }

        /**
         * An array of rating objects.
         */
        public Builder ratings(Optional<? extends List<Ratings>> ratings) {
            Utils.checkNotNull(ratings, "ratings");
            this.ratings = ratings;
            return this;
        }

        /**
         * An array of Actor roles.
         */
        public Builder role(List<GetMediaMetaDataRole> role) {
            Utils.checkNotNull(role, "role");
            this.role = Optional.ofNullable(role);
            return this;
        }

        /**
         * An array of Actor roles.
         */
        public Builder role(Optional<? extends List<GetMediaMetaDataRole>> role) {
            Utils.checkNotNull(role, "role");
            this.role = role;
            return this;
        }

        /**
         * An array of Director roles.
         */
        public Builder director(List<GetMediaMetaDataDirector> director) {
            Utils.checkNotNull(director, "director");
            this.director = Optional.ofNullable(director);
            return this;
        }

        /**
         * An array of Director roles.
         */
        public Builder director(Optional<? extends List<GetMediaMetaDataDirector>> director) {
            Utils.checkNotNull(director, "director");
            this.director = director;
            return this;
        }

        /**
         * An array of Writer roles.
         */
        public Builder writer(List<GetMediaMetaDataWriter> writer) {
            Utils.checkNotNull(writer, "writer");
            this.writer = Optional.ofNullable(writer);
            return this;
        }

        /**
         * An array of Writer roles.
         */
        public Builder writer(Optional<? extends List<GetMediaMetaDataWriter>> writer) {
            Utils.checkNotNull(writer, "writer");
            this.writer = writer;
            return this;
        }

        /**
         * An array of Writer roles.
         */
        public Builder producer(List<Producer> producer) {
            Utils.checkNotNull(producer, "producer");
            this.producer = Optional.ofNullable(producer);
            return this;
        }

        /**
         * An array of Writer roles.
         */
        public Builder producer(Optional<? extends List<Producer>> producer) {
            Utils.checkNotNull(producer, "producer");
            this.producer = producer;
            return this;
        }

        /**
         * An array of similar content objects.
         */
        public Builder similar(List<Similar> similar) {
            Utils.checkNotNull(similar, "similar");
            this.similar = Optional.ofNullable(similar);
            return this;
        }

        /**
         * An array of similar content objects.
         */
        public Builder similar(Optional<? extends List<Similar>> similar) {
            Utils.checkNotNull(similar, "similar");
            this.similar = similar;
            return this;
        }

        /**
         * An array of location objects.
         */
        public Builder location(List<GetMediaMetaDataLocation> location) {
            Utils.checkNotNull(location, "location");
            this.location = Optional.ofNullable(location);
            return this;
        }

        /**
         * An array of location objects.
         */
        public Builder location(Optional<? extends List<GetMediaMetaDataLocation>> location) {
            Utils.checkNotNull(location, "location");
            this.location = location;
            return this;
        }
        
        public GetMediaMetaDataMetadata build() {
            return new GetMediaMetaDataMetadata(
                ratingKey,
                parentRatingKey,
                grandparentRatingKey,
                parentGuid,
                grandparentGuid,
                grandparentSlug,
                grandparentKey,
                parentKey,
                key,
                guid,
                slug,
                studio,
                type,
                title,
                originalTitle,
                librarySectionTitle,
                librarySectionID,
                librarySectionKey,
                contentRating,
                summary,
                index,
                grandparentTitle,
                parentTitle,
                audienceRating,
                viewCount,
                skipCount,
                lastViewedAt,
                year,
                rating,
                ratingImage,
                tagline,
                chapterSource,
                primaryExtraKey,
                thumb,
                art,
                theme,
                duration,
                originallyAvailableAt,
                leafCount,
                viewedLeafCount,
                childCount,
                addedAt,
                updatedAt,
                audienceRatingImage,
                parentIndex,
                parentThumb,
                grandparentThumb,
                grandparentArt,
                media,
                image,
                ultraBlurColors,
                genre,
                country,
                guids,
                ratings,
                role,
                director,
                writer,
                producer,
                similar,
                location);
        }
    }
}

