/* * 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.util.Objects; import java.util.Optional; public class Provider { @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") private Optional key; @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") private Optional title; @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") private Optional type; @JsonCreator public Provider( @JsonProperty("key") Optional key, @JsonProperty("title") Optional title, @JsonProperty("type") Optional type) { Utils.checkNotNull(key, "key"); Utils.checkNotNull(title, "title"); Utils.checkNotNull(type, "type"); this.key = key; this.title = title; this.type = type; } public Provider() { this(Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore public Optional key() { return key; } @JsonIgnore public Optional title() { return title; } @JsonIgnore public Optional type() { return type; } public final static Builder builder() { return new Builder(); } public Provider withKey(String key) { Utils.checkNotNull(key, "key"); this.key = Optional.ofNullable(key); return this; } public Provider withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Provider withTitle(String title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); return this; } public Provider withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } public Provider withType(String type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); return this; } public Provider withType(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Provider other = (Provider) o; return Objects.deepEquals(this.key, other.key) && Objects.deepEquals(this.title, other.title) && Objects.deepEquals(this.type, other.type); } @Override public int hashCode() { return Objects.hash( key, title, type); } @Override public String toString() { return Utils.toString(Provider.class, "key", key, "title", title, "type", type); } public final static class Builder { private Optional key = Optional.empty(); private Optional title = Optional.empty(); private Optional type = Optional.empty(); private Builder() { // force use of static builder() method } public Builder key(String key) { Utils.checkNotNull(key, "key"); this.key = Optional.ofNullable(key); return this; } public Builder key(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; return this; } public Builder title(String title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); return this; } public Builder title(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; return this; } public Builder type(String type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); return this; } public Builder type(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } public Provider build() { return new Provider( key, title, type); } } }