/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; import java.lang.Float; import java.lang.Integer; import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; import java.util.Objects; import java.util.Optional; public class GetLibraryItemsMedia { /** * Unique media identifier. */ @JsonProperty("id") private long id; /** * Duration of the media in milliseconds. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") private Optional duration; /** * Bitrate in bits per second. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("bitrate") private Optional bitrate; /** * Video width in pixels. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("width") private Optional width; /** * Video height in pixels. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("height") private Optional height; /** * Aspect ratio of the video. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("aspectRatio") private Optional aspectRatio; /** * Number of audio channels. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioChannels") private Optional audioChannels; @JsonInclude(Include.NON_ABSENT) @JsonProperty("displayOffset") private Optional displayOffset; /** * Audio codec used. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioCodec") private Optional audioCodec; /** * Video codec used. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoCodec") private Optional videoCodec; /** * Video resolution (e.g., 4k). */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoResolution") private Optional videoResolution; /** * Container format of the media. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("container") private Optional container; /** * Frame rate of the video. Values found include NTSC, PAL, 24p */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoFrameRate") private Optional videoFrameRate; /** * Video profile (e.g., main 10). */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoProfile") private Optional videoProfile; /** * Indicates whether voice activity is detected. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("hasVoiceActivity") private Optional hasVoiceActivity; /** * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioProfile") private Optional audioProfile; /** * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("optimizedForStreaming") private Optional optimizedForStreaming; /** * Indicates whether the media has 64-bit offsets. * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("has64bitOffsets") private Optional has64bitOffsets; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Part") private Optional> part; @JsonCreator public GetLibraryItemsMedia( @JsonProperty("id") long id, @JsonProperty("duration") Optional duration, @JsonProperty("bitrate") Optional bitrate, @JsonProperty("width") Optional width, @JsonProperty("height") Optional height, @JsonProperty("aspectRatio") Optional aspectRatio, @JsonProperty("audioChannels") Optional audioChannels, @JsonProperty("displayOffset") Optional displayOffset, @JsonProperty("audioCodec") Optional audioCodec, @JsonProperty("videoCodec") Optional videoCodec, @JsonProperty("videoResolution") Optional videoResolution, @JsonProperty("container") Optional container, @JsonProperty("videoFrameRate") Optional videoFrameRate, @JsonProperty("videoProfile") Optional videoProfile, @JsonProperty("hasVoiceActivity") Optional hasVoiceActivity, @JsonProperty("audioProfile") Optional audioProfile, @JsonProperty("optimizedForStreaming") Optional optimizedForStreaming, @JsonProperty("has64bitOffsets") Optional has64bitOffsets, @JsonProperty("Part") Optional> part) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(bitrate, "bitrate"); Utils.checkNotNull(width, "width"); Utils.checkNotNull(height, "height"); Utils.checkNotNull(aspectRatio, "aspectRatio"); Utils.checkNotNull(audioChannels, "audioChannels"); Utils.checkNotNull(displayOffset, "displayOffset"); Utils.checkNotNull(audioCodec, "audioCodec"); Utils.checkNotNull(videoCodec, "videoCodec"); Utils.checkNotNull(videoResolution, "videoResolution"); Utils.checkNotNull(container, "container"); Utils.checkNotNull(videoFrameRate, "videoFrameRate"); Utils.checkNotNull(videoProfile, "videoProfile"); Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); Utils.checkNotNull(part, "part"); this.id = id; this.duration = duration; this.bitrate = bitrate; this.width = width; this.height = height; this.aspectRatio = aspectRatio; this.audioChannels = audioChannels; this.displayOffset = displayOffset; this.audioCodec = audioCodec; this.videoCodec = videoCodec; this.videoResolution = videoResolution; this.container = container; this.videoFrameRate = videoFrameRate; this.videoProfile = videoProfile; this.hasVoiceActivity = hasVoiceActivity; this.audioProfile = audioProfile; this.optimizedForStreaming = optimizedForStreaming; this.has64bitOffsets = has64bitOffsets; this.part = part; } public GetLibraryItemsMedia( long id) { this(id, 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()); } /** * Unique media identifier. */ @JsonIgnore public long id() { return id; } /** * Duration of the media in milliseconds. */ @JsonIgnore public Optional duration() { return duration; } /** * Bitrate in bits per second. */ @JsonIgnore public Optional bitrate() { return bitrate; } /** * Video width in pixels. */ @JsonIgnore public Optional width() { return width; } /** * Video height in pixels. */ @JsonIgnore public Optional height() { return height; } /** * Aspect ratio of the video. */ @JsonIgnore public Optional aspectRatio() { return aspectRatio; } /** * Number of audio channels. */ @JsonIgnore public Optional audioChannels() { return audioChannels; } @JsonIgnore public Optional displayOffset() { return displayOffset; } /** * Audio codec used. */ @JsonIgnore public Optional audioCodec() { return audioCodec; } /** * Video codec used. */ @JsonIgnore public Optional videoCodec() { return videoCodec; } /** * Video resolution (e.g., 4k). */ @JsonIgnore public Optional videoResolution() { return videoResolution; } /** * Container format of the media. */ @JsonIgnore public Optional container() { return container; } /** * Frame rate of the video. Values found include NTSC, PAL, 24p */ @JsonIgnore public Optional videoFrameRate() { return videoFrameRate; } /** * Video profile (e.g., main 10). */ @JsonIgnore public Optional videoProfile() { return videoProfile; } /** * Indicates whether voice activity is detected. */ @JsonIgnore public Optional hasVoiceActivity() { return hasVoiceActivity; } /** * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). */ @JsonIgnore public Optional audioProfile() { return audioProfile; } /** * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true */ @SuppressWarnings("unchecked") @JsonIgnore public Optional optimizedForStreaming() { return (Optional) optimizedForStreaming; } /** * Indicates whether the media has 64-bit offsets. * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. */ @JsonIgnore public Optional has64bitOffsets() { return has64bitOffsets; } @SuppressWarnings("unchecked") @JsonIgnore public Optional> part() { return (Optional>) part; } public final static Builder builder() { return new Builder(); } /** * Unique media identifier. */ public GetLibraryItemsMedia withId(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** * Duration of the media in milliseconds. */ public GetLibraryItemsMedia withDuration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } /** * Duration of the media in milliseconds. */ public GetLibraryItemsMedia withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } /** * Bitrate in bits per second. */ public GetLibraryItemsMedia withBitrate(int bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = Optional.ofNullable(bitrate); return this; } /** * Bitrate in bits per second. */ public GetLibraryItemsMedia withBitrate(Optional bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = bitrate; return this; } /** * Video width in pixels. */ public GetLibraryItemsMedia withWidth(int width) { Utils.checkNotNull(width, "width"); this.width = Optional.ofNullable(width); return this; } /** * Video width in pixels. */ public GetLibraryItemsMedia withWidth(Optional width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } /** * Video height in pixels. */ public GetLibraryItemsMedia withHeight(int height) { Utils.checkNotNull(height, "height"); this.height = Optional.ofNullable(height); return this; } /** * Video height in pixels. */ public GetLibraryItemsMedia withHeight(Optional height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } /** * Aspect ratio of the video. */ public GetLibraryItemsMedia withAspectRatio(float aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = Optional.ofNullable(aspectRatio); return this; } /** * Aspect ratio of the video. */ public GetLibraryItemsMedia withAspectRatio(Optional aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = aspectRatio; return this; } /** * Number of audio channels. */ public GetLibraryItemsMedia withAudioChannels(int audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = Optional.ofNullable(audioChannels); return this; } /** * Number of audio channels. */ public GetLibraryItemsMedia withAudioChannels(Optional audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = audioChannels; return this; } public GetLibraryItemsMedia withDisplayOffset(int displayOffset) { Utils.checkNotNull(displayOffset, "displayOffset"); this.displayOffset = Optional.ofNullable(displayOffset); return this; } public GetLibraryItemsMedia withDisplayOffset(Optional displayOffset) { Utils.checkNotNull(displayOffset, "displayOffset"); this.displayOffset = displayOffset; return this; } /** * Audio codec used. */ public GetLibraryItemsMedia withAudioCodec(String audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = Optional.ofNullable(audioCodec); return this; } /** * Audio codec used. */ public GetLibraryItemsMedia withAudioCodec(Optional audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = audioCodec; return this; } /** * Video codec used. */ public GetLibraryItemsMedia withVideoCodec(String videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = Optional.ofNullable(videoCodec); return this; } /** * Video codec used. */ public GetLibraryItemsMedia withVideoCodec(Optional videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = videoCodec; return this; } /** * Video resolution (e.g., 4k). */ public GetLibraryItemsMedia withVideoResolution(String videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = Optional.ofNullable(videoResolution); return this; } /** * Video resolution (e.g., 4k). */ public GetLibraryItemsMedia withVideoResolution(Optional videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = videoResolution; return this; } /** * Container format of the media. */ public GetLibraryItemsMedia withContainer(String container) { Utils.checkNotNull(container, "container"); this.container = Optional.ofNullable(container); return this; } /** * Container format of the media. */ public GetLibraryItemsMedia withContainer(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } /** * Frame rate of the video. Values found include NTSC, PAL, 24p */ public GetLibraryItemsMedia withVideoFrameRate(String videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = Optional.ofNullable(videoFrameRate); return this; } /** * Frame rate of the video. Values found include NTSC, PAL, 24p */ public GetLibraryItemsMedia withVideoFrameRate(Optional videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = videoFrameRate; return this; } /** * Video profile (e.g., main 10). */ public GetLibraryItemsMedia withVideoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = Optional.ofNullable(videoProfile); return this; } /** * Video profile (e.g., main 10). */ public GetLibraryItemsMedia withVideoProfile(Optional videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = videoProfile; return this; } /** * Indicates whether voice activity is detected. */ public GetLibraryItemsMedia withHasVoiceActivity(boolean hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); return this; } /** * Indicates whether voice activity is detected. */ public GetLibraryItemsMedia withHasVoiceActivity(Optional hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = hasVoiceActivity; return this; } /** * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). */ public GetLibraryItemsMedia withAudioProfile(String audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = Optional.ofNullable(audioProfile); return this; } /** * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). */ public GetLibraryItemsMedia withAudioProfile(Optional audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = audioProfile; return this; } /** * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true */ public GetLibraryItemsMedia withOptimizedForStreaming(GetLibraryItemsOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } /** * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true */ public GetLibraryItemsMedia withOptimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } /** * Indicates whether the media has 64-bit offsets. * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. */ public GetLibraryItemsMedia withHas64bitOffsets(boolean has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); return this; } /** * Indicates whether the media has 64-bit offsets. * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. */ public GetLibraryItemsMedia withHas64bitOffsets(Optional has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = has64bitOffsets; return this; } public GetLibraryItemsMedia withPart(List part) { Utils.checkNotNull(part, "part"); this.part = Optional.ofNullable(part); return this; } public GetLibraryItemsMedia withPart(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetLibraryItemsMedia other = (GetLibraryItemsMedia) o; return Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.duration, other.duration) && Objects.deepEquals(this.bitrate, other.bitrate) && Objects.deepEquals(this.width, other.width) && Objects.deepEquals(this.height, other.height) && Objects.deepEquals(this.aspectRatio, other.aspectRatio) && Objects.deepEquals(this.audioChannels, other.audioChannels) && Objects.deepEquals(this.displayOffset, other.displayOffset) && Objects.deepEquals(this.audioCodec, other.audioCodec) && Objects.deepEquals(this.videoCodec, other.videoCodec) && Objects.deepEquals(this.videoResolution, other.videoResolution) && Objects.deepEquals(this.container, other.container) && Objects.deepEquals(this.videoFrameRate, other.videoFrameRate) && Objects.deepEquals(this.videoProfile, other.videoProfile) && Objects.deepEquals(this.hasVoiceActivity, other.hasVoiceActivity) && Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.optimizedForStreaming, other.optimizedForStreaming) && Objects.deepEquals(this.has64bitOffsets, other.has64bitOffsets) && Objects.deepEquals(this.part, other.part); } @Override public int hashCode() { return Objects.hash( id, duration, bitrate, width, height, aspectRatio, audioChannels, displayOffset, audioCodec, videoCodec, videoResolution, container, videoFrameRate, videoProfile, hasVoiceActivity, audioProfile, optimizedForStreaming, has64bitOffsets, part); } @Override public String toString() { return Utils.toString(GetLibraryItemsMedia.class, "id", id, "duration", duration, "bitrate", bitrate, "width", width, "height", height, "aspectRatio", aspectRatio, "audioChannels", audioChannels, "displayOffset", displayOffset, "audioCodec", audioCodec, "videoCodec", videoCodec, "videoResolution", videoResolution, "container", container, "videoFrameRate", videoFrameRate, "videoProfile", videoProfile, "hasVoiceActivity", hasVoiceActivity, "audioProfile", audioProfile, "optimizedForStreaming", optimizedForStreaming, "has64bitOffsets", has64bitOffsets, "part", part); } public final static class Builder { private Long id; private Optional duration = Optional.empty(); private Optional bitrate = Optional.empty(); private Optional width = Optional.empty(); private Optional height = Optional.empty(); private Optional aspectRatio = Optional.empty(); private Optional audioChannels = Optional.empty(); private Optional displayOffset = Optional.empty(); private Optional audioCodec = Optional.empty(); private Optional videoCodec = Optional.empty(); private Optional videoResolution = Optional.empty(); private Optional container = Optional.empty(); private Optional videoFrameRate = Optional.empty(); private Optional videoProfile = Optional.empty(); private Optional hasVoiceActivity = Optional.empty(); private Optional audioProfile = Optional.empty(); private Optional optimizedForStreaming = Optional.empty(); private Optional has64bitOffsets = Optional.empty(); private Optional> part = Optional.empty(); private Builder() { // force use of static builder() method } /** * Unique media identifier. */ public Builder id(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** * Duration of the media in milliseconds. */ public Builder duration(int duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } /** * Duration of the media in milliseconds. */ public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } /** * Bitrate in bits per second. */ public Builder bitrate(int bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = Optional.ofNullable(bitrate); return this; } /** * Bitrate in bits per second. */ public Builder bitrate(Optional bitrate) { Utils.checkNotNull(bitrate, "bitrate"); this.bitrate = bitrate; return this; } /** * Video width in pixels. */ public Builder width(int width) { Utils.checkNotNull(width, "width"); this.width = Optional.ofNullable(width); return this; } /** * Video width in pixels. */ public Builder width(Optional width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } /** * Video height in pixels. */ public Builder height(int height) { Utils.checkNotNull(height, "height"); this.height = Optional.ofNullable(height); return this; } /** * Video height in pixels. */ public Builder height(Optional height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } /** * Aspect ratio of the video. */ public Builder aspectRatio(float aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = Optional.ofNullable(aspectRatio); return this; } /** * Aspect ratio of the video. */ public Builder aspectRatio(Optional aspectRatio) { Utils.checkNotNull(aspectRatio, "aspectRatio"); this.aspectRatio = aspectRatio; return this; } /** * Number of audio channels. */ public Builder audioChannels(int audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = Optional.ofNullable(audioChannels); return this; } /** * Number of audio channels. */ public Builder audioChannels(Optional audioChannels) { Utils.checkNotNull(audioChannels, "audioChannels"); this.audioChannels = audioChannels; return this; } public Builder displayOffset(int displayOffset) { Utils.checkNotNull(displayOffset, "displayOffset"); this.displayOffset = Optional.ofNullable(displayOffset); return this; } public Builder displayOffset(Optional displayOffset) { Utils.checkNotNull(displayOffset, "displayOffset"); this.displayOffset = displayOffset; return this; } /** * Audio codec used. */ public Builder audioCodec(String audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = Optional.ofNullable(audioCodec); return this; } /** * Audio codec used. */ public Builder audioCodec(Optional audioCodec) { Utils.checkNotNull(audioCodec, "audioCodec"); this.audioCodec = audioCodec; return this; } /** * Video codec used. */ public Builder videoCodec(String videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = Optional.ofNullable(videoCodec); return this; } /** * Video codec used. */ public Builder videoCodec(Optional videoCodec) { Utils.checkNotNull(videoCodec, "videoCodec"); this.videoCodec = videoCodec; return this; } /** * Video resolution (e.g., 4k). */ public Builder videoResolution(String videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = Optional.ofNullable(videoResolution); return this; } /** * Video resolution (e.g., 4k). */ public Builder videoResolution(Optional videoResolution) { Utils.checkNotNull(videoResolution, "videoResolution"); this.videoResolution = videoResolution; return this; } /** * Container format of the media. */ public Builder container(String container) { Utils.checkNotNull(container, "container"); this.container = Optional.ofNullable(container); return this; } /** * Container format of the media. */ public Builder container(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } /** * Frame rate of the video. Values found include NTSC, PAL, 24p */ public Builder videoFrameRate(String videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = Optional.ofNullable(videoFrameRate); return this; } /** * Frame rate of the video. Values found include NTSC, PAL, 24p */ public Builder videoFrameRate(Optional videoFrameRate) { Utils.checkNotNull(videoFrameRate, "videoFrameRate"); this.videoFrameRate = videoFrameRate; return this; } /** * Video profile (e.g., main 10). */ public Builder videoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = Optional.ofNullable(videoProfile); return this; } /** * Video profile (e.g., main 10). */ public Builder videoProfile(Optional videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = videoProfile; return this; } /** * Indicates whether voice activity is detected. */ public Builder hasVoiceActivity(boolean hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = Optional.ofNullable(hasVoiceActivity); return this; } /** * Indicates whether voice activity is detected. */ public Builder hasVoiceActivity(Optional hasVoiceActivity) { Utils.checkNotNull(hasVoiceActivity, "hasVoiceActivity"); this.hasVoiceActivity = hasVoiceActivity; return this; } /** * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). */ public Builder audioProfile(String audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = Optional.ofNullable(audioProfile); return this; } /** * The audio profile used for the media (e.g., DTS, Dolby Digital, etc.). */ public Builder audioProfile(Optional audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = audioProfile; return this; } /** * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true */ public Builder optimizedForStreaming(GetLibraryItemsOptimizedForStreaming optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = Optional.ofNullable(optimizedForStreaming); return this; } /** * Has this media been optimized for streaming. NOTE: This can be 0, 1, false or true */ public Builder optimizedForStreaming(Optional optimizedForStreaming) { Utils.checkNotNull(optimizedForStreaming, "optimizedForStreaming"); this.optimizedForStreaming = optimizedForStreaming; return this; } /** * Indicates whether the media has 64-bit offsets. * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. */ public Builder has64bitOffsets(boolean has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = Optional.ofNullable(has64bitOffsets); return this; } /** * Indicates whether the media has 64-bit offsets. * This is relevant for media files that may require larger offsets than what 32-bit integers can provide. */ public Builder has64bitOffsets(Optional has64bitOffsets) { Utils.checkNotNull(has64bitOffsets, "has64bitOffsets"); this.has64bitOffsets = has64bitOffsets; return this; } public Builder part(List part) { Utils.checkNotNull(part, "part"); this.part = Optional.ofNullable(part); return this; } public Builder part(Optional> part) { Utils.checkNotNull(part, "part"); this.part = part; return this; } public GetLibraryItemsMedia build() { return new GetLibraryItemsMedia( id, duration, bitrate, width, height, aspectRatio, audioChannels, displayOffset, audioCodec, videoCodec, videoResolution, container, videoFrameRate, videoProfile, hasVoiceActivity, audioProfile, optimizedForStreaming, has64bitOffsets, part); } } }