/* 
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

package dev.plexapi.sdk.models.operations;


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Double;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.time.LocalDate;
import java.util.List;
import java.util.Objects;
import java.util.Optional;


public class GetPlaylistContentsMetadata {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @JsonCreator
    public GetPlaylistContentsMetadata(
            @JsonProperty("ratingKey") Optional<String> ratingKey,
            @JsonProperty("key") Optional<String> key,
            @JsonProperty("guid") Optional<String> guid,
            @JsonProperty("studio") Optional<String> studio,
            @JsonProperty("type") Optional<String> type,
            @JsonProperty("title") Optional<String> title,
            @JsonProperty("titleSort") Optional<String> titleSort,
            @JsonProperty("librarySectionTitle") Optional<String> librarySectionTitle,
            @JsonProperty("librarySectionID") Optional<Integer> librarySectionID,
            @JsonProperty("librarySectionKey") Optional<String> librarySectionKey,
            @JsonProperty("contentRating") Optional<String> contentRating,
            @JsonProperty("summary") Optional<String> summary,
            @JsonProperty("rating") Optional<Double> rating,
            @JsonProperty("audienceRating") Optional<Double> audienceRating,
            @JsonProperty("year") Optional<Integer> year,
            @JsonProperty("tagline") Optional<String> tagline,
            @JsonProperty("thumb") Optional<String> thumb,
            @JsonProperty("art") Optional<String> art,
            @JsonProperty("duration") Optional<Integer> duration,
            @JsonProperty("originallyAvailableAt") Optional<LocalDate> originallyAvailableAt,
            @JsonProperty("addedAt") Optional<Integer> addedAt,
            @JsonProperty("updatedAt") Optional<Integer> updatedAt,
            @JsonProperty("audienceRatingImage") Optional<String> audienceRatingImage,
            @JsonProperty("hasPremiumExtras") Optional<String> hasPremiumExtras,
            @JsonProperty("hasPremiumPrimaryExtra") Optional<String> hasPremiumPrimaryExtra,
            @JsonProperty("ratingImage") Optional<String> ratingImage,
            @JsonProperty("Media") Optional<? extends List<GetPlaylistContentsMedia>> media,
            @JsonProperty("Genre") Optional<? extends List<GetPlaylistContentsGenre>> genre,
            @JsonProperty("Country") Optional<? extends List<GetPlaylistContentsCountry>> country,
            @JsonProperty("Director") Optional<? extends List<GetPlaylistContentsDirector>> director,
            @JsonProperty("Writer") Optional<? extends List<GetPlaylistContentsWriter>> writer,
            @JsonProperty("Role") Optional<? extends List<GetPlaylistContentsRole>> role) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        Utils.checkNotNull(key, "key");
        Utils.checkNotNull(guid, "guid");
        Utils.checkNotNull(studio, "studio");
        Utils.checkNotNull(type, "type");
        Utils.checkNotNull(title, "title");
        Utils.checkNotNull(titleSort, "titleSort");
        Utils.checkNotNull(librarySectionTitle, "librarySectionTitle");
        Utils.checkNotNull(librarySectionID, "librarySectionID");
        Utils.checkNotNull(librarySectionKey, "librarySectionKey");
        Utils.checkNotNull(contentRating, "contentRating");
        Utils.checkNotNull(summary, "summary");
        Utils.checkNotNull(rating, "rating");
        Utils.checkNotNull(audienceRating, "audienceRating");
        Utils.checkNotNull(year, "year");
        Utils.checkNotNull(tagline, "tagline");
        Utils.checkNotNull(thumb, "thumb");
        Utils.checkNotNull(art, "art");
        Utils.checkNotNull(duration, "duration");
        Utils.checkNotNull(originallyAvailableAt, "originallyAvailableAt");
        Utils.checkNotNull(addedAt, "addedAt");
        Utils.checkNotNull(updatedAt, "updatedAt");
        Utils.checkNotNull(audienceRatingImage, "audienceRatingImage");
        Utils.checkNotNull(hasPremiumExtras, "hasPremiumExtras");
        Utils.checkNotNull(hasPremiumPrimaryExtra, "hasPremiumPrimaryExtra");
        Utils.checkNotNull(ratingImage, "ratingImage");
        Utils.checkNotNull(media, "media");
        Utils.checkNotNull(genre, "genre");
        Utils.checkNotNull(country, "country");
        Utils.checkNotNull(director, "director");
        Utils.checkNotNull(writer, "writer");
        Utils.checkNotNull(role, "role");
        this.ratingKey = ratingKey;
        this.key = key;
        this.guid = guid;
        this.studio = studio;
        this.type = type;
        this.title = title;
        this.titleSort = titleSort;
        this.librarySectionTitle = librarySectionTitle;
        this.librarySectionID = librarySectionID;
        this.librarySectionKey = librarySectionKey;
        this.contentRating = contentRating;
        this.summary = summary;
        this.rating = rating;
        this.audienceRating = audienceRating;
        this.year = year;
        this.tagline = tagline;
        this.thumb = thumb;
        this.art = art;
        this.duration = duration;
        this.originallyAvailableAt = originallyAvailableAt;
        this.addedAt = addedAt;
        this.updatedAt = updatedAt;
        this.audienceRatingImage = audienceRatingImage;
        this.hasPremiumExtras = hasPremiumExtras;
        this.hasPremiumPrimaryExtra = hasPremiumPrimaryExtra;
        this.ratingImage = ratingImage;
        this.media = media;
        this.genre = genre;
        this.country = country;
        this.director = director;
        this.writer = writer;
        this.role = role;
    }
    
    public GetPlaylistContentsMetadata() {
        this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    public GetPlaylistContentsMetadata withRole(Optional<? extends List<GetPlaylistContentsRole>> role) {
        Utils.checkNotNull(role, "role");
        this.role = role;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetPlaylistContentsMetadata other = (GetPlaylistContentsMetadata) o;
        return 
            Objects.deepEquals(this.ratingKey, other.ratingKey) &&
            Objects.deepEquals(this.key, other.key) &&
            Objects.deepEquals(this.guid, other.guid) &&
            Objects.deepEquals(this.studio, other.studio) &&
            Objects.deepEquals(this.type, other.type) &&
            Objects.deepEquals(this.title, other.title) &&
            Objects.deepEquals(this.titleSort, other.titleSort) &&
            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.rating, other.rating) &&
            Objects.deepEquals(this.audienceRating, other.audienceRating) &&
            Objects.deepEquals(this.year, other.year) &&
            Objects.deepEquals(this.tagline, other.tagline) &&
            Objects.deepEquals(this.thumb, other.thumb) &&
            Objects.deepEquals(this.art, other.art) &&
            Objects.deepEquals(this.duration, other.duration) &&
            Objects.deepEquals(this.originallyAvailableAt, other.originallyAvailableAt) &&
            Objects.deepEquals(this.addedAt, other.addedAt) &&
            Objects.deepEquals(this.updatedAt, other.updatedAt) &&
            Objects.deepEquals(this.audienceRatingImage, other.audienceRatingImage) &&
            Objects.deepEquals(this.hasPremiumExtras, other.hasPremiumExtras) &&
            Objects.deepEquals(this.hasPremiumPrimaryExtra, other.hasPremiumPrimaryExtra) &&
            Objects.deepEquals(this.ratingImage, other.ratingImage) &&
            Objects.deepEquals(this.media, other.media) &&
            Objects.deepEquals(this.genre, other.genre) &&
            Objects.deepEquals(this.country, other.country) &&
            Objects.deepEquals(this.director, other.director) &&
            Objects.deepEquals(this.writer, other.writer) &&
            Objects.deepEquals(this.role, other.role);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            ratingKey,
            key,
            guid,
            studio,
            type,
            title,
            titleSort,
            librarySectionTitle,
            librarySectionID,
            librarySectionKey,
            contentRating,
            summary,
            rating,
            audienceRating,
            year,
            tagline,
            thumb,
            art,
            duration,
            originallyAvailableAt,
            addedAt,
            updatedAt,
            audienceRatingImage,
            hasPremiumExtras,
            hasPremiumPrimaryExtra,
            ratingImage,
            media,
            genre,
            country,
            director,
            writer,
            role);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetPlaylistContentsMetadata.class,
                "ratingKey", ratingKey,
                "key", key,
                "guid", guid,
                "studio", studio,
                "type", type,
                "title", title,
                "titleSort", titleSort,
                "librarySectionTitle", librarySectionTitle,
                "librarySectionID", librarySectionID,
                "librarySectionKey", librarySectionKey,
                "contentRating", contentRating,
                "summary", summary,
                "rating", rating,
                "audienceRating", audienceRating,
                "year", year,
                "tagline", tagline,
                "thumb", thumb,
                "art", art,
                "duration", duration,
                "originallyAvailableAt", originallyAvailableAt,
                "addedAt", addedAt,
                "updatedAt", updatedAt,
                "audienceRatingImage", audienceRatingImage,
                "hasPremiumExtras", hasPremiumExtras,
                "hasPremiumPrimaryExtra", hasPremiumPrimaryExtra,
                "ratingImage", ratingImage,
                "media", media,
                "genre", genre,
                "country", country,
                "director", director,
                "writer", writer,
                "role", role);
    }
    
    public final static class Builder {
 
        private Optional<String> ratingKey = Optional.empty();
 
        private Optional<String> key = Optional.empty();
 
        private Optional<String> guid = Optional.empty();
 
        private Optional<String> studio = Optional.empty();
 
        private Optional<String> type = Optional.empty();
 
        private Optional<String> title = Optional.empty();
 
        private Optional<String> titleSort = Optional.empty();
 
        private Optional<String> librarySectionTitle = Optional.empty();
 
        private Optional<Integer> librarySectionID = Optional.empty();
 
        private Optional<String> librarySectionKey = Optional.empty();
 
        private Optional<String> contentRating = Optional.empty();
 
        private Optional<String> summary = Optional.empty();
 
        private Optional<Double> rating = Optional.empty();
 
        private Optional<Double> audienceRating = Optional.empty();
 
        private Optional<Integer> year = Optional.empty();
 
        private Optional<String> tagline = Optional.empty();
 
        private Optional<String> thumb = Optional.empty();
 
        private Optional<String> art = Optional.empty();
 
        private Optional<Integer> duration = Optional.empty();
 
        private Optional<LocalDate> originallyAvailableAt = Optional.empty();
 
        private Optional<Integer> addedAt = Optional.empty();
 
        private Optional<Integer> updatedAt = Optional.empty();
 
        private Optional<String> audienceRatingImage = Optional.empty();
 
        private Optional<String> hasPremiumExtras = Optional.empty();
 
        private Optional<String> hasPremiumPrimaryExtra = Optional.empty();
 
        private Optional<String> ratingImage = Optional.empty();
 
        private Optional<? extends List<GetPlaylistContentsMedia>> media = Optional.empty();
 
        private Optional<? extends List<GetPlaylistContentsGenre>> genre = Optional.empty();
 
        private Optional<? extends List<GetPlaylistContentsCountry>> country = Optional.empty();
 
        private Optional<? extends List<GetPlaylistContentsDirector>> director = Optional.empty();
 
        private Optional<? extends List<GetPlaylistContentsWriter>> writer = Optional.empty();
 
        private Optional<? extends List<GetPlaylistContentsRole>> role = Optional.empty();  
        
        private Builder() {
          // force use of static builder() method
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public Builder role(Optional<? extends List<GetPlaylistContentsRole>> role) {
            Utils.checkNotNull(role, "role");
            this.role = role;
            return this;
        }
        
        public GetPlaylistContentsMetadata build() {
            return new GetPlaylistContentsMetadata(
                ratingKey,
                key,
                guid,
                studio,
                type,
                title,
                titleSort,
                librarySectionTitle,
                librarySectionID,
                librarySectionKey,
                contentRating,
                summary,
                rating,
                audienceRating,
                year,
                tagline,
                thumb,
                art,
                duration,
                originallyAvailableAt,
                addedAt,
                updatedAt,
                audienceRatingImage,
                hasPremiumExtras,
                hasPremiumPrimaryExtra,
                ratingImage,
                media,
                genre,
                country,
                director,
                writer,
                role);
        }
    }
}

