/* * 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 dev.plexapi.sdk.utils.SpeakeasyMetadata; import dev.plexapi.sdk.utils.Utils; import java.lang.Double; import java.lang.Override; import java.lang.String; import java.util.Objects; public class GetTimelineRequest { /** * The rating key of the media item */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=ratingKey") private double ratingKey; /** * The key of the media item to get the timeline for */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=key") private String key; /** * The state of the media item */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=state") private State state; /** * Whether the media item has MDE */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=hasMDE") private double hasMDE; /** * The time of the media item */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=time") private double time; /** * The duration of the media item */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=duration") private double duration; /** * The context of the media item */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=context") private String context; /** * The play queue item ID of the media item */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playQueueItemID") private double playQueueItemID; /** * The playback time of the media item */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playBackTime") private double playBackTime; /** * The row of the media item */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=row") private double row; @JsonCreator public GetTimelineRequest( double ratingKey, String key, State state, double hasMDE, double time, double duration, String context, double playQueueItemID, double playBackTime, double row) { Utils.checkNotNull(ratingKey, "ratingKey"); Utils.checkNotNull(key, "key"); Utils.checkNotNull(state, "state"); Utils.checkNotNull(hasMDE, "hasMDE"); Utils.checkNotNull(time, "time"); Utils.checkNotNull(duration, "duration"); Utils.checkNotNull(context, "context"); Utils.checkNotNull(playQueueItemID, "playQueueItemID"); Utils.checkNotNull(playBackTime, "playBackTime"); Utils.checkNotNull(row, "row"); this.ratingKey = ratingKey; this.key = key; this.state = state; this.hasMDE = hasMDE; this.time = time; this.duration = duration; this.context = context; this.playQueueItemID = playQueueItemID; this.playBackTime = playBackTime; this.row = row; } /** * The rating key of the media item */ @JsonIgnore public double ratingKey() { return ratingKey; } /** * The key of the media item to get the timeline for */ @JsonIgnore public String key() { return key; } /** * The state of the media item */ @JsonIgnore public State state() { return state; } /** * Whether the media item has MDE */ @JsonIgnore public double hasMDE() { return hasMDE; } /** * The time of the media item */ @JsonIgnore public double time() { return time; } /** * The duration of the media item */ @JsonIgnore public double duration() { return duration; } /** * The context of the media item */ @JsonIgnore public String context() { return context; } /** * The play queue item ID of the media item */ @JsonIgnore public double playQueueItemID() { return playQueueItemID; } /** * The playback time of the media item */ @JsonIgnore public double playBackTime() { return playBackTime; } /** * The row of the media item */ @JsonIgnore public double row() { return row; } public final static Builder builder() { return new Builder(); } /** * The rating key of the media item */ public GetTimelineRequest withRatingKey(double ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); this.ratingKey = ratingKey; return this; } /** * The key of the media item to get the timeline for */ public GetTimelineRequest withKey(String key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } /** * The state of the media item */ public GetTimelineRequest withState(State state) { Utils.checkNotNull(state, "state"); this.state = state; return this; } /** * Whether the media item has MDE */ public GetTimelineRequest withHasMDE(double hasMDE) { Utils.checkNotNull(hasMDE, "hasMDE"); this.hasMDE = hasMDE; return this; } /** * The time of the media item */ public GetTimelineRequest withTime(double time) { Utils.checkNotNull(time, "time"); this.time = time; return this; } /** * The duration of the media item */ public GetTimelineRequest withDuration(double duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } /** * The context of the media item */ public GetTimelineRequest withContext(String context) { Utils.checkNotNull(context, "context"); this.context = context; return this; } /** * The play queue item ID of the media item */ public GetTimelineRequest withPlayQueueItemID(double playQueueItemID) { Utils.checkNotNull(playQueueItemID, "playQueueItemID"); this.playQueueItemID = playQueueItemID; return this; } /** * The playback time of the media item */ public GetTimelineRequest withPlayBackTime(double playBackTime) { Utils.checkNotNull(playBackTime, "playBackTime"); this.playBackTime = playBackTime; return this; } /** * The row of the media item */ public GetTimelineRequest withRow(double row) { Utils.checkNotNull(row, "row"); this.row = row; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetTimelineRequest other = (GetTimelineRequest) o; return Objects.deepEquals(this.ratingKey, other.ratingKey) && Objects.deepEquals(this.key, other.key) && Objects.deepEquals(this.state, other.state) && Objects.deepEquals(this.hasMDE, other.hasMDE) && Objects.deepEquals(this.time, other.time) && Objects.deepEquals(this.duration, other.duration) && Objects.deepEquals(this.context, other.context) && Objects.deepEquals(this.playQueueItemID, other.playQueueItemID) && Objects.deepEquals(this.playBackTime, other.playBackTime) && Objects.deepEquals(this.row, other.row); } @Override public int hashCode() { return Objects.hash( ratingKey, key, state, hasMDE, time, duration, context, playQueueItemID, playBackTime, row); } @Override public String toString() { return Utils.toString(GetTimelineRequest.class, "ratingKey", ratingKey, "key", key, "state", state, "hasMDE", hasMDE, "time", time, "duration", duration, "context", context, "playQueueItemID", playQueueItemID, "playBackTime", playBackTime, "row", row); } public final static class Builder { private Double ratingKey; private String key; private State state; private Double hasMDE; private Double time; private Double duration; private String context; private Double playQueueItemID; private Double playBackTime; private Double row; private Builder() { // force use of static builder() method } /** * The rating key of the media item */ public Builder ratingKey(double ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); this.ratingKey = ratingKey; return this; } /** * The key of the media item to get the timeline for */ public Builder key(String key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } /** * The state of the media item */ public Builder state(State state) { Utils.checkNotNull(state, "state"); this.state = state; return this; } /** * Whether the media item has MDE */ public Builder hasMDE(double hasMDE) { Utils.checkNotNull(hasMDE, "hasMDE"); this.hasMDE = hasMDE; return this; } /** * The time of the media item */ public Builder time(double time) { Utils.checkNotNull(time, "time"); this.time = time; return this; } /** * The duration of the media item */ public Builder duration(double duration) { Utils.checkNotNull(duration, "duration"); this.duration = duration; return this; } /** * The context of the media item */ public Builder context(String context) { Utils.checkNotNull(context, "context"); this.context = context; return this; } /** * The play queue item ID of the media item */ public Builder playQueueItemID(double playQueueItemID) { Utils.checkNotNull(playQueueItemID, "playQueueItemID"); this.playQueueItemID = playQueueItemID; return this; } /** * The playback time of the media item */ public Builder playBackTime(double playBackTime) { Utils.checkNotNull(playBackTime, "playBackTime"); this.playBackTime = playBackTime; return this; } /** * The row of the media item */ public Builder row(double row) { Utils.checkNotNull(row, "row"); this.row = row; return this; } public GetTimelineRequest build() { return new GetTimelineRequest( ratingKey, key, state, hasMDE, time, duration, context, playQueueItemID, playBackTime, row); } } }