ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.6

This commit is contained in:
speakeasybot
2024-09-13 00:25:35 +00:00
parent f83d7949e1
commit 5585a18ab9
652 changed files with 34020 additions and 4554 deletions

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* AddPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* AddPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class AddPlaylistContentsResponseBody extends RuntimeException {
public class AddPlaylistContentsBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public AddPlaylistContentsResponseBody(
public AddPlaylistContentsBadRequest(
@JsonProperty("errors") Optional<? extends List<AddPlaylistContentsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public AddPlaylistContentsResponseBody() {
public AddPlaylistContentsBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
return new Builder();
}
public AddPlaylistContentsResponseBody withErrors(List<AddPlaylistContentsErrors> errors) {
public AddPlaylistContentsBadRequest withErrors(List<AddPlaylistContentsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public AddPlaylistContentsResponseBody withErrors(Optional<? extends List<AddPlaylistContentsErrors>> errors) {
public AddPlaylistContentsBadRequest withErrors(Optional<? extends List<AddPlaylistContentsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public AddPlaylistContentsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public AddPlaylistContentsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public AddPlaylistContentsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public AddPlaylistContentsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
AddPlaylistContentsResponseBody other = (AddPlaylistContentsResponseBody) o;
AddPlaylistContentsBadRequest other = (AddPlaylistContentsBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(AddPlaylistContentsResponseBody.class,
return Utils.toString(AddPlaylistContentsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class AddPlaylistContentsResponseBody extends RuntimeException {
return this;
}
public AddPlaylistContentsResponseBody build() {
return new AddPlaylistContentsResponseBody(
public AddPlaylistContentsBadRequest build() {
return new AddPlaylistContentsBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class AddPlaylistContentsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class AddPlaylistContentsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public AddPlaylistContentsErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class AddPlaylistContentsErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class AddPlaylistContentsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class AddPlaylistContentsErrors {
return new Builder();
}
public AddPlaylistContentsErrors withCode(double code) {
public AddPlaylistContentsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public AddPlaylistContentsErrors withCode(Optional<Double> code) {
public AddPlaylistContentsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class AddPlaylistContentsErrors {
return this;
}
public AddPlaylistContentsErrors withStatus(double status) {
public AddPlaylistContentsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public AddPlaylistContentsErrors withStatus(Optional<Double> status) {
public AddPlaylistContentsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class AddPlaylistContentsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class AddPlaylistContentsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class AddPlaylistContentsPlaylistsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public AddPlaylistContentsPlaylistsErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public AddPlaylistContentsPlaylistsErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public AddPlaylistContentsPlaylistsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public AddPlaylistContentsPlaylistsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public AddPlaylistContentsPlaylistsErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public AddPlaylistContentsPlaylistsErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public AddPlaylistContentsPlaylistsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public AddPlaylistContentsPlaylistsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AddPlaylistContentsPlaylistsErrors other = (AddPlaylistContentsPlaylistsErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(AddPlaylistContentsPlaylistsErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public AddPlaylistContentsPlaylistsErrors build() {
return new AddPlaylistContentsPlaylistsErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* AddPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class AddPlaylistContentsUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public AddPlaylistContentsUnauthorized(
@JsonProperty("errors") Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public AddPlaylistContentsUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<AddPlaylistContentsPlaylistsErrors>> errors(){
return (Optional<List<AddPlaylistContentsPlaylistsErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public AddPlaylistContentsUnauthorized withErrors(List<AddPlaylistContentsPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public AddPlaylistContentsUnauthorized withErrors(Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public AddPlaylistContentsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public AddPlaylistContentsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AddPlaylistContentsUnauthorized other = (AddPlaylistContentsUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(AddPlaylistContentsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<AddPlaylistContentsPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public AddPlaylistContentsUnauthorized build() {
return new AddPlaylistContentsUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* ApplyUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* ApplyUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class ApplyUpdatesResponseBody extends RuntimeException {
public class ApplyUpdatesBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public ApplyUpdatesResponseBody(
public ApplyUpdatesBadRequest(
@JsonProperty("errors") Optional<? extends List<ApplyUpdatesErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public ApplyUpdatesResponseBody() {
public ApplyUpdatesBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
return new Builder();
}
public ApplyUpdatesResponseBody withErrors(List<ApplyUpdatesErrors> errors) {
public ApplyUpdatesBadRequest withErrors(List<ApplyUpdatesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public ApplyUpdatesResponseBody withErrors(Optional<? extends List<ApplyUpdatesErrors>> errors) {
public ApplyUpdatesBadRequest withErrors(Optional<? extends List<ApplyUpdatesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public ApplyUpdatesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public ApplyUpdatesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public ApplyUpdatesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public ApplyUpdatesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
ApplyUpdatesResponseBody other = (ApplyUpdatesResponseBody) o;
ApplyUpdatesBadRequest other = (ApplyUpdatesBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(ApplyUpdatesResponseBody.class,
return Utils.toString(ApplyUpdatesBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class ApplyUpdatesResponseBody extends RuntimeException {
return this;
}
public ApplyUpdatesResponseBody build() {
return new ApplyUpdatesResponseBody(
public ApplyUpdatesBadRequest build() {
return new ApplyUpdatesBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class ApplyUpdatesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class ApplyUpdatesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public ApplyUpdatesErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class ApplyUpdatesErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class ApplyUpdatesErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class ApplyUpdatesErrors {
return new Builder();
}
public ApplyUpdatesErrors withCode(double code) {
public ApplyUpdatesErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public ApplyUpdatesErrors withCode(Optional<Double> code) {
public ApplyUpdatesErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class ApplyUpdatesErrors {
return this;
}
public ApplyUpdatesErrors withStatus(double status) {
public ApplyUpdatesErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public ApplyUpdatesErrors withStatus(Optional<Double> status) {
public ApplyUpdatesErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class ApplyUpdatesErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class ApplyUpdatesErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* ApplyUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class ApplyUpdatesUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public ApplyUpdatesUnauthorized(
@JsonProperty("errors") Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public ApplyUpdatesUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<ApplyUpdatesUpdaterErrors>> errors(){
return (Optional<List<ApplyUpdatesUpdaterErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public ApplyUpdatesUnauthorized withErrors(List<ApplyUpdatesUpdaterErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public ApplyUpdatesUnauthorized withErrors(Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public ApplyUpdatesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public ApplyUpdatesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApplyUpdatesUnauthorized other = (ApplyUpdatesUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(ApplyUpdatesUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<ApplyUpdatesUpdaterErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public ApplyUpdatesUnauthorized build() {
return new ApplyUpdatesUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class ApplyUpdatesUpdaterErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public ApplyUpdatesUpdaterErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public ApplyUpdatesUpdaterErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public ApplyUpdatesUpdaterErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public ApplyUpdatesUpdaterErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public ApplyUpdatesUpdaterErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public ApplyUpdatesUpdaterErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public ApplyUpdatesUpdaterErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public ApplyUpdatesUpdaterErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApplyUpdatesUpdaterErrors other = (ApplyUpdatesUpdaterErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(ApplyUpdatesUpdaterErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public ApplyUpdatesUpdaterErrors build() {
return new ApplyUpdatesUpdaterErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class CancelServerActivitiesActivitiesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public CancelServerActivitiesActivitiesErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public CancelServerActivitiesActivitiesErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public CancelServerActivitiesActivitiesErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public CancelServerActivitiesActivitiesErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public CancelServerActivitiesActivitiesErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public CancelServerActivitiesActivitiesErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public CancelServerActivitiesActivitiesErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public CancelServerActivitiesActivitiesErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CancelServerActivitiesActivitiesErrors other = (CancelServerActivitiesActivitiesErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(CancelServerActivitiesActivitiesErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public CancelServerActivitiesActivitiesErrors build() {
return new CancelServerActivitiesActivitiesErrors(
code,
message,
status);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* CancelServerActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* CancelServerActivitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class CancelServerActivitiesResponseBody extends RuntimeException {
public class CancelServerActivitiesBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public CancelServerActivitiesResponseBody(
public CancelServerActivitiesBadRequest(
@JsonProperty("errors") Optional<? extends List<CancelServerActivitiesErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public CancelServerActivitiesResponseBody() {
public CancelServerActivitiesBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
return new Builder();
}
public CancelServerActivitiesResponseBody withErrors(List<CancelServerActivitiesErrors> errors) {
public CancelServerActivitiesBadRequest withErrors(List<CancelServerActivitiesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CancelServerActivitiesResponseBody withErrors(Optional<? extends List<CancelServerActivitiesErrors>> errors) {
public CancelServerActivitiesBadRequest withErrors(Optional<? extends List<CancelServerActivitiesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CancelServerActivitiesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public CancelServerActivitiesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CancelServerActivitiesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public CancelServerActivitiesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
CancelServerActivitiesResponseBody other = (CancelServerActivitiesResponseBody) o;
CancelServerActivitiesBadRequest other = (CancelServerActivitiesBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(CancelServerActivitiesResponseBody.class,
return Utils.toString(CancelServerActivitiesBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class CancelServerActivitiesResponseBody extends RuntimeException {
return this;
}
public CancelServerActivitiesResponseBody build() {
return new CancelServerActivitiesResponseBody(
public CancelServerActivitiesBadRequest build() {
return new CancelServerActivitiesBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class CancelServerActivitiesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class CancelServerActivitiesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public CancelServerActivitiesErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class CancelServerActivitiesErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class CancelServerActivitiesErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class CancelServerActivitiesErrors {
return new Builder();
}
public CancelServerActivitiesErrors withCode(double code) {
public CancelServerActivitiesErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public CancelServerActivitiesErrors withCode(Optional<Double> code) {
public CancelServerActivitiesErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class CancelServerActivitiesErrors {
return this;
}
public CancelServerActivitiesErrors withStatus(double status) {
public CancelServerActivitiesErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public CancelServerActivitiesErrors withStatus(Optional<Double> status) {
public CancelServerActivitiesErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class CancelServerActivitiesErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class CancelServerActivitiesErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* CancelServerActivitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class CancelServerActivitiesUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public CancelServerActivitiesUnauthorized(
@JsonProperty("errors") Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public CancelServerActivitiesUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<CancelServerActivitiesActivitiesErrors>> errors(){
return (Optional<List<CancelServerActivitiesActivitiesErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public CancelServerActivitiesUnauthorized withErrors(List<CancelServerActivitiesActivitiesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CancelServerActivitiesUnauthorized withErrors(Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CancelServerActivitiesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CancelServerActivitiesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CancelServerActivitiesUnauthorized other = (CancelServerActivitiesUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CancelServerActivitiesUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<CancelServerActivitiesActivitiesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public CancelServerActivitiesUnauthorized build() {
return new CancelServerActivitiesUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* CheckForUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* CheckForUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class CheckForUpdatesResponseBody extends RuntimeException {
public class CheckForUpdatesBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public CheckForUpdatesResponseBody(
public CheckForUpdatesBadRequest(
@JsonProperty("errors") Optional<? extends List<CheckForUpdatesErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public CheckForUpdatesResponseBody() {
public CheckForUpdatesBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
return new Builder();
}
public CheckForUpdatesResponseBody withErrors(List<CheckForUpdatesErrors> errors) {
public CheckForUpdatesBadRequest withErrors(List<CheckForUpdatesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CheckForUpdatesResponseBody withErrors(Optional<? extends List<CheckForUpdatesErrors>> errors) {
public CheckForUpdatesBadRequest withErrors(Optional<? extends List<CheckForUpdatesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CheckForUpdatesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public CheckForUpdatesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CheckForUpdatesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public CheckForUpdatesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
CheckForUpdatesResponseBody other = (CheckForUpdatesResponseBody) o;
CheckForUpdatesBadRequest other = (CheckForUpdatesBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(CheckForUpdatesResponseBody.class,
return Utils.toString(CheckForUpdatesBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class CheckForUpdatesResponseBody extends RuntimeException {
return this;
}
public CheckForUpdatesResponseBody build() {
return new CheckForUpdatesResponseBody(
public CheckForUpdatesBadRequest build() {
return new CheckForUpdatesBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class CheckForUpdatesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class CheckForUpdatesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public CheckForUpdatesErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class CheckForUpdatesErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class CheckForUpdatesErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class CheckForUpdatesErrors {
return new Builder();
}
public CheckForUpdatesErrors withCode(double code) {
public CheckForUpdatesErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public CheckForUpdatesErrors withCode(Optional<Double> code) {
public CheckForUpdatesErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class CheckForUpdatesErrors {
return this;
}
public CheckForUpdatesErrors withStatus(double status) {
public CheckForUpdatesErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public CheckForUpdatesErrors withStatus(Optional<Double> status) {
public CheckForUpdatesErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class CheckForUpdatesErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class CheckForUpdatesErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* CheckForUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class CheckForUpdatesUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public CheckForUpdatesUnauthorized(
@JsonProperty("errors") Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public CheckForUpdatesUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<CheckForUpdatesUpdaterErrors>> errors(){
return (Optional<List<CheckForUpdatesUpdaterErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public CheckForUpdatesUnauthorized withErrors(List<CheckForUpdatesUpdaterErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CheckForUpdatesUnauthorized withErrors(Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CheckForUpdatesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CheckForUpdatesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CheckForUpdatesUnauthorized other = (CheckForUpdatesUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CheckForUpdatesUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<CheckForUpdatesUpdaterErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public CheckForUpdatesUnauthorized build() {
return new CheckForUpdatesUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class CheckForUpdatesUpdaterErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public CheckForUpdatesUpdaterErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public CheckForUpdatesUpdaterErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public CheckForUpdatesUpdaterErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public CheckForUpdatesUpdaterErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public CheckForUpdatesUpdaterErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public CheckForUpdatesUpdaterErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public CheckForUpdatesUpdaterErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public CheckForUpdatesUpdaterErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CheckForUpdatesUpdaterErrors other = (CheckForUpdatesUpdaterErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(CheckForUpdatesUpdaterErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public CheckForUpdatesUpdaterErrors build() {
return new CheckForUpdatesUpdaterErrors(
code,
message,
status);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* ClearPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* ClearPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class ClearPlaylistContentsResponseBody extends RuntimeException {
public class ClearPlaylistContentsBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public ClearPlaylistContentsResponseBody(
public ClearPlaylistContentsBadRequest(
@JsonProperty("errors") Optional<? extends List<ClearPlaylistContentsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public ClearPlaylistContentsResponseBody() {
public ClearPlaylistContentsBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
return new Builder();
}
public ClearPlaylistContentsResponseBody withErrors(List<ClearPlaylistContentsErrors> errors) {
public ClearPlaylistContentsBadRequest withErrors(List<ClearPlaylistContentsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public ClearPlaylistContentsResponseBody withErrors(Optional<? extends List<ClearPlaylistContentsErrors>> errors) {
public ClearPlaylistContentsBadRequest withErrors(Optional<? extends List<ClearPlaylistContentsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public ClearPlaylistContentsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public ClearPlaylistContentsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public ClearPlaylistContentsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public ClearPlaylistContentsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
ClearPlaylistContentsResponseBody other = (ClearPlaylistContentsResponseBody) o;
ClearPlaylistContentsBadRequest other = (ClearPlaylistContentsBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(ClearPlaylistContentsResponseBody.class,
return Utils.toString(ClearPlaylistContentsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class ClearPlaylistContentsResponseBody extends RuntimeException {
return this;
}
public ClearPlaylistContentsResponseBody build() {
return new ClearPlaylistContentsResponseBody(
public ClearPlaylistContentsBadRequest build() {
return new ClearPlaylistContentsBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class ClearPlaylistContentsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class ClearPlaylistContentsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public ClearPlaylistContentsErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class ClearPlaylistContentsErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class ClearPlaylistContentsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class ClearPlaylistContentsErrors {
return new Builder();
}
public ClearPlaylistContentsErrors withCode(double code) {
public ClearPlaylistContentsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public ClearPlaylistContentsErrors withCode(Optional<Double> code) {
public ClearPlaylistContentsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class ClearPlaylistContentsErrors {
return this;
}
public ClearPlaylistContentsErrors withStatus(double status) {
public ClearPlaylistContentsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public ClearPlaylistContentsErrors withStatus(Optional<Double> status) {
public ClearPlaylistContentsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class ClearPlaylistContentsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class ClearPlaylistContentsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class ClearPlaylistContentsPlaylistsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public ClearPlaylistContentsPlaylistsErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public ClearPlaylistContentsPlaylistsErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public ClearPlaylistContentsPlaylistsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public ClearPlaylistContentsPlaylistsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public ClearPlaylistContentsPlaylistsErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public ClearPlaylistContentsPlaylistsErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public ClearPlaylistContentsPlaylistsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public ClearPlaylistContentsPlaylistsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClearPlaylistContentsPlaylistsErrors other = (ClearPlaylistContentsPlaylistsErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(ClearPlaylistContentsPlaylistsErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public ClearPlaylistContentsPlaylistsErrors build() {
return new ClearPlaylistContentsPlaylistsErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* ClearPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class ClearPlaylistContentsUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public ClearPlaylistContentsUnauthorized(
@JsonProperty("errors") Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public ClearPlaylistContentsUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<ClearPlaylistContentsPlaylistsErrors>> errors(){
return (Optional<List<ClearPlaylistContentsPlaylistsErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public ClearPlaylistContentsUnauthorized withErrors(List<ClearPlaylistContentsPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public ClearPlaylistContentsUnauthorized withErrors(Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public ClearPlaylistContentsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public ClearPlaylistContentsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClearPlaylistContentsUnauthorized other = (ClearPlaylistContentsUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(ClearPlaylistContentsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<ClearPlaylistContentsPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public ClearPlaylistContentsUnauthorized build() {
return new ClearPlaylistContentsUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* CreatePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* CreatePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class CreatePlaylistResponseBody extends RuntimeException {
public class CreatePlaylistBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public CreatePlaylistResponseBody(
public CreatePlaylistBadRequest(
@JsonProperty("errors") Optional<? extends List<CreatePlaylistErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public CreatePlaylistResponseBody() {
public CreatePlaylistBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class CreatePlaylistResponseBody extends RuntimeException {
return new Builder();
}
public CreatePlaylistResponseBody withErrors(List<CreatePlaylistErrors> errors) {
public CreatePlaylistBadRequest withErrors(List<CreatePlaylistErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CreatePlaylistResponseBody withErrors(Optional<? extends List<CreatePlaylistErrors>> errors) {
public CreatePlaylistBadRequest withErrors(Optional<? extends List<CreatePlaylistErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CreatePlaylistResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public CreatePlaylistBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CreatePlaylistResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public CreatePlaylistBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
CreatePlaylistResponseBody other = (CreatePlaylistResponseBody) o;
CreatePlaylistBadRequest other = (CreatePlaylistBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class CreatePlaylistResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(CreatePlaylistResponseBody.class,
return Utils.toString(CreatePlaylistBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class CreatePlaylistResponseBody extends RuntimeException {
return this;
}
public CreatePlaylistResponseBody build() {
return new CreatePlaylistResponseBody(
public CreatePlaylistBadRequest build() {
return new CreatePlaylistBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class CreatePlaylistErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class CreatePlaylistErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public CreatePlaylistErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class CreatePlaylistErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class CreatePlaylistErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class CreatePlaylistErrors {
return new Builder();
}
public CreatePlaylistErrors withCode(double code) {
public CreatePlaylistErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public CreatePlaylistErrors withCode(Optional<Double> code) {
public CreatePlaylistErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class CreatePlaylistErrors {
return this;
}
public CreatePlaylistErrors withStatus(double status) {
public CreatePlaylistErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public CreatePlaylistErrors withStatus(Optional<Double> status) {
public CreatePlaylistErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class CreatePlaylistErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class CreatePlaylistErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class CreatePlaylistPlaylistsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public CreatePlaylistPlaylistsErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public CreatePlaylistPlaylistsErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public CreatePlaylistPlaylistsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public CreatePlaylistPlaylistsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public CreatePlaylistPlaylistsErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public CreatePlaylistPlaylistsErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public CreatePlaylistPlaylistsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public CreatePlaylistPlaylistsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreatePlaylistPlaylistsErrors other = (CreatePlaylistPlaylistsErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(CreatePlaylistPlaylistsErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public CreatePlaylistPlaylistsErrors build() {
return new CreatePlaylistPlaylistsErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* CreatePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class CreatePlaylistUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public CreatePlaylistUnauthorized(
@JsonProperty("errors") Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public CreatePlaylistUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<CreatePlaylistPlaylistsErrors>> errors(){
return (Optional<List<CreatePlaylistPlaylistsErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public CreatePlaylistUnauthorized withErrors(List<CreatePlaylistPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CreatePlaylistUnauthorized withErrors(Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CreatePlaylistUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public CreatePlaylistUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreatePlaylistUnauthorized other = (CreatePlaylistUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CreatePlaylistUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<CreatePlaylistPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public CreatePlaylistUnauthorized build() {
return new CreatePlaylistUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* DeleteLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* DeleteLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class DeleteLibraryResponseBody extends RuntimeException {
public class DeleteLibraryBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public DeleteLibraryResponseBody(
public DeleteLibraryBadRequest(
@JsonProperty("errors") Optional<? extends List<DeleteLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public DeleteLibraryResponseBody() {
public DeleteLibraryBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class DeleteLibraryResponseBody extends RuntimeException {
return new Builder();
}
public DeleteLibraryResponseBody withErrors(List<DeleteLibraryErrors> errors) {
public DeleteLibraryBadRequest withErrors(List<DeleteLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public DeleteLibraryResponseBody withErrors(Optional<? extends List<DeleteLibraryErrors>> errors) {
public DeleteLibraryBadRequest withErrors(Optional<? extends List<DeleteLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public DeleteLibraryResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public DeleteLibraryBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public DeleteLibraryResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public DeleteLibraryBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteLibraryResponseBody other = (DeleteLibraryResponseBody) o;
DeleteLibraryBadRequest other = (DeleteLibraryBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class DeleteLibraryResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(DeleteLibraryResponseBody.class,
return Utils.toString(DeleteLibraryBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class DeleteLibraryResponseBody extends RuntimeException {
return this;
}
public DeleteLibraryResponseBody build() {
return new DeleteLibraryResponseBody(
public DeleteLibraryBadRequest build() {
return new DeleteLibraryBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class DeleteLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class DeleteLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public DeleteLibraryErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class DeleteLibraryErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class DeleteLibraryErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class DeleteLibraryErrors {
return new Builder();
}
public DeleteLibraryErrors withCode(double code) {
public DeleteLibraryErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public DeleteLibraryErrors withCode(Optional<Double> code) {
public DeleteLibraryErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class DeleteLibraryErrors {
return this;
}
public DeleteLibraryErrors withStatus(double status) {
public DeleteLibraryErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public DeleteLibraryErrors withStatus(Optional<Double> status) {
public DeleteLibraryErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class DeleteLibraryErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class DeleteLibraryErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class DeleteLibraryLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public DeleteLibraryLibraryErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public DeleteLibraryLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public DeleteLibraryLibraryErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public DeleteLibraryLibraryErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public DeleteLibraryLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public DeleteLibraryLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public DeleteLibraryLibraryErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public DeleteLibraryLibraryErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteLibraryLibraryErrors other = (DeleteLibraryLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(DeleteLibraryLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public DeleteLibraryLibraryErrors build() {
return new DeleteLibraryLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* DeleteLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class DeleteLibraryUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<DeleteLibraryLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public DeleteLibraryUnauthorized(
@JsonProperty("errors") Optional<? extends List<DeleteLibraryLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public DeleteLibraryUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<DeleteLibraryLibraryErrors>> errors(){
return (Optional<List<DeleteLibraryLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public DeleteLibraryUnauthorized withErrors(List<DeleteLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public DeleteLibraryUnauthorized withErrors(Optional<? extends List<DeleteLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public DeleteLibraryUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public DeleteLibraryUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeleteLibraryUnauthorized other = (DeleteLibraryUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(DeleteLibraryUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<DeleteLibraryLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<DeleteLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<DeleteLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public DeleteLibraryUnauthorized build() {
return new DeleteLibraryUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* DeletePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* DeletePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class DeletePlaylistResponseBody extends RuntimeException {
public class DeletePlaylistBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public DeletePlaylistResponseBody(
public DeletePlaylistBadRequest(
@JsonProperty("errors") Optional<? extends List<DeletePlaylistErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public DeletePlaylistResponseBody() {
public DeletePlaylistBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class DeletePlaylistResponseBody extends RuntimeException {
return new Builder();
}
public DeletePlaylistResponseBody withErrors(List<DeletePlaylistErrors> errors) {
public DeletePlaylistBadRequest withErrors(List<DeletePlaylistErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public DeletePlaylistResponseBody withErrors(Optional<? extends List<DeletePlaylistErrors>> errors) {
public DeletePlaylistBadRequest withErrors(Optional<? extends List<DeletePlaylistErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public DeletePlaylistResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public DeletePlaylistBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public DeletePlaylistResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public DeletePlaylistBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
DeletePlaylistResponseBody other = (DeletePlaylistResponseBody) o;
DeletePlaylistBadRequest other = (DeletePlaylistBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class DeletePlaylistResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(DeletePlaylistResponseBody.class,
return Utils.toString(DeletePlaylistBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class DeletePlaylistResponseBody extends RuntimeException {
return this;
}
public DeletePlaylistResponseBody build() {
return new DeletePlaylistResponseBody(
public DeletePlaylistBadRequest build() {
return new DeletePlaylistBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class DeletePlaylistErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class DeletePlaylistErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public DeletePlaylistErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class DeletePlaylistErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class DeletePlaylistErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class DeletePlaylistErrors {
return new Builder();
}
public DeletePlaylistErrors withCode(double code) {
public DeletePlaylistErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public DeletePlaylistErrors withCode(Optional<Double> code) {
public DeletePlaylistErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class DeletePlaylistErrors {
return this;
}
public DeletePlaylistErrors withStatus(double status) {
public DeletePlaylistErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public DeletePlaylistErrors withStatus(Optional<Double> status) {
public DeletePlaylistErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class DeletePlaylistErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class DeletePlaylistErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class DeletePlaylistPlaylistsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public DeletePlaylistPlaylistsErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public DeletePlaylistPlaylistsErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public DeletePlaylistPlaylistsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public DeletePlaylistPlaylistsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public DeletePlaylistPlaylistsErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public DeletePlaylistPlaylistsErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public DeletePlaylistPlaylistsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public DeletePlaylistPlaylistsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeletePlaylistPlaylistsErrors other = (DeletePlaylistPlaylistsErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(DeletePlaylistPlaylistsErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public DeletePlaylistPlaylistsErrors build() {
return new DeletePlaylistPlaylistsErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* DeletePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class DeletePlaylistUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public DeletePlaylistUnauthorized(
@JsonProperty("errors") Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public DeletePlaylistUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<DeletePlaylistPlaylistsErrors>> errors(){
return (Optional<List<DeletePlaylistPlaylistsErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public DeletePlaylistUnauthorized withErrors(List<DeletePlaylistPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public DeletePlaylistUnauthorized withErrors(Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public DeletePlaylistUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public DeletePlaylistUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeletePlaylistUnauthorized other = (DeletePlaylistUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(DeletePlaylistUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<DeletePlaylistPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<DeletePlaylistPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public DeletePlaylistUnauthorized build() {
return new DeletePlaylistUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* EnablePaperTrailResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* EnablePaperTrailBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class EnablePaperTrailResponseBody extends RuntimeException {
public class EnablePaperTrailBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public EnablePaperTrailResponseBody(
public EnablePaperTrailBadRequest(
@JsonProperty("errors") Optional<? extends List<EnablePaperTrailErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public EnablePaperTrailResponseBody() {
public EnablePaperTrailBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
return new Builder();
}
public EnablePaperTrailResponseBody withErrors(List<EnablePaperTrailErrors> errors) {
public EnablePaperTrailBadRequest withErrors(List<EnablePaperTrailErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public EnablePaperTrailResponseBody withErrors(Optional<? extends List<EnablePaperTrailErrors>> errors) {
public EnablePaperTrailBadRequest withErrors(Optional<? extends List<EnablePaperTrailErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public EnablePaperTrailResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public EnablePaperTrailBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public EnablePaperTrailResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public EnablePaperTrailBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
EnablePaperTrailResponseBody other = (EnablePaperTrailResponseBody) o;
EnablePaperTrailBadRequest other = (EnablePaperTrailBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(EnablePaperTrailResponseBody.class,
return Utils.toString(EnablePaperTrailBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class EnablePaperTrailResponseBody extends RuntimeException {
return this;
}
public EnablePaperTrailResponseBody build() {
return new EnablePaperTrailResponseBody(
public EnablePaperTrailBadRequest build() {
return new EnablePaperTrailBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class EnablePaperTrailErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class EnablePaperTrailErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public EnablePaperTrailErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class EnablePaperTrailErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class EnablePaperTrailErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class EnablePaperTrailErrors {
return new Builder();
}
public EnablePaperTrailErrors withCode(double code) {
public EnablePaperTrailErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public EnablePaperTrailErrors withCode(Optional<Double> code) {
public EnablePaperTrailErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class EnablePaperTrailErrors {
return this;
}
public EnablePaperTrailErrors withStatus(double status) {
public EnablePaperTrailErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public EnablePaperTrailErrors withStatus(Optional<Double> status) {
public EnablePaperTrailErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class EnablePaperTrailErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class EnablePaperTrailErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class EnablePaperTrailLogErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public EnablePaperTrailLogErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public EnablePaperTrailLogErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public EnablePaperTrailLogErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public EnablePaperTrailLogErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public EnablePaperTrailLogErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public EnablePaperTrailLogErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public EnablePaperTrailLogErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public EnablePaperTrailLogErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnablePaperTrailLogErrors other = (EnablePaperTrailLogErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(EnablePaperTrailLogErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public EnablePaperTrailLogErrors build() {
return new EnablePaperTrailLogErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* EnablePaperTrailUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class EnablePaperTrailUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<EnablePaperTrailLogErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public EnablePaperTrailUnauthorized(
@JsonProperty("errors") Optional<? extends List<EnablePaperTrailLogErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public EnablePaperTrailUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<EnablePaperTrailLogErrors>> errors(){
return (Optional<List<EnablePaperTrailLogErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public EnablePaperTrailUnauthorized withErrors(List<EnablePaperTrailLogErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public EnablePaperTrailUnauthorized withErrors(Optional<? extends List<EnablePaperTrailLogErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public EnablePaperTrailUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public EnablePaperTrailUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnablePaperTrailUnauthorized other = (EnablePaperTrailUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(EnablePaperTrailUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<EnablePaperTrailLogErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<EnablePaperTrailLogErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<EnablePaperTrailLogErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public EnablePaperTrailUnauthorized build() {
return new EnablePaperTrailUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class Errors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class Errors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public Errors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class Errors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class Errors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class Errors {
return new Builder();
}
public Errors withCode(double code) {
public Errors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Errors withCode(Optional<Double> code) {
public Errors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class Errors {
return this;
}
public Errors withStatus(double status) {
public Errors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Errors withStatus(Optional<Double> status) {
public Errors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class Errors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class Errors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetAllLibrariesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetAllLibrariesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetAllLibrariesResponseBody extends RuntimeException {
public class GetAllLibrariesBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetAllLibrariesResponseBody(
public GetAllLibrariesBadRequest(
@JsonProperty("errors") Optional<? extends List<GetAllLibrariesErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetAllLibrariesResponseBody() {
public GetAllLibrariesBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
return new Builder();
}
public GetAllLibrariesResponseBody withErrors(List<GetAllLibrariesErrors> errors) {
public GetAllLibrariesBadRequest withErrors(List<GetAllLibrariesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetAllLibrariesResponseBody withErrors(Optional<? extends List<GetAllLibrariesErrors>> errors) {
public GetAllLibrariesBadRequest withErrors(Optional<? extends List<GetAllLibrariesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllLibrariesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetAllLibrariesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllLibrariesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetAllLibrariesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllLibrariesResponseBody other = (GetAllLibrariesResponseBody) o;
GetAllLibrariesBadRequest other = (GetAllLibrariesBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetAllLibrariesResponseBody.class,
return Utils.toString(GetAllLibrariesBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetAllLibrariesResponseBody extends RuntimeException {
return this;
}
public GetAllLibrariesResponseBody build() {
return new GetAllLibrariesResponseBody(
public GetAllLibrariesBadRequest build() {
return new GetAllLibrariesBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetAllLibrariesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetAllLibrariesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetAllLibrariesErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetAllLibrariesErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetAllLibrariesErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetAllLibrariesErrors {
return new Builder();
}
public GetAllLibrariesErrors withCode(double code) {
public GetAllLibrariesErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetAllLibrariesErrors withCode(Optional<Double> code) {
public GetAllLibrariesErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetAllLibrariesErrors {
return this;
}
public GetAllLibrariesErrors withStatus(double status) {
public GetAllLibrariesErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetAllLibrariesErrors withStatus(Optional<Double> status) {
public GetAllLibrariesErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetAllLibrariesErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetAllLibrariesErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetAllLibrariesLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetAllLibrariesLibraryErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetAllLibrariesLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetAllLibrariesLibraryErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetAllLibrariesLibraryErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetAllLibrariesLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetAllLibrariesLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetAllLibrariesLibraryErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetAllLibrariesLibraryErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllLibrariesLibraryErrors other = (GetAllLibrariesLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetAllLibrariesLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetAllLibrariesLibraryErrors build() {
return new GetAllLibrariesLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetAllLibrariesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetAllLibrariesUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetAllLibrariesLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetAllLibrariesUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetAllLibrariesLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetAllLibrariesUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetAllLibrariesLibraryErrors>> errors(){
return (Optional<List<GetAllLibrariesLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetAllLibrariesUnauthorized withErrors(List<GetAllLibrariesLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetAllLibrariesUnauthorized withErrors(Optional<? extends List<GetAllLibrariesLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllLibrariesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAllLibrariesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAllLibrariesUnauthorized other = (GetAllLibrariesUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetAllLibrariesUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetAllLibrariesLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetAllLibrariesLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetAllLibrariesLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetAllLibrariesUnauthorized build() {
return new GetAllLibrariesUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetAvailableClientsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetAvailableClientsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetAvailableClientsResponseBody extends RuntimeException {
public class GetAvailableClientsBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetAvailableClientsResponseBody(
public GetAvailableClientsBadRequest(
@JsonProperty("errors") Optional<? extends List<GetAvailableClientsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetAvailableClientsResponseBody() {
public GetAvailableClientsBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
return new Builder();
}
public GetAvailableClientsResponseBody withErrors(List<GetAvailableClientsErrors> errors) {
public GetAvailableClientsBadRequest withErrors(List<GetAvailableClientsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetAvailableClientsResponseBody withErrors(Optional<? extends List<GetAvailableClientsErrors>> errors) {
public GetAvailableClientsBadRequest withErrors(Optional<? extends List<GetAvailableClientsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAvailableClientsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetAvailableClientsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAvailableClientsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetAvailableClientsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAvailableClientsResponseBody other = (GetAvailableClientsResponseBody) o;
GetAvailableClientsBadRequest other = (GetAvailableClientsBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetAvailableClientsResponseBody.class,
return Utils.toString(GetAvailableClientsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetAvailableClientsResponseBody extends RuntimeException {
return this;
}
public GetAvailableClientsResponseBody build() {
return new GetAvailableClientsResponseBody(
public GetAvailableClientsBadRequest build() {
return new GetAvailableClientsBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetAvailableClientsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetAvailableClientsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetAvailableClientsErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetAvailableClientsErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetAvailableClientsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetAvailableClientsErrors {
return new Builder();
}
public GetAvailableClientsErrors withCode(double code) {
public GetAvailableClientsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetAvailableClientsErrors withCode(Optional<Double> code) {
public GetAvailableClientsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetAvailableClientsErrors {
return this;
}
public GetAvailableClientsErrors withStatus(double status) {
public GetAvailableClientsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetAvailableClientsErrors withStatus(Optional<Double> status) {
public GetAvailableClientsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetAvailableClientsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetAvailableClientsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetAvailableClientsServerErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetAvailableClientsServerErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetAvailableClientsServerErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetAvailableClientsServerErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetAvailableClientsServerErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetAvailableClientsServerErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetAvailableClientsServerErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetAvailableClientsServerErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetAvailableClientsServerErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAvailableClientsServerErrors other = (GetAvailableClientsServerErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetAvailableClientsServerErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetAvailableClientsServerErrors build() {
return new GetAvailableClientsServerErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetAvailableClientsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetAvailableClientsUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetAvailableClientsServerErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetAvailableClientsUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetAvailableClientsServerErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetAvailableClientsUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetAvailableClientsServerErrors>> errors(){
return (Optional<List<GetAvailableClientsServerErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetAvailableClientsUnauthorized withErrors(List<GetAvailableClientsServerErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetAvailableClientsUnauthorized withErrors(Optional<? extends List<GetAvailableClientsServerErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAvailableClientsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetAvailableClientsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetAvailableClientsUnauthorized other = (GetAvailableClientsUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetAvailableClientsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetAvailableClientsServerErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetAvailableClientsServerErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetAvailableClientsServerErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetAvailableClientsUnauthorized build() {
return new GetAvailableClientsUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetBandwidthStatisticsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetBandwidthStatisticsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetBandwidthStatisticsResponseBody extends RuntimeException {
public class GetBandwidthStatisticsBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetBandwidthStatisticsResponseBody(
public GetBandwidthStatisticsBadRequest(
@JsonProperty("errors") Optional<? extends List<GetBandwidthStatisticsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetBandwidthStatisticsResponseBody() {
public GetBandwidthStatisticsBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
return new Builder();
}
public GetBandwidthStatisticsResponseBody withErrors(List<GetBandwidthStatisticsErrors> errors) {
public GetBandwidthStatisticsBadRequest withErrors(List<GetBandwidthStatisticsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetBandwidthStatisticsResponseBody withErrors(Optional<? extends List<GetBandwidthStatisticsErrors>> errors) {
public GetBandwidthStatisticsBadRequest withErrors(Optional<? extends List<GetBandwidthStatisticsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetBandwidthStatisticsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetBandwidthStatisticsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetBandwidthStatisticsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetBandwidthStatisticsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetBandwidthStatisticsResponseBody other = (GetBandwidthStatisticsResponseBody) o;
GetBandwidthStatisticsBadRequest other = (GetBandwidthStatisticsBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetBandwidthStatisticsResponseBody.class,
return Utils.toString(GetBandwidthStatisticsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetBandwidthStatisticsResponseBody extends RuntimeException {
return this;
}
public GetBandwidthStatisticsResponseBody build() {
return new GetBandwidthStatisticsResponseBody(
public GetBandwidthStatisticsBadRequest build() {
return new GetBandwidthStatisticsBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetBandwidthStatisticsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetBandwidthStatisticsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetBandwidthStatisticsErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetBandwidthStatisticsErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetBandwidthStatisticsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetBandwidthStatisticsErrors {
return new Builder();
}
public GetBandwidthStatisticsErrors withCode(double code) {
public GetBandwidthStatisticsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetBandwidthStatisticsErrors withCode(Optional<Double> code) {
public GetBandwidthStatisticsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetBandwidthStatisticsErrors {
return this;
}
public GetBandwidthStatisticsErrors withStatus(double status) {
public GetBandwidthStatisticsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetBandwidthStatisticsErrors withStatus(Optional<Double> status) {
public GetBandwidthStatisticsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetBandwidthStatisticsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetBandwidthStatisticsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetBandwidthStatisticsStatisticsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetBandwidthStatisticsStatisticsErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetBandwidthStatisticsStatisticsErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetBandwidthStatisticsStatisticsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetBandwidthStatisticsStatisticsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetBandwidthStatisticsStatisticsErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetBandwidthStatisticsStatisticsErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetBandwidthStatisticsStatisticsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetBandwidthStatisticsStatisticsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetBandwidthStatisticsStatisticsErrors other = (GetBandwidthStatisticsStatisticsErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetBandwidthStatisticsStatisticsErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetBandwidthStatisticsStatisticsErrors build() {
return new GetBandwidthStatisticsStatisticsErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetBandwidthStatisticsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetBandwidthStatisticsUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetBandwidthStatisticsUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetBandwidthStatisticsUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetBandwidthStatisticsStatisticsErrors>> errors(){
return (Optional<List<GetBandwidthStatisticsStatisticsErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetBandwidthStatisticsUnauthorized withErrors(List<GetBandwidthStatisticsStatisticsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetBandwidthStatisticsUnauthorized withErrors(Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetBandwidthStatisticsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetBandwidthStatisticsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetBandwidthStatisticsUnauthorized other = (GetBandwidthStatisticsUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetBandwidthStatisticsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetBandwidthStatisticsStatisticsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetBandwidthStatisticsStatisticsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetBandwidthStatisticsUnauthorized build() {
return new GetBandwidthStatisticsUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetBannerImageResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetBannerImageBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetBannerImageResponseBody extends RuntimeException {
public class GetBannerImageBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetBannerImageResponseBody(
public GetBannerImageBadRequest(
@JsonProperty("errors") Optional<? extends List<GetBannerImageErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetBannerImageResponseBody() {
public GetBannerImageBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetBannerImageResponseBody extends RuntimeException {
return new Builder();
}
public GetBannerImageResponseBody withErrors(List<GetBannerImageErrors> errors) {
public GetBannerImageBadRequest withErrors(List<GetBannerImageErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetBannerImageResponseBody withErrors(Optional<? extends List<GetBannerImageErrors>> errors) {
public GetBannerImageBadRequest withErrors(Optional<? extends List<GetBannerImageErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetBannerImageResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetBannerImageBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetBannerImageResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetBannerImageBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetBannerImageResponseBody other = (GetBannerImageResponseBody) o;
GetBannerImageBadRequest other = (GetBannerImageBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetBannerImageResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetBannerImageResponseBody.class,
return Utils.toString(GetBannerImageBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetBannerImageResponseBody extends RuntimeException {
return this;
}
public GetBannerImageResponseBody build() {
return new GetBannerImageResponseBody(
public GetBannerImageBadRequest build() {
return new GetBannerImageBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetBannerImageErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetBannerImageErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetBannerImageErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetBannerImageErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetBannerImageErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetBannerImageErrors {
return new Builder();
}
public GetBannerImageErrors withCode(double code) {
public GetBannerImageErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetBannerImageErrors withCode(Optional<Double> code) {
public GetBannerImageErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetBannerImageErrors {
return this;
}
public GetBannerImageErrors withStatus(double status) {
public GetBannerImageErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetBannerImageErrors withStatus(Optional<Double> status) {
public GetBannerImageErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetBannerImageErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetBannerImageErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetBannerImageMediaErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetBannerImageMediaErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetBannerImageMediaErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetBannerImageMediaErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetBannerImageMediaErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetBannerImageMediaErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetBannerImageMediaErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetBannerImageMediaErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetBannerImageMediaErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetBannerImageMediaErrors other = (GetBannerImageMediaErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetBannerImageMediaErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetBannerImageMediaErrors build() {
return new GetBannerImageMediaErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetBannerImageUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetBannerImageUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetBannerImageMediaErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetBannerImageUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetBannerImageMediaErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetBannerImageUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetBannerImageMediaErrors>> errors(){
return (Optional<List<GetBannerImageMediaErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetBannerImageUnauthorized withErrors(List<GetBannerImageMediaErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetBannerImageUnauthorized withErrors(Optional<? extends List<GetBannerImageMediaErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetBannerImageUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetBannerImageUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetBannerImageUnauthorized other = (GetBannerImageUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetBannerImageUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetBannerImageMediaErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetBannerImageMediaErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetBannerImageMediaErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetBannerImageUnauthorized build() {
return new GetBannerImageUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetButlerTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetButlerTasksBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetButlerTasksResponseBody extends RuntimeException {
public class GetButlerTasksBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetButlerTasksResponseBody(
public GetButlerTasksBadRequest(
@JsonProperty("errors") Optional<? extends List<GetButlerTasksErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetButlerTasksResponseBody() {
public GetButlerTasksBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetButlerTasksResponseBody extends RuntimeException {
return new Builder();
}
public GetButlerTasksResponseBody withErrors(List<GetButlerTasksErrors> errors) {
public GetButlerTasksBadRequest withErrors(List<GetButlerTasksErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetButlerTasksResponseBody withErrors(Optional<? extends List<GetButlerTasksErrors>> errors) {
public GetButlerTasksBadRequest withErrors(Optional<? extends List<GetButlerTasksErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetButlerTasksResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetButlerTasksBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetButlerTasksResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetButlerTasksBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetButlerTasksResponseBody other = (GetButlerTasksResponseBody) o;
GetButlerTasksBadRequest other = (GetButlerTasksBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetButlerTasksResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetButlerTasksResponseBody.class,
return Utils.toString(GetButlerTasksBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetButlerTasksResponseBody extends RuntimeException {
return this;
}
public GetButlerTasksResponseBody build() {
return new GetButlerTasksResponseBody(
public GetButlerTasksBadRequest build() {
return new GetButlerTasksBadRequest(
errors,
rawResponse);
}

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetButlerTasksButlerErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetButlerTasksButlerErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetButlerTasksButlerErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetButlerTasksButlerErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetButlerTasksButlerErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetButlerTasksButlerErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetButlerTasksButlerErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetButlerTasksButlerErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetButlerTasksButlerErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetButlerTasksButlerErrors other = (GetButlerTasksButlerErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetButlerTasksButlerErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetButlerTasksButlerErrors build() {
return new GetButlerTasksButlerErrors(
code,
message,
status);
}
}
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetButlerTasksErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetButlerTasksErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetButlerTasksErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetButlerTasksErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetButlerTasksErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetButlerTasksErrors {
return new Builder();
}
public GetButlerTasksErrors withCode(double code) {
public GetButlerTasksErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetButlerTasksErrors withCode(Optional<Double> code) {
public GetButlerTasksErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetButlerTasksErrors {
return this;
}
public GetButlerTasksErrors withStatus(double status) {
public GetButlerTasksErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetButlerTasksErrors withStatus(Optional<Double> status) {
public GetButlerTasksErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetButlerTasksErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetButlerTasksErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetButlerTasksUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetButlerTasksUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetButlerTasksButlerErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetButlerTasksUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetButlerTasksButlerErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetButlerTasksUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetButlerTasksButlerErrors>> errors(){
return (Optional<List<GetButlerTasksButlerErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetButlerTasksUnauthorized withErrors(List<GetButlerTasksButlerErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetButlerTasksUnauthorized withErrors(Optional<? extends List<GetButlerTasksButlerErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetButlerTasksUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetButlerTasksUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetButlerTasksUnauthorized other = (GetButlerTasksUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetButlerTasksUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetButlerTasksButlerErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetButlerTasksButlerErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetButlerTasksButlerErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetButlerTasksUnauthorized build() {
return new GetButlerTasksUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetCompanionsDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetCompanionsDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetCompanionsDataResponseBody extends RuntimeException {
public class GetCompanionsDataBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetCompanionsDataResponseBody(
public GetCompanionsDataBadRequest(
@JsonProperty("errors") Optional<? extends List<GetCompanionsDataErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetCompanionsDataResponseBody() {
public GetCompanionsDataBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
return new Builder();
}
public GetCompanionsDataResponseBody withErrors(List<GetCompanionsDataErrors> errors) {
public GetCompanionsDataBadRequest withErrors(List<GetCompanionsDataErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetCompanionsDataResponseBody withErrors(Optional<? extends List<GetCompanionsDataErrors>> errors) {
public GetCompanionsDataBadRequest withErrors(Optional<? extends List<GetCompanionsDataErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetCompanionsDataResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetCompanionsDataBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetCompanionsDataResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetCompanionsDataBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetCompanionsDataResponseBody other = (GetCompanionsDataResponseBody) o;
GetCompanionsDataBadRequest other = (GetCompanionsDataBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetCompanionsDataResponseBody.class,
return Utils.toString(GetCompanionsDataBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetCompanionsDataResponseBody extends RuntimeException {
return this;
}
public GetCompanionsDataResponseBody build() {
return new GetCompanionsDataResponseBody(
public GetCompanionsDataBadRequest build() {
return new GetCompanionsDataBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetCompanionsDataErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetCompanionsDataErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetCompanionsDataErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetCompanionsDataErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetCompanionsDataErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetCompanionsDataErrors {
return new Builder();
}
public GetCompanionsDataErrors withCode(double code) {
public GetCompanionsDataErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetCompanionsDataErrors withCode(Optional<Double> code) {
public GetCompanionsDataErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetCompanionsDataErrors {
return this;
}
public GetCompanionsDataErrors withStatus(double status) {
public GetCompanionsDataErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetCompanionsDataErrors withStatus(Optional<Double> status) {
public GetCompanionsDataErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetCompanionsDataErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetCompanionsDataErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetCompanionsDataPlexErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetCompanionsDataPlexErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetCompanionsDataPlexErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetCompanionsDataPlexErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetCompanionsDataPlexErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetCompanionsDataPlexErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetCompanionsDataPlexErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetCompanionsDataPlexErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetCompanionsDataPlexErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetCompanionsDataPlexErrors other = (GetCompanionsDataPlexErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetCompanionsDataPlexErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetCompanionsDataPlexErrors build() {
return new GetCompanionsDataPlexErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetCompanionsDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetCompanionsDataUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetCompanionsDataPlexErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetCompanionsDataUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetCompanionsDataPlexErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetCompanionsDataUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetCompanionsDataPlexErrors>> errors(){
return (Optional<List<GetCompanionsDataPlexErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetCompanionsDataUnauthorized withErrors(List<GetCompanionsDataPlexErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetCompanionsDataUnauthorized withErrors(Optional<? extends List<GetCompanionsDataPlexErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetCompanionsDataUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetCompanionsDataUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetCompanionsDataUnauthorized other = (GetCompanionsDataUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetCompanionsDataUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetCompanionsDataPlexErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetCompanionsDataPlexErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetCompanionsDataPlexErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetCompanionsDataUnauthorized build() {
return new GetCompanionsDataUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetDevicesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetDevicesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetDevicesResponseBody extends RuntimeException {
public class GetDevicesBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetDevicesResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetDevicesResponseBody(
public GetDevicesBadRequest(
@JsonProperty("errors") Optional<? extends List<GetDevicesErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetDevicesResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetDevicesResponseBody() {
public GetDevicesBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetDevicesResponseBody extends RuntimeException {
return new Builder();
}
public GetDevicesResponseBody withErrors(List<GetDevicesErrors> errors) {
public GetDevicesBadRequest withErrors(List<GetDevicesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetDevicesResponseBody withErrors(Optional<? extends List<GetDevicesErrors>> errors) {
public GetDevicesBadRequest withErrors(Optional<? extends List<GetDevicesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetDevicesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetDevicesResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetDevicesBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetDevicesResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetDevicesResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetDevicesBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetDevicesResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetDevicesResponseBody other = (GetDevicesResponseBody) o;
GetDevicesBadRequest other = (GetDevicesBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetDevicesResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetDevicesResponseBody.class,
return Utils.toString(GetDevicesBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetDevicesResponseBody extends RuntimeException {
return this;
}
public GetDevicesResponseBody build() {
return new GetDevicesResponseBody(
public GetDevicesBadRequest build() {
return new GetDevicesBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetDevicesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetDevicesErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetDevicesErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetDevicesErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetDevicesErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetDevicesErrors {
return new Builder();
}
public GetDevicesErrors withCode(double code) {
public GetDevicesErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetDevicesErrors withCode(Optional<Double> code) {
public GetDevicesErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetDevicesErrors {
return this;
}
public GetDevicesErrors withStatus(double status) {
public GetDevicesErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetDevicesErrors withStatus(Optional<Double> status) {
public GetDevicesErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetDevicesErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetDevicesErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -11,18 +11,18 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetUserDetailsErrors {
public class GetDevicesServerErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetUserDetailsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetUserDetailsErrors(
@JsonProperty("code") Optional<Double> code,
public GetDevicesServerErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -45,12 +45,12 @@ public class GetUserDetailsErrors {
this.status = status;
}
public GetUserDetailsErrors() {
public GetDevicesServerErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetUserDetailsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,37 +68,37 @@ public class GetUserDetailsErrors {
return new Builder();
}
public GetUserDetailsErrors withCode(double code) {
public GetDevicesServerErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetUserDetailsErrors withCode(Optional<Double> code) {
public GetDevicesServerErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetUserDetailsErrors withMessage(String message) {
public GetDevicesServerErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetUserDetailsErrors withMessage(Optional<String> message) {
public GetDevicesServerErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetUserDetailsErrors withStatus(double status) {
public GetDevicesServerErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetUserDetailsErrors withStatus(Optional<Double> status) {
public GetDevicesServerErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -112,7 +112,7 @@ public class GetUserDetailsErrors {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetUserDetailsErrors other = (GetUserDetailsErrors) o;
GetDevicesServerErrors other = (GetDevicesServerErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
@@ -129,7 +129,7 @@ public class GetUserDetailsErrors {
@Override
public String toString() {
return Utils.toString(GetUserDetailsErrors.class,
return Utils.toString(GetDevicesServerErrors.class,
"code", code,
"message", message,
"status", status);
@@ -137,23 +137,23 @@ public class GetUserDetailsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,20 +171,20 @@ public class GetUserDetailsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetUserDetailsErrors build() {
return new GetUserDetailsErrors(
public GetDevicesServerErrors build() {
return new GetDevicesServerErrors(
code,
message,
status);

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetDevicesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetDevicesUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetDevicesServerErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetDevicesUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetDevicesServerErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetDevicesUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetDevicesServerErrors>> errors(){
return (Optional<List<GetDevicesServerErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetDevicesUnauthorized withErrors(List<GetDevicesServerErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetDevicesUnauthorized withErrors(Optional<? extends List<GetDevicesServerErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetDevicesUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetDevicesUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetDevicesUnauthorized other = (GetDevicesUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetDevicesUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetDevicesServerErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetDevicesServerErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetDevicesServerErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetDevicesUnauthorized build() {
return new GetDevicesUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetFileHashResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetFileHashBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetFileHashResponseBody extends RuntimeException {
public class GetFileHashBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetFileHashResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetFileHashResponseBody(
public GetFileHashBadRequest(
@JsonProperty("errors") Optional<? extends List<GetFileHashErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetFileHashResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetFileHashResponseBody() {
public GetFileHashBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetFileHashResponseBody extends RuntimeException {
return new Builder();
}
public GetFileHashResponseBody withErrors(List<GetFileHashErrors> errors) {
public GetFileHashBadRequest withErrors(List<GetFileHashErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetFileHashResponseBody withErrors(Optional<? extends List<GetFileHashErrors>> errors) {
public GetFileHashBadRequest withErrors(Optional<? extends List<GetFileHashErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetFileHashResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetFileHashResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetFileHashBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetFileHashResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetFileHashResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetFileHashBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetFileHashResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetFileHashResponseBody other = (GetFileHashResponseBody) o;
GetFileHashBadRequest other = (GetFileHashBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetFileHashResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetFileHashResponseBody.class,
return Utils.toString(GetFileHashBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetFileHashResponseBody extends RuntimeException {
return this;
}
public GetFileHashResponseBody build() {
return new GetFileHashResponseBody(
public GetFileHashBadRequest build() {
return new GetFileHashBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetFileHashErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetFileHashErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetFileHashErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetFileHashErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetFileHashErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetFileHashErrors {
return new Builder();
}
public GetFileHashErrors withCode(double code) {
public GetFileHashErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetFileHashErrors withCode(Optional<Double> code) {
public GetFileHashErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetFileHashErrors {
return this;
}
public GetFileHashErrors withStatus(double status) {
public GetFileHashErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetFileHashErrors withStatus(Optional<Double> status) {
public GetFileHashErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetFileHashErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetFileHashErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetFileHashLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetFileHashLibraryErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetFileHashLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetFileHashLibraryErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetFileHashLibraryErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetFileHashLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetFileHashLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetFileHashLibraryErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetFileHashLibraryErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetFileHashLibraryErrors other = (GetFileHashLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetFileHashLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetFileHashLibraryErrors build() {
return new GetFileHashLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetFileHashUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetFileHashUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetFileHashLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetFileHashUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetFileHashLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetFileHashUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetFileHashLibraryErrors>> errors(){
return (Optional<List<GetFileHashLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetFileHashUnauthorized withErrors(List<GetFileHashLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetFileHashUnauthorized withErrors(Optional<? extends List<GetFileHashLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetFileHashUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetFileHashUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetFileHashUnauthorized other = (GetFileHashUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetFileHashUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetFileHashLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetFileHashLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetFileHashLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetFileHashUnauthorized build() {
return new GetFileHashUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetGeoDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetGeoDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetGeoDataResponseBody extends RuntimeException {
public class GetGeoDataBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetGeoDataResponseBody(
public GetGeoDataBadRequest(
@JsonProperty("errors") Optional<? extends List<GetGeoDataErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetGeoDataResponseBody() {
public GetGeoDataBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetGeoDataResponseBody extends RuntimeException {
return new Builder();
}
public GetGeoDataResponseBody withErrors(List<GetGeoDataErrors> errors) {
public GetGeoDataBadRequest withErrors(List<GetGeoDataErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetGeoDataResponseBody withErrors(Optional<? extends List<GetGeoDataErrors>> errors) {
public GetGeoDataBadRequest withErrors(Optional<? extends List<GetGeoDataErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGeoDataResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetGeoDataBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGeoDataResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetGeoDataBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGeoDataResponseBody other = (GetGeoDataResponseBody) o;
GetGeoDataBadRequest other = (GetGeoDataBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetGeoDataResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetGeoDataResponseBody.class,
return Utils.toString(GetGeoDataBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetGeoDataResponseBody extends RuntimeException {
return this;
}
public GetGeoDataResponseBody build() {
return new GetGeoDataResponseBody(
public GetGeoDataBadRequest build() {
return new GetGeoDataBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetGeoDataErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetGeoDataErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetGeoDataErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetGeoDataErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetGeoDataErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetGeoDataErrors {
return new Builder();
}
public GetGeoDataErrors withCode(double code) {
public GetGeoDataErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetGeoDataErrors withCode(Optional<Double> code) {
public GetGeoDataErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetGeoDataErrors {
return this;
}
public GetGeoDataErrors withStatus(double status) {
public GetGeoDataErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetGeoDataErrors withStatus(Optional<Double> status) {
public GetGeoDataErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetGeoDataErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetGeoDataErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetGeoDataPlexErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetGeoDataPlexErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetGeoDataPlexErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetGeoDataPlexErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetGeoDataPlexErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetGeoDataPlexErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetGeoDataPlexErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetGeoDataPlexErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetGeoDataPlexErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGeoDataPlexErrors other = (GetGeoDataPlexErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetGeoDataPlexErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetGeoDataPlexErrors build() {
return new GetGeoDataPlexErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetGeoDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetGeoDataUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetGeoDataPlexErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetGeoDataUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetGeoDataPlexErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetGeoDataUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetGeoDataPlexErrors>> errors(){
return (Optional<List<GetGeoDataPlexErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetGeoDataUnauthorized withErrors(List<GetGeoDataPlexErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetGeoDataUnauthorized withErrors(Optional<? extends List<GetGeoDataPlexErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGeoDataUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGeoDataUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGeoDataUnauthorized other = (GetGeoDataUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetGeoDataUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetGeoDataPlexErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetGeoDataPlexErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetGeoDataPlexErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetGeoDataUnauthorized build() {
return new GetGeoDataUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetGlobalHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetGlobalHubsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetGlobalHubsResponseBody extends RuntimeException {
public class GetGlobalHubsBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetGlobalHubsResponseBody(
public GetGlobalHubsBadRequest(
@JsonProperty("errors") Optional<? extends List<GetGlobalHubsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetGlobalHubsResponseBody() {
public GetGlobalHubsBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
return new Builder();
}
public GetGlobalHubsResponseBody withErrors(List<GetGlobalHubsErrors> errors) {
public GetGlobalHubsBadRequest withErrors(List<GetGlobalHubsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetGlobalHubsResponseBody withErrors(Optional<? extends List<GetGlobalHubsErrors>> errors) {
public GetGlobalHubsBadRequest withErrors(Optional<? extends List<GetGlobalHubsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGlobalHubsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetGlobalHubsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGlobalHubsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetGlobalHubsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGlobalHubsResponseBody other = (GetGlobalHubsResponseBody) o;
GetGlobalHubsBadRequest other = (GetGlobalHubsBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetGlobalHubsResponseBody.class,
return Utils.toString(GetGlobalHubsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetGlobalHubsResponseBody extends RuntimeException {
return this;
}
public GetGlobalHubsResponseBody build() {
return new GetGlobalHubsResponseBody(
public GetGlobalHubsBadRequest build() {
return new GetGlobalHubsBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetGlobalHubsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetGlobalHubsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetGlobalHubsErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetGlobalHubsErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetGlobalHubsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetGlobalHubsErrors {
return new Builder();
}
public GetGlobalHubsErrors withCode(double code) {
public GetGlobalHubsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetGlobalHubsErrors withCode(Optional<Double> code) {
public GetGlobalHubsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetGlobalHubsErrors {
return this;
}
public GetGlobalHubsErrors withStatus(double status) {
public GetGlobalHubsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetGlobalHubsErrors withStatus(Optional<Double> status) {
public GetGlobalHubsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetGlobalHubsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetGlobalHubsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetGlobalHubsHubsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetGlobalHubsHubsErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetGlobalHubsHubsErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetGlobalHubsHubsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetGlobalHubsHubsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetGlobalHubsHubsErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetGlobalHubsHubsErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetGlobalHubsHubsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetGlobalHubsHubsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGlobalHubsHubsErrors other = (GetGlobalHubsHubsErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetGlobalHubsHubsErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetGlobalHubsHubsErrors build() {
return new GetGlobalHubsHubsErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetGlobalHubsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetGlobalHubsUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetGlobalHubsHubsErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetGlobalHubsUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetGlobalHubsHubsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetGlobalHubsUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetGlobalHubsHubsErrors>> errors(){
return (Optional<List<GetGlobalHubsHubsErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetGlobalHubsUnauthorized withErrors(List<GetGlobalHubsHubsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetGlobalHubsUnauthorized withErrors(Optional<? extends List<GetGlobalHubsHubsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGlobalHubsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGlobalHubsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGlobalHubsUnauthorized other = (GetGlobalHubsUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetGlobalHubsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetGlobalHubsHubsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetGlobalHubsHubsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetGlobalHubsHubsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetGlobalHubsUnauthorized build() {
return new GetGlobalHubsUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetHomeDataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetHomeDataBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetHomeDataResponseBody extends RuntimeException {
public class GetHomeDataBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetHomeDataResponseBody(
public GetHomeDataBadRequest(
@JsonProperty("errors") Optional<? extends List<GetHomeDataErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetHomeDataResponseBody() {
public GetHomeDataBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetHomeDataResponseBody extends RuntimeException {
return new Builder();
}
public GetHomeDataResponseBody withErrors(List<GetHomeDataErrors> errors) {
public GetHomeDataBadRequest withErrors(List<GetHomeDataErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetHomeDataResponseBody withErrors(Optional<? extends List<GetHomeDataErrors>> errors) {
public GetHomeDataBadRequest withErrors(Optional<? extends List<GetHomeDataErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetHomeDataResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetHomeDataBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetHomeDataResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetHomeDataBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetHomeDataResponseBody other = (GetHomeDataResponseBody) o;
GetHomeDataBadRequest other = (GetHomeDataBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetHomeDataResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetHomeDataResponseBody.class,
return Utils.toString(GetHomeDataBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetHomeDataResponseBody extends RuntimeException {
return this;
}
public GetHomeDataResponseBody build() {
return new GetHomeDataResponseBody(
public GetHomeDataBadRequest build() {
return new GetHomeDataBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetHomeDataErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetHomeDataErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetHomeDataErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetHomeDataErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetHomeDataErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetHomeDataErrors {
return new Builder();
}
public GetHomeDataErrors withCode(double code) {
public GetHomeDataErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetHomeDataErrors withCode(Optional<Double> code) {
public GetHomeDataErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetHomeDataErrors {
return this;
}
public GetHomeDataErrors withStatus(double status) {
public GetHomeDataErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetHomeDataErrors withStatus(Optional<Double> status) {
public GetHomeDataErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetHomeDataErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetHomeDataErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetHomeDataPlexErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetHomeDataPlexErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetHomeDataPlexErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetHomeDataPlexErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetHomeDataPlexErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetHomeDataPlexErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetHomeDataPlexErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetHomeDataPlexErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetHomeDataPlexErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetHomeDataPlexErrors other = (GetHomeDataPlexErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetHomeDataPlexErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetHomeDataPlexErrors build() {
return new GetHomeDataPlexErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetHomeDataUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetHomeDataUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetHomeDataPlexErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetHomeDataUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetHomeDataPlexErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetHomeDataUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetHomeDataPlexErrors>> errors(){
return (Optional<List<GetHomeDataPlexErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetHomeDataUnauthorized withErrors(List<GetHomeDataPlexErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetHomeDataUnauthorized withErrors(Optional<? extends List<GetHomeDataPlexErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetHomeDataUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetHomeDataUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetHomeDataUnauthorized other = (GetHomeDataUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetHomeDataUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetHomeDataPlexErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetHomeDataPlexErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetHomeDataPlexErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetHomeDataUnauthorized build() {
return new GetHomeDataUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetLibraryDetailsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetLibraryDetailsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetLibraryDetailsResponseBody extends RuntimeException {
public class GetLibraryDetailsBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetLibraryDetailsResponseBody(
public GetLibraryDetailsBadRequest(
@JsonProperty("errors") Optional<? extends List<GetLibraryDetailsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetLibraryDetailsResponseBody() {
public GetLibraryDetailsBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
return new Builder();
}
public GetLibraryDetailsResponseBody withErrors(List<GetLibraryDetailsErrors> errors) {
public GetLibraryDetailsBadRequest withErrors(List<GetLibraryDetailsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetLibraryDetailsResponseBody withErrors(Optional<? extends List<GetLibraryDetailsErrors>> errors) {
public GetLibraryDetailsBadRequest withErrors(Optional<? extends List<GetLibraryDetailsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryDetailsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetLibraryDetailsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryDetailsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetLibraryDetailsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryDetailsResponseBody other = (GetLibraryDetailsResponseBody) o;
GetLibraryDetailsBadRequest other = (GetLibraryDetailsBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetLibraryDetailsResponseBody.class,
return Utils.toString(GetLibraryDetailsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetLibraryDetailsResponseBody extends RuntimeException {
return this;
}
public GetLibraryDetailsResponseBody build() {
return new GetLibraryDetailsResponseBody(
public GetLibraryDetailsBadRequest build() {
return new GetLibraryDetailsBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetLibraryDetailsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetLibraryDetailsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetLibraryDetailsErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetLibraryDetailsErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetLibraryDetailsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetLibraryDetailsErrors {
return new Builder();
}
public GetLibraryDetailsErrors withCode(double code) {
public GetLibraryDetailsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetLibraryDetailsErrors withCode(Optional<Double> code) {
public GetLibraryDetailsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetLibraryDetailsErrors {
return this;
}
public GetLibraryDetailsErrors withStatus(double status) {
public GetLibraryDetailsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetLibraryDetailsErrors withStatus(Optional<Double> status) {
public GetLibraryDetailsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetLibraryDetailsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetLibraryDetailsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetLibraryDetailsLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetLibraryDetailsLibraryErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetLibraryDetailsLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetLibraryDetailsLibraryErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetLibraryDetailsLibraryErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetLibraryDetailsLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetLibraryDetailsLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetLibraryDetailsLibraryErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetLibraryDetailsLibraryErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryDetailsLibraryErrors other = (GetLibraryDetailsLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetLibraryDetailsLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetLibraryDetailsLibraryErrors build() {
return new GetLibraryDetailsLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetLibraryDetailsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetLibraryDetailsUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetLibraryDetailsLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetLibraryDetailsUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetLibraryDetailsLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetLibraryDetailsUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetLibraryDetailsLibraryErrors>> errors(){
return (Optional<List<GetLibraryDetailsLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetLibraryDetailsUnauthorized withErrors(List<GetLibraryDetailsLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetLibraryDetailsUnauthorized withErrors(Optional<? extends List<GetLibraryDetailsLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryDetailsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryDetailsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryDetailsUnauthorized other = (GetLibraryDetailsUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetLibraryDetailsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetLibraryDetailsLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetLibraryDetailsLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetLibraryDetailsLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetLibraryDetailsUnauthorized build() {
return new GetLibraryDetailsUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetLibraryHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetLibraryHubsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetLibraryHubsResponseBody extends RuntimeException {
public class GetLibraryHubsBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetLibraryHubsResponseBody(
public GetLibraryHubsBadRequest(
@JsonProperty("errors") Optional<? extends List<GetLibraryHubsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetLibraryHubsResponseBody() {
public GetLibraryHubsBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetLibraryHubsResponseBody extends RuntimeException {
return new Builder();
}
public GetLibraryHubsResponseBody withErrors(List<GetLibraryHubsErrors> errors) {
public GetLibraryHubsBadRequest withErrors(List<GetLibraryHubsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetLibraryHubsResponseBody withErrors(Optional<? extends List<GetLibraryHubsErrors>> errors) {
public GetLibraryHubsBadRequest withErrors(Optional<? extends List<GetLibraryHubsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryHubsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetLibraryHubsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryHubsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetLibraryHubsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryHubsResponseBody other = (GetLibraryHubsResponseBody) o;
GetLibraryHubsBadRequest other = (GetLibraryHubsBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetLibraryHubsResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetLibraryHubsResponseBody.class,
return Utils.toString(GetLibraryHubsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetLibraryHubsResponseBody extends RuntimeException {
return this;
}
public GetLibraryHubsResponseBody build() {
return new GetLibraryHubsResponseBody(
public GetLibraryHubsBadRequest build() {
return new GetLibraryHubsBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetLibraryHubsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetLibraryHubsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetLibraryHubsErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetLibraryHubsErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetLibraryHubsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetLibraryHubsErrors {
return new Builder();
}
public GetLibraryHubsErrors withCode(double code) {
public GetLibraryHubsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetLibraryHubsErrors withCode(Optional<Double> code) {
public GetLibraryHubsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetLibraryHubsErrors {
return this;
}
public GetLibraryHubsErrors withStatus(double status) {
public GetLibraryHubsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetLibraryHubsErrors withStatus(Optional<Double> status) {
public GetLibraryHubsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetLibraryHubsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetLibraryHubsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetLibraryHubsHubsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetLibraryHubsHubsErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetLibraryHubsHubsErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetLibraryHubsHubsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetLibraryHubsHubsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetLibraryHubsHubsErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetLibraryHubsHubsErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetLibraryHubsHubsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetLibraryHubsHubsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryHubsHubsErrors other = (GetLibraryHubsHubsErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetLibraryHubsHubsErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetLibraryHubsHubsErrors build() {
return new GetLibraryHubsHubsErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetLibraryHubsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetLibraryHubsUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetLibraryHubsHubsErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetLibraryHubsUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetLibraryHubsHubsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetLibraryHubsUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetLibraryHubsHubsErrors>> errors(){
return (Optional<List<GetLibraryHubsHubsErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetLibraryHubsUnauthorized withErrors(List<GetLibraryHubsHubsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetLibraryHubsUnauthorized withErrors(Optional<? extends List<GetLibraryHubsHubsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryHubsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryHubsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryHubsUnauthorized other = (GetLibraryHubsUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetLibraryHubsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetLibraryHubsHubsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetLibraryHubsHubsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetLibraryHubsHubsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetLibraryHubsUnauthorized build() {
return new GetLibraryHubsUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetLibraryItemsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetLibraryItemsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetLibraryItemsResponseBody extends RuntimeException {
public class GetLibraryItemsBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetLibraryItemsResponseBody(
public GetLibraryItemsBadRequest(
@JsonProperty("errors") Optional<? extends List<GetLibraryItemsErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetLibraryItemsResponseBody() {
public GetLibraryItemsBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetLibraryItemsResponseBody extends RuntimeException {
return new Builder();
}
public GetLibraryItemsResponseBody withErrors(List<GetLibraryItemsErrors> errors) {
public GetLibraryItemsBadRequest withErrors(List<GetLibraryItemsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetLibraryItemsResponseBody withErrors(Optional<? extends List<GetLibraryItemsErrors>> errors) {
public GetLibraryItemsBadRequest withErrors(Optional<? extends List<GetLibraryItemsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryItemsResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetLibraryItemsBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryItemsResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetLibraryItemsBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryItemsResponseBody other = (GetLibraryItemsResponseBody) o;
GetLibraryItemsBadRequest other = (GetLibraryItemsBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetLibraryItemsResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetLibraryItemsResponseBody.class,
return Utils.toString(GetLibraryItemsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetLibraryItemsResponseBody extends RuntimeException {
return this;
}
public GetLibraryItemsResponseBody build() {
return new GetLibraryItemsResponseBody(
public GetLibraryItemsBadRequest build() {
return new GetLibraryItemsBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetLibraryItemsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetLibraryItemsErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetLibraryItemsErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetLibraryItemsErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetLibraryItemsErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetLibraryItemsErrors {
return new Builder();
}
public GetLibraryItemsErrors withCode(double code) {
public GetLibraryItemsErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetLibraryItemsErrors withCode(Optional<Double> code) {
public GetLibraryItemsErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetLibraryItemsErrors {
return this;
}
public GetLibraryItemsErrors withStatus(double status) {
public GetLibraryItemsErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetLibraryItemsErrors withStatus(Optional<Double> status) {
public GetLibraryItemsErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetLibraryItemsErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetLibraryItemsErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetLibraryItemsLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetLibraryItemsLibraryErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetLibraryItemsLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetLibraryItemsLibraryErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetLibraryItemsLibraryErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetLibraryItemsLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetLibraryItemsLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetLibraryItemsLibraryErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetLibraryItemsLibraryErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryItemsLibraryErrors other = (GetLibraryItemsLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetLibraryItemsLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetLibraryItemsLibraryErrors build() {
return new GetLibraryItemsLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetLibraryItemsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetLibraryItemsUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetLibraryItemsLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetLibraryItemsUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetLibraryItemsLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetLibraryItemsUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetLibraryItemsLibraryErrors>> errors(){
return (Optional<List<GetLibraryItemsLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetLibraryItemsUnauthorized withErrors(List<GetLibraryItemsLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetLibraryItemsUnauthorized withErrors(Optional<? extends List<GetLibraryItemsLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryItemsUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetLibraryItemsUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLibraryItemsUnauthorized other = (GetLibraryItemsUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetLibraryItemsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetLibraryItemsLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetLibraryItemsLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetLibraryItemsLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetLibraryItemsUnauthorized build() {
return new GetLibraryItemsUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetMediaProvidersResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetMediaProvidersBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetMediaProvidersResponseBody extends RuntimeException {
public class GetMediaProvidersBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetMediaProvidersResponseBody(
public GetMediaProvidersBadRequest(
@JsonProperty("errors") Optional<? extends List<GetMediaProvidersErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetMediaProvidersResponseBody() {
public GetMediaProvidersBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetMediaProvidersResponseBody extends RuntimeException {
return new Builder();
}
public GetMediaProvidersResponseBody withErrors(List<GetMediaProvidersErrors> errors) {
public GetMediaProvidersBadRequest withErrors(List<GetMediaProvidersErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetMediaProvidersResponseBody withErrors(Optional<? extends List<GetMediaProvidersErrors>> errors) {
public GetMediaProvidersBadRequest withErrors(Optional<? extends List<GetMediaProvidersErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetMediaProvidersResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetMediaProvidersBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetMediaProvidersResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetMediaProvidersBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMediaProvidersResponseBody other = (GetMediaProvidersResponseBody) o;
GetMediaProvidersBadRequest other = (GetMediaProvidersBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetMediaProvidersResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetMediaProvidersResponseBody.class,
return Utils.toString(GetMediaProvidersBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetMediaProvidersResponseBody extends RuntimeException {
return this;
}
public GetMediaProvidersResponseBody build() {
return new GetMediaProvidersResponseBody(
public GetMediaProvidersBadRequest build() {
return new GetMediaProvidersBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetMediaProvidersErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetMediaProvidersErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetMediaProvidersErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetMediaProvidersErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetMediaProvidersErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetMediaProvidersErrors {
return new Builder();
}
public GetMediaProvidersErrors withCode(double code) {
public GetMediaProvidersErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetMediaProvidersErrors withCode(Optional<Double> code) {
public GetMediaProvidersErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetMediaProvidersErrors {
return this;
}
public GetMediaProvidersErrors withStatus(double status) {
public GetMediaProvidersErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetMediaProvidersErrors withStatus(Optional<Double> status) {
public GetMediaProvidersErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetMediaProvidersErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetMediaProvidersErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetMediaProvidersServerErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetMediaProvidersServerErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetMediaProvidersServerErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetMediaProvidersServerErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetMediaProvidersServerErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetMediaProvidersServerErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetMediaProvidersServerErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetMediaProvidersServerErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetMediaProvidersServerErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMediaProvidersServerErrors other = (GetMediaProvidersServerErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetMediaProvidersServerErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetMediaProvidersServerErrors build() {
return new GetMediaProvidersServerErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,172 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
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.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetMediaProvidersUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
public class GetMediaProvidersUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetMediaProvidersServerErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetMediaProvidersUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetMediaProvidersServerErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetMediaProvidersUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetMediaProvidersServerErrors>> errors(){
return (Optional<List<GetMediaProvidersServerErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetMediaProvidersUnauthorized withErrors(List<GetMediaProvidersServerErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetMediaProvidersUnauthorized withErrors(Optional<? extends List<GetMediaProvidersServerErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetMediaProvidersUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetMediaProvidersUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMediaProvidersUnauthorized other = (GetMediaProvidersUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetMediaProvidersUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetMediaProvidersServerErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetMediaProvidersServerErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetMediaProvidersServerErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetMediaProvidersUnauthorized build() {
return new GetMediaProvidersUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -19,9 +19,9 @@ import java.util.Objects;
import java.util.Optional;
/**
* GetMetaDataByRatingKeyResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* GetMetaDataByRatingKeyBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
public class GetMetaDataByRatingKeyBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
@@ -35,7 +35,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetMetaDataByRatingKeyResponseBody(
public GetMetaDataByRatingKeyBadRequest(
@JsonProperty("errors") Optional<? extends List<GetMetaDataByRatingKeyErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
@@ -44,7 +44,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
this.rawResponse = rawResponse;
}
public GetMetaDataByRatingKeyResponseBody() {
public GetMetaDataByRatingKeyBadRequest() {
this(Optional.empty(), Optional.empty());
}
@@ -65,13 +65,13 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
return new Builder();
}
public GetMetaDataByRatingKeyResponseBody withErrors(List<GetMetaDataByRatingKeyErrors> errors) {
public GetMetaDataByRatingKeyBadRequest withErrors(List<GetMetaDataByRatingKeyErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetMetaDataByRatingKeyResponseBody withErrors(Optional<? extends List<GetMetaDataByRatingKeyErrors>> errors) {
public GetMetaDataByRatingKeyBadRequest withErrors(Optional<? extends List<GetMetaDataByRatingKeyErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
@@ -80,7 +80,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetMetaDataByRatingKeyResponseBody withRawResponse(HttpResponse<InputStream> rawResponse) {
public GetMetaDataByRatingKeyBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
@@ -89,7 +89,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetMetaDataByRatingKeyResponseBody withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
public GetMetaDataByRatingKeyBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
@@ -103,7 +103,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMetaDataByRatingKeyResponseBody other = (GetMetaDataByRatingKeyResponseBody) o;
GetMetaDataByRatingKeyBadRequest other = (GetMetaDataByRatingKeyBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
@@ -118,7 +118,7 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
@Override
public String toString() {
return Utils.toString(GetMetaDataByRatingKeyResponseBody.class,
return Utils.toString(GetMetaDataByRatingKeyBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
@@ -163,8 +163,8 @@ public class GetMetaDataByRatingKeyResponseBody extends RuntimeException {
return this;
}
public GetMetaDataByRatingKeyResponseBody build() {
return new GetMetaDataByRatingKeyResponseBody(
public GetMetaDataByRatingKeyBadRequest build() {
return new GetMetaDataByRatingKeyBadRequest(
errors,
rawResponse);
}

View File

@@ -11,7 +11,7 @@ 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.Double;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
@@ -22,7 +22,7 @@ public class GetMetaDataByRatingKeyErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Double> code;
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
@@ -30,13 +30,13 @@ public class GetMetaDataByRatingKeyErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Double> status;
private Optional<Long> status;
@JsonCreator
public GetMetaDataByRatingKeyErrors(
@JsonProperty("code") Optional<Double> code,
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Double> status) {
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
@@ -50,7 +50,7 @@ public class GetMetaDataByRatingKeyErrors {
}
@JsonIgnore
public Optional<Double> code() {
public Optional<Long> code() {
return code;
}
@@ -60,7 +60,7 @@ public class GetMetaDataByRatingKeyErrors {
}
@JsonIgnore
public Optional<Double> status() {
public Optional<Long> status() {
return status;
}
@@ -68,13 +68,13 @@ public class GetMetaDataByRatingKeyErrors {
return new Builder();
}
public GetMetaDataByRatingKeyErrors withCode(double code) {
public GetMetaDataByRatingKeyErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetMetaDataByRatingKeyErrors withCode(Optional<Double> code) {
public GetMetaDataByRatingKeyErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -92,13 +92,13 @@ public class GetMetaDataByRatingKeyErrors {
return this;
}
public GetMetaDataByRatingKeyErrors withStatus(double status) {
public GetMetaDataByRatingKeyErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetMetaDataByRatingKeyErrors withStatus(Optional<Double> status) {
public GetMetaDataByRatingKeyErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
@@ -137,23 +137,23 @@ public class GetMetaDataByRatingKeyErrors {
public final static class Builder {
private Optional<Double> code = Optional.empty();
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Double> status = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(double code) {
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Double> code) {
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
@@ -171,13 +171,13 @@ public class GetMetaDataByRatingKeyErrors {
return this;
}
public Builder status(double status) {
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Double> status) {
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
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.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetMetaDataByRatingKeyLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Long> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Long> status;
@JsonCreator
public GetMetaDataByRatingKeyLibraryErrors(
@JsonProperty("code") Optional<Long> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Long> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetMetaDataByRatingKeyLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Long> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Long> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetMetaDataByRatingKeyLibraryErrors withCode(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetMetaDataByRatingKeyLibraryErrors withCode(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetMetaDataByRatingKeyLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetMetaDataByRatingKeyLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetMetaDataByRatingKeyLibraryErrors withStatus(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetMetaDataByRatingKeyLibraryErrors withStatus(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMetaDataByRatingKeyLibraryErrors other = (GetMetaDataByRatingKeyLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetMetaDataByRatingKeyLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Long> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Long> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(long code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Long> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(long status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Long> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetMetaDataByRatingKeyLibraryErrors build() {
return new GetMetaDataByRatingKeyLibraryErrors(
code,
message,
status);
}
}
}

Some files were not shown because too many files have changed in this diff Show More