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