/* * 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.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; import java.util.Objects; import java.util.Optional; public class GetOnDeckPart { @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") private Optional id; @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") private Optional key; @JsonInclude(Include.NON_ABSENT) @JsonProperty("duration") private Optional duration; @JsonInclude(Include.NON_ABSENT) @JsonProperty("file") private Optional file; @JsonInclude(Include.NON_ABSENT) @JsonProperty("size") private Optional size; @JsonInclude(Include.NON_ABSENT) @JsonProperty("audioProfile") private Optional audioProfile; @JsonInclude(Include.NON_ABSENT) @JsonProperty("container") private Optional container; @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoProfile") private Optional videoProfile; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Stream") private Optional> stream; @JsonCreator public GetOnDeckPart( @JsonProperty("id") Optional id, @JsonProperty("key") Optional key, @JsonProperty("duration") Optional duration, @JsonProperty("file") Optional file, @JsonProperty("size") Optional size, @JsonProperty("audioProfile") Optional audioProfile, @JsonProperty("container") Optional container, @JsonProperty("videoProfile") Optional videoProfile, @JsonProperty("Stream") Optional> stream) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(file, "file"); Utils.checkNotNull(size, "size"); Utils.checkNotNull(audioProfile, "audioProfile"); Utils.checkNotNull(container, "container"); Utils.checkNotNull(videoProfile, "videoProfile"); Utils.checkNotNull(stream, "stream"); this.id = id; this.key = key; this.duration = duration; this.file = file; this.size = size; this.audioProfile = audioProfile; this.container = container; this.videoProfile = videoProfile; this.stream = stream; } public GetOnDeckPart() { this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore public Optional id() { return id; } @JsonIgnore public Optional key() { return key; } @JsonIgnore public Optional duration() { return duration; } @JsonIgnore public Optional file() { return file; } @JsonIgnore public Optional size() { return size; } @JsonIgnore public Optional audioProfile() { return audioProfile; } @JsonIgnore public Optional container() { return container; } @JsonIgnore public Optional videoProfile() { return videoProfile; } @SuppressWarnings("unchecked") @JsonIgnore public Optional> stream() { return (Optional>) stream; } public final static Builder builder() { return new Builder(); } public GetOnDeckPart withId(double id) { Utils.checkNotNull(id, "id"); this.id = Optional.ofNullable(id); return this; } public GetOnDeckPart withId(Optional id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } public GetOnDeckPart withKey(String key) { Utils.checkNotNull(key, "key"); this.key = Optional.ofNullable(key); return this; } public GetOnDeckPart withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public GetOnDeckPart withDuration(double duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } public GetOnDeckPart withDuration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } public GetOnDeckPart withFile(String file) { Utils.checkNotNull(file, "file"); this.file = Optional.ofNullable(file); return this; } public GetOnDeckPart withFile(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; } public GetOnDeckPart withSize(double size) { Utils.checkNotNull(size, "size"); this.size = Optional.ofNullable(size); return this; } public GetOnDeckPart withSize(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } public GetOnDeckPart withAudioProfile(String audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = Optional.ofNullable(audioProfile); return this; } public GetOnDeckPart withAudioProfile(Optional audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = audioProfile; return this; } public GetOnDeckPart withContainer(String container) { Utils.checkNotNull(container, "container"); this.container = Optional.ofNullable(container); return this; } public GetOnDeckPart withContainer(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } public GetOnDeckPart withVideoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = Optional.ofNullable(videoProfile); return this; } public GetOnDeckPart withVideoProfile(Optional videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = videoProfile; return this; } public GetOnDeckPart withStream(List stream) { Utils.checkNotNull(stream, "stream"); this.stream = Optional.ofNullable(stream); return this; } public GetOnDeckPart withStream(Optional> stream) { Utils.checkNotNull(stream, "stream"); this.stream = stream; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetOnDeckPart other = (GetOnDeckPart) o; return Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.key, other.key) && Objects.deepEquals(this.duration, other.duration) && Objects.deepEquals(this.file, other.file) && Objects.deepEquals(this.size, other.size) && Objects.deepEquals(this.audioProfile, other.audioProfile) && Objects.deepEquals(this.container, other.container) && Objects.deepEquals(this.videoProfile, other.videoProfile) && Objects.deepEquals(this.stream, other.stream); } @Override public int hashCode() { return Objects.hash( id, key, duration, file, size, audioProfile, container, videoProfile, stream); } @Override public String toString() { return Utils.toString(GetOnDeckPart.class, "id", id, "key", key, "duration", duration, "file", file, "size", size, "audioProfile", audioProfile, "container", container, "videoProfile", videoProfile, "stream", stream); } public final static class Builder { private Optional id = Optional.empty(); private Optional key = Optional.empty(); private Optional duration = Optional.empty(); private Optional file = Optional.empty(); private Optional size = Optional.empty(); private Optional audioProfile = Optional.empty(); private Optional container = Optional.empty(); private Optional videoProfile = Optional.empty(); private Optional> stream = Optional.empty(); private Builder() { // force use of static builder() method } public Builder id(double id) { Utils.checkNotNull(id, "id"); this.id = Optional.ofNullable(id); return this; } public Builder id(Optional id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } public Builder key(String key) { Utils.checkNotNull(key, "key"); this.key = Optional.ofNullable(key); return this; } public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Builder duration(double duration) { Utils.checkNotNull(duration, "duration"); this.duration = Optional.ofNullable(duration); return this; } public Builder duration(Optional duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } public Builder file(String file) { Utils.checkNotNull(file, "file"); this.file = Optional.ofNullable(file); return this; } public Builder file(Optional file) { Utils.checkNotNull(file, "file"); this.file = file; return this; } public Builder size(double size) { Utils.checkNotNull(size, "size"); this.size = Optional.ofNullable(size); return this; } public Builder size(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } public Builder audioProfile(String audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = Optional.ofNullable(audioProfile); return this; } public Builder audioProfile(Optional audioProfile) { Utils.checkNotNull(audioProfile, "audioProfile"); this.audioProfile = audioProfile; return this; } public Builder container(String container) { Utils.checkNotNull(container, "container"); this.container = Optional.ofNullable(container); return this; } public Builder container(Optional container) { Utils.checkNotNull(container, "container"); this.container = container; return this; } public Builder videoProfile(String videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = Optional.ofNullable(videoProfile); return this; } public Builder videoProfile(Optional videoProfile) { Utils.checkNotNull(videoProfile, "videoProfile"); this.videoProfile = videoProfile; return this; } public Builder stream(List stream) { Utils.checkNotNull(stream, "stream"); this.stream = Optional.ofNullable(stream); return this; } public Builder stream(Optional> stream) { Utils.checkNotNull(stream, "stream"); this.stream = stream; return this; } public GetOnDeckPart build() { return new GetOnDeckPart( id, key, duration, file, size, audioProfile, container, videoProfile, stream); } } }