/* * 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.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; public class GetThumbImageRequest { /** * the id of the library item to return the children of. */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey") private long ratingKey; @SpeakeasyMetadata("queryParam:style=form,explode=true,name=width") private long width; @SpeakeasyMetadata("queryParam:style=form,explode=true,name=height") private long height; @SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize") private long minSize; @SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale") private long upscale; /** * Plex Authentication Token */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Token") private String xPlexToken; @JsonCreator public GetThumbImageRequest( long ratingKey, long width, long height, long minSize, long upscale, String xPlexToken) { Utils.checkNotNull(ratingKey, "ratingKey"); Utils.checkNotNull(width, "width"); Utils.checkNotNull(height, "height"); Utils.checkNotNull(minSize, "minSize"); Utils.checkNotNull(upscale, "upscale"); Utils.checkNotNull(xPlexToken, "xPlexToken"); this.ratingKey = ratingKey; this.width = width; this.height = height; this.minSize = minSize; this.upscale = upscale; this.xPlexToken = xPlexToken; } /** * the id of the library item to return the children of. */ @JsonIgnore public long ratingKey() { return ratingKey; } @JsonIgnore public long width() { return width; } @JsonIgnore public long height() { return height; } @JsonIgnore public long minSize() { return minSize; } @JsonIgnore public long upscale() { return upscale; } /** * Plex Authentication Token */ @JsonIgnore public String xPlexToken() { return xPlexToken; } public final static Builder builder() { return new Builder(); } /** * the id of the library item to return the children of. */ public GetThumbImageRequest withRatingKey(long ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); this.ratingKey = ratingKey; return this; } public GetThumbImageRequest withWidth(long width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } public GetThumbImageRequest withHeight(long height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } public GetThumbImageRequest withMinSize(long minSize) { Utils.checkNotNull(minSize, "minSize"); this.minSize = minSize; return this; } public GetThumbImageRequest withUpscale(long upscale) { Utils.checkNotNull(upscale, "upscale"); this.upscale = upscale; return this; } /** * Plex Authentication Token */ public GetThumbImageRequest withXPlexToken(String xPlexToken) { Utils.checkNotNull(xPlexToken, "xPlexToken"); this.xPlexToken = xPlexToken; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetThumbImageRequest other = (GetThumbImageRequest) o; return Objects.deepEquals(this.ratingKey, other.ratingKey) && Objects.deepEquals(this.width, other.width) && Objects.deepEquals(this.height, other.height) && Objects.deepEquals(this.minSize, other.minSize) && Objects.deepEquals(this.upscale, other.upscale) && Objects.deepEquals(this.xPlexToken, other.xPlexToken); } @Override public int hashCode() { return Objects.hash( ratingKey, width, height, minSize, upscale, xPlexToken); } @Override public String toString() { return Utils.toString(GetThumbImageRequest.class, "ratingKey", ratingKey, "width", width, "height", height, "minSize", minSize, "upscale", upscale, "xPlexToken", xPlexToken); } public final static class Builder { private Long ratingKey; private Long width; private Long height; private Long minSize; private Long upscale; private String xPlexToken; private Builder() { // force use of static builder() method } /** * the id of the library item to return the children of. */ public Builder ratingKey(long ratingKey) { Utils.checkNotNull(ratingKey, "ratingKey"); this.ratingKey = ratingKey; return this; } public Builder width(long width) { Utils.checkNotNull(width, "width"); this.width = width; return this; } public Builder height(long height) { Utils.checkNotNull(height, "height"); this.height = height; return this; } public Builder minSize(long minSize) { Utils.checkNotNull(minSize, "minSize"); this.minSize = minSize; return this; } public Builder upscale(long upscale) { Utils.checkNotNull(upscale, "upscale"); this.upscale = upscale; return this; } /** * Plex Authentication Token */ public Builder xPlexToken(String xPlexToken) { Utils.checkNotNull(xPlexToken, "xPlexToken"); this.xPlexToken = xPlexToken; return this; } public GetThumbImageRequest build() { return new GetThumbImageRequest( ratingKey, width, height, minSize, upscale, xPlexToken); } } }