/* * 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 GetUpdateStatusMediaContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("size") private Optional size; @JsonInclude(Include.NON_ABSENT) @JsonProperty("canInstall") private Optional canInstall; @JsonInclude(Include.NON_ABSENT) @JsonProperty("checkedAt") private Optional checkedAt; @JsonInclude(Include.NON_ABSENT) @JsonProperty("downloadURL") private Optional downloadURL; @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") private Optional status; @JsonInclude(Include.NON_ABSENT) @JsonProperty("Release") private Optional> release; @JsonCreator public GetUpdateStatusMediaContainer( @JsonProperty("size") Optional size, @JsonProperty("canInstall") Optional canInstall, @JsonProperty("checkedAt") Optional checkedAt, @JsonProperty("downloadURL") Optional downloadURL, @JsonProperty("status") Optional status, @JsonProperty("Release") Optional> release) { Utils.checkNotNull(size, "size"); Utils.checkNotNull(canInstall, "canInstall"); Utils.checkNotNull(checkedAt, "checkedAt"); Utils.checkNotNull(downloadURL, "downloadURL"); Utils.checkNotNull(status, "status"); Utils.checkNotNull(release, "release"); this.size = size; this.canInstall = canInstall; this.checkedAt = checkedAt; this.downloadURL = downloadURL; this.status = status; this.release = release; } public GetUpdateStatusMediaContainer() { this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore public Optional size() { return size; } @JsonIgnore public Optional canInstall() { return canInstall; } @JsonIgnore public Optional checkedAt() { return checkedAt; } @JsonIgnore public Optional downloadURL() { return downloadURL; } @JsonIgnore public Optional status() { return status; } @SuppressWarnings("unchecked") @JsonIgnore public Optional> release() { return (Optional>) release; } public final static Builder builder() { return new Builder(); } public GetUpdateStatusMediaContainer withSize(int size) { Utils.checkNotNull(size, "size"); this.size = Optional.ofNullable(size); return this; } public GetUpdateStatusMediaContainer withSize(Optional size) { Utils.checkNotNull(size, "size"); this.size = size; return this; } public GetUpdateStatusMediaContainer withCanInstall(boolean canInstall) { Utils.checkNotNull(canInstall, "canInstall"); this.canInstall = Optional.ofNullable(canInstall); return this; } public GetUpdateStatusMediaContainer withCanInstall(Optional canInstall) { Utils.checkNotNull(canInstall, "canInstall"); this.canInstall = canInstall; return this; } public GetUpdateStatusMediaContainer withCheckedAt(int checkedAt) { Utils.checkNotNull(checkedAt, "checkedAt"); this.checkedAt = Optional.ofNullable(checkedAt); return this; } public GetUpdateStatusMediaContainer withCheckedAt(Optional checkedAt) { Utils.checkNotNull(checkedAt, "checkedAt"); this.checkedAt = checkedAt; return this; } public GetUpdateStatusMediaContainer withDownloadURL(String downloadURL) { Utils.checkNotNull(downloadURL, "downloadURL"); this.downloadURL = Optional.ofNullable(downloadURL); return this; } public GetUpdateStatusMediaContainer withDownloadURL(Optional downloadURL) { Utils.checkNotNull(downloadURL, "downloadURL"); this.downloadURL = downloadURL; return this; } public GetUpdateStatusMediaContainer withStatus(int status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } public GetUpdateStatusMediaContainer withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; } public GetUpdateStatusMediaContainer withRelease(List release) { Utils.checkNotNull(release, "release"); this.release = Optional.ofNullable(release); return this; } public GetUpdateStatusMediaContainer withRelease(Optional> release) { Utils.checkNotNull(release, "release"); this.release = release; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetUpdateStatusMediaContainer other = (GetUpdateStatusMediaContainer) o; return Objects.deepEquals(this.size, other.size) && Objects.deepEquals(this.canInstall, other.canInstall) && Objects.deepEquals(this.checkedAt, other.checkedAt) && Objects.deepEquals(this.downloadURL, other.downloadURL) && Objects.deepEquals(this.status, other.status) && Objects.deepEquals(this.release, other.release); } @Override public int hashCode() { return Objects.hash( size, canInstall, checkedAt, downloadURL, status, release); } @Override public String toString() { return Utils.toString(GetUpdateStatusMediaContainer.class, "size", size, "canInstall", canInstall, "checkedAt", checkedAt, "downloadURL", downloadURL, "status", status, "release", release); } public final static class Builder { private Optional size = Optional.empty(); private Optional canInstall = Optional.empty(); private Optional checkedAt = Optional.empty(); private Optional downloadURL = Optional.empty(); private Optional status = Optional.empty(); private Optional> release = Optional.empty(); private Builder() { // force use of static builder() method } public Builder size(int 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 canInstall(boolean canInstall) { Utils.checkNotNull(canInstall, "canInstall"); this.canInstall = Optional.ofNullable(canInstall); return this; } public Builder canInstall(Optional canInstall) { Utils.checkNotNull(canInstall, "canInstall"); this.canInstall = canInstall; return this; } public Builder checkedAt(int checkedAt) { Utils.checkNotNull(checkedAt, "checkedAt"); this.checkedAt = Optional.ofNullable(checkedAt); return this; } public Builder checkedAt(Optional checkedAt) { Utils.checkNotNull(checkedAt, "checkedAt"); this.checkedAt = checkedAt; return this; } public Builder downloadURL(String downloadURL) { Utils.checkNotNull(downloadURL, "downloadURL"); this.downloadURL = Optional.ofNullable(downloadURL); return this; } public Builder downloadURL(Optional downloadURL) { Utils.checkNotNull(downloadURL, "downloadURL"); this.downloadURL = downloadURL; return this; } public Builder status(int status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); return this; } public Builder status(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; return this; } public Builder release(List release) { Utils.checkNotNull(release, "release"); this.release = Optional.ofNullable(release); return this; } public Builder release(Optional> release) { Utils.checkNotNull(release, "release"); this.release = release; return this; } public GetUpdateStatusMediaContainer build() { return new GetUpdateStatusMediaContainer( size, canInstall, checkedAt, downloadURL, status, release); } } }