/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ package dev.plexapi.sdk.models.operations; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import dev.plexapi.sdk.utils.Utils; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.Objects; import java.util.Optional; /** * GetMyPlexAccountResponseBody - MyPlex Account */ public class GetMyPlexAccountResponseBody { @JsonInclude(Include.NON_ABSENT) @JsonProperty("MyPlex") private Optional myPlex; @JsonCreator public GetMyPlexAccountResponseBody( @JsonProperty("MyPlex") Optional myPlex) { Utils.checkNotNull(myPlex, "myPlex"); this.myPlex = myPlex; } public GetMyPlexAccountResponseBody() { this(Optional.empty()); } @SuppressWarnings("unchecked") @JsonIgnore public Optional myPlex() { return (Optional) myPlex; } public final static Builder builder() { return new Builder(); } public GetMyPlexAccountResponseBody withMyPlex(MyPlex myPlex) { Utils.checkNotNull(myPlex, "myPlex"); this.myPlex = Optional.ofNullable(myPlex); return this; } public GetMyPlexAccountResponseBody withMyPlex(Optional myPlex) { Utils.checkNotNull(myPlex, "myPlex"); this.myPlex = myPlex; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetMyPlexAccountResponseBody other = (GetMyPlexAccountResponseBody) o; return Objects.deepEquals(this.myPlex, other.myPlex); } @Override public int hashCode() { return Objects.hash( myPlex); } @Override public String toString() { return Utils.toString(GetMyPlexAccountResponseBody.class, "myPlex", myPlex); } public final static class Builder { private Optional myPlex = Optional.empty(); private Builder() { // force use of static builder() method } public Builder myPlex(MyPlex myPlex) { Utils.checkNotNull(myPlex, "myPlex"); this.myPlex = Optional.ofNullable(myPlex); return this; } public Builder myPlex(Optional myPlex) { Utils.checkNotNull(myPlex, "myPlex"); this.myPlex = myPlex; return this; } public GetMyPlexAccountResponseBody build() { return new GetMyPlexAccountResponseBody( myPlex); } } }