mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 12:37:45 +00:00
409 lines
12 KiB
Java
409 lines
12 KiB
Java
/*
|
|
* 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.Integer;
|
|
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 GetSessionsMedia {
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("audioChannels")
|
|
private Optional<Integer> audioChannels;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("audioCodec")
|
|
private Optional<String> audioCodec;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("bitrate")
|
|
private Optional<Integer> bitrate;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("container")
|
|
private Optional<String> container;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("duration")
|
|
private Optional<Integer> duration;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("id")
|
|
private Optional<String> id;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("selected")
|
|
private Optional<Boolean> selected;
|
|
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("Part")
|
|
private Optional<? extends List<GetSessionsPart>> part;
|
|
|
|
@JsonCreator
|
|
public GetSessionsMedia(
|
|
@JsonProperty("audioChannels") Optional<Integer> audioChannels,
|
|
@JsonProperty("audioCodec") Optional<String> audioCodec,
|
|
@JsonProperty("bitrate") Optional<Integer> bitrate,
|
|
@JsonProperty("container") Optional<String> container,
|
|
@JsonProperty("duration") Optional<Integer> duration,
|
|
@JsonProperty("id") Optional<String> id,
|
|
@JsonProperty("selected") Optional<Boolean> selected,
|
|
@JsonProperty("Part") Optional<? extends List<GetSessionsPart>> part) {
|
|
Utils.checkNotNull(audioChannels, "audioChannels");
|
|
Utils.checkNotNull(audioCodec, "audioCodec");
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
Utils.checkNotNull(container, "container");
|
|
Utils.checkNotNull(duration, "duration");
|
|
Utils.checkNotNull(id, "id");
|
|
Utils.checkNotNull(selected, "selected");
|
|
Utils.checkNotNull(part, "part");
|
|
this.audioChannels = audioChannels;
|
|
this.audioCodec = audioCodec;
|
|
this.bitrate = bitrate;
|
|
this.container = container;
|
|
this.duration = duration;
|
|
this.id = id;
|
|
this.selected = selected;
|
|
this.part = part;
|
|
}
|
|
|
|
public GetSessionsMedia() {
|
|
this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Integer> audioChannels() {
|
|
return audioChannels;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<String> audioCodec() {
|
|
return audioCodec;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Integer> bitrate() {
|
|
return bitrate;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<String> container() {
|
|
return container;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Integer> duration() {
|
|
return duration;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<String> id() {
|
|
return id;
|
|
}
|
|
|
|
@JsonIgnore
|
|
public Optional<Boolean> selected() {
|
|
return selected;
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
@JsonIgnore
|
|
public Optional<List<GetSessionsPart>> part() {
|
|
return (Optional<List<GetSessionsPart>>) part;
|
|
}
|
|
|
|
public final static Builder builder() {
|
|
return new Builder();
|
|
}
|
|
|
|
public GetSessionsMedia withAudioChannels(int audioChannels) {
|
|
Utils.checkNotNull(audioChannels, "audioChannels");
|
|
this.audioChannels = Optional.ofNullable(audioChannels);
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withAudioChannels(Optional<Integer> audioChannels) {
|
|
Utils.checkNotNull(audioChannels, "audioChannels");
|
|
this.audioChannels = audioChannels;
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withAudioCodec(String audioCodec) {
|
|
Utils.checkNotNull(audioCodec, "audioCodec");
|
|
this.audioCodec = Optional.ofNullable(audioCodec);
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withAudioCodec(Optional<String> audioCodec) {
|
|
Utils.checkNotNull(audioCodec, "audioCodec");
|
|
this.audioCodec = audioCodec;
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withBitrate(int bitrate) {
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
this.bitrate = Optional.ofNullable(bitrate);
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withBitrate(Optional<Integer> bitrate) {
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
this.bitrate = bitrate;
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withContainer(String container) {
|
|
Utils.checkNotNull(container, "container");
|
|
this.container = Optional.ofNullable(container);
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withContainer(Optional<String> container) {
|
|
Utils.checkNotNull(container, "container");
|
|
this.container = container;
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withDuration(int duration) {
|
|
Utils.checkNotNull(duration, "duration");
|
|
this.duration = Optional.ofNullable(duration);
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withDuration(Optional<Integer> duration) {
|
|
Utils.checkNotNull(duration, "duration");
|
|
this.duration = duration;
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withId(String id) {
|
|
Utils.checkNotNull(id, "id");
|
|
this.id = Optional.ofNullable(id);
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withId(Optional<String> id) {
|
|
Utils.checkNotNull(id, "id");
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withSelected(boolean selected) {
|
|
Utils.checkNotNull(selected, "selected");
|
|
this.selected = Optional.ofNullable(selected);
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withSelected(Optional<Boolean> selected) {
|
|
Utils.checkNotNull(selected, "selected");
|
|
this.selected = selected;
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withPart(List<GetSessionsPart> part) {
|
|
Utils.checkNotNull(part, "part");
|
|
this.part = Optional.ofNullable(part);
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia withPart(Optional<? extends List<GetSessionsPart>> 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;
|
|
}
|
|
GetSessionsMedia other = (GetSessionsMedia) o;
|
|
return
|
|
Objects.deepEquals(this.audioChannels, other.audioChannels) &&
|
|
Objects.deepEquals(this.audioCodec, other.audioCodec) &&
|
|
Objects.deepEquals(this.bitrate, other.bitrate) &&
|
|
Objects.deepEquals(this.container, other.container) &&
|
|
Objects.deepEquals(this.duration, other.duration) &&
|
|
Objects.deepEquals(this.id, other.id) &&
|
|
Objects.deepEquals(this.selected, other.selected) &&
|
|
Objects.deepEquals(this.part, other.part);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(
|
|
audioChannels,
|
|
audioCodec,
|
|
bitrate,
|
|
container,
|
|
duration,
|
|
id,
|
|
selected,
|
|
part);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return Utils.toString(GetSessionsMedia.class,
|
|
"audioChannels", audioChannels,
|
|
"audioCodec", audioCodec,
|
|
"bitrate", bitrate,
|
|
"container", container,
|
|
"duration", duration,
|
|
"id", id,
|
|
"selected", selected,
|
|
"part", part);
|
|
}
|
|
|
|
public final static class Builder {
|
|
|
|
private Optional<Integer> audioChannels = Optional.empty();
|
|
|
|
private Optional<String> audioCodec = Optional.empty();
|
|
|
|
private Optional<Integer> bitrate = Optional.empty();
|
|
|
|
private Optional<String> container = Optional.empty();
|
|
|
|
private Optional<Integer> duration = Optional.empty();
|
|
|
|
private Optional<String> id = Optional.empty();
|
|
|
|
private Optional<Boolean> selected = Optional.empty();
|
|
|
|
private Optional<? extends List<GetSessionsPart>> part = Optional.empty();
|
|
|
|
private Builder() {
|
|
// force use of static builder() method
|
|
}
|
|
|
|
public Builder audioChannels(int audioChannels) {
|
|
Utils.checkNotNull(audioChannels, "audioChannels");
|
|
this.audioChannels = Optional.ofNullable(audioChannels);
|
|
return this;
|
|
}
|
|
|
|
public Builder audioChannels(Optional<Integer> audioChannels) {
|
|
Utils.checkNotNull(audioChannels, "audioChannels");
|
|
this.audioChannels = audioChannels;
|
|
return this;
|
|
}
|
|
|
|
public Builder audioCodec(String audioCodec) {
|
|
Utils.checkNotNull(audioCodec, "audioCodec");
|
|
this.audioCodec = Optional.ofNullable(audioCodec);
|
|
return this;
|
|
}
|
|
|
|
public Builder audioCodec(Optional<String> audioCodec) {
|
|
Utils.checkNotNull(audioCodec, "audioCodec");
|
|
this.audioCodec = audioCodec;
|
|
return this;
|
|
}
|
|
|
|
public Builder bitrate(int bitrate) {
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
this.bitrate = Optional.ofNullable(bitrate);
|
|
return this;
|
|
}
|
|
|
|
public Builder bitrate(Optional<Integer> bitrate) {
|
|
Utils.checkNotNull(bitrate, "bitrate");
|
|
this.bitrate = bitrate;
|
|
return this;
|
|
}
|
|
|
|
public Builder container(String container) {
|
|
Utils.checkNotNull(container, "container");
|
|
this.container = Optional.ofNullable(container);
|
|
return this;
|
|
}
|
|
|
|
public Builder container(Optional<String> container) {
|
|
Utils.checkNotNull(container, "container");
|
|
this.container = container;
|
|
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 id(String id) {
|
|
Utils.checkNotNull(id, "id");
|
|
this.id = Optional.ofNullable(id);
|
|
return this;
|
|
}
|
|
|
|
public Builder id(Optional<String> id) {
|
|
Utils.checkNotNull(id, "id");
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
public Builder selected(boolean selected) {
|
|
Utils.checkNotNull(selected, "selected");
|
|
this.selected = Optional.ofNullable(selected);
|
|
return this;
|
|
}
|
|
|
|
public Builder selected(Optional<Boolean> selected) {
|
|
Utils.checkNotNull(selected, "selected");
|
|
this.selected = selected;
|
|
return this;
|
|
}
|
|
|
|
public Builder part(List<GetSessionsPart> part) {
|
|
Utils.checkNotNull(part, "part");
|
|
this.part = Optional.ofNullable(part);
|
|
return this;
|
|
}
|
|
|
|
public Builder part(Optional<? extends List<GetSessionsPart>> part) {
|
|
Utils.checkNotNull(part, "part");
|
|
this.part = part;
|
|
return this;
|
|
}
|
|
|
|
public GetSessionsMedia build() {
|
|
return new GetSessionsMedia(
|
|
audioChannels,
|
|
audioCodec,
|
|
bitrate,
|
|
container,
|
|
duration,
|
|
id,
|
|
selected,
|
|
part);
|
|
}
|
|
}
|
|
}
|
|
|