Files
plexjava/src/main/java/dev/plexapi/sdk/models/operations/GetUpdateStatusMediaContainer.java
2024-09-08 02:40:34 +00:00

325 lines
9.8 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 GetUpdateStatusMediaContainer {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("size")
private Optional<Integer> size;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("canInstall")
private Optional<Boolean> canInstall;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("checkedAt")
private Optional<Integer> checkedAt;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("downloadURL")
private Optional<String> downloadURL;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Integer> status;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("Release")
private Optional<? extends List<Release>> release;
@JsonCreator
public GetUpdateStatusMediaContainer(
@JsonProperty("size") Optional<Integer> size,
@JsonProperty("canInstall") Optional<Boolean> canInstall,
@JsonProperty("checkedAt") Optional<Integer> checkedAt,
@JsonProperty("downloadURL") Optional<String> downloadURL,
@JsonProperty("status") Optional<Integer> status,
@JsonProperty("Release") Optional<? extends List<Release>> 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<Integer> size() {
return size;
}
@JsonIgnore
public Optional<Boolean> canInstall() {
return canInstall;
}
@JsonIgnore
public Optional<Integer> checkedAt() {
return checkedAt;
}
@JsonIgnore
public Optional<String> downloadURL() {
return downloadURL;
}
@JsonIgnore
public Optional<Integer> status() {
return status;
}
@SuppressWarnings("unchecked")
@JsonIgnore
public Optional<List<Release>> release() {
return (Optional<List<Release>>) 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<Integer> 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<Boolean> 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<Integer> 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<String> 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<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetUpdateStatusMediaContainer withRelease(List<Release> release) {
Utils.checkNotNull(release, "release");
this.release = Optional.ofNullable(release);
return this;
}
public GetUpdateStatusMediaContainer withRelease(Optional<? extends List<Release>> 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<Integer> size = Optional.empty();
private Optional<Boolean> canInstall = Optional.empty();
private Optional<Integer> checkedAt = Optional.empty();
private Optional<String> downloadURL = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<? extends List<Release>> 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<Integer> 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<Boolean> 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<Integer> 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<String> 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<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public Builder release(List<Release> release) {
Utils.checkNotNull(release, "release");
this.release = Optional.ofNullable(release);
return this;
}
public Builder release(Optional<? extends List<Release>> release) {
Utils.checkNotNull(release, "release");
this.release = release;
return this;
}
public GetUpdateStatusMediaContainer build() {
return new GetUpdateStatusMediaContainer(
size,
canInstall,
checkedAt,
downloadURL,
status,
release);
}
}
}