/* * 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.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; import java.util.Optional; public class GetMediaMetaDataProducer { /** * The unique role identifier. */ @JsonProperty("id") private long id; /** * The filter string for the role. */ @JsonProperty("filter") private String filter; /** * The actor's name. */ @JsonProperty("tag") private String tag; /** * A key associated with the actor tag. */ @JsonProperty("tagKey") private String tagKey; /** * The character name or role. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("role") private Optional role; /** * URL for the role thumbnail image. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumb") private Optional thumb; @JsonCreator public GetMediaMetaDataProducer( @JsonProperty("id") long id, @JsonProperty("filter") String filter, @JsonProperty("tag") String tag, @JsonProperty("tagKey") String tagKey, @JsonProperty("role") Optional role, @JsonProperty("thumb") Optional thumb) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(filter, "filter"); Utils.checkNotNull(tag, "tag"); Utils.checkNotNull(tagKey, "tagKey"); Utils.checkNotNull(role, "role"); Utils.checkNotNull(thumb, "thumb"); this.id = id; this.filter = filter; this.tag = tag; this.tagKey = tagKey; this.role = role; this.thumb = thumb; } public GetMediaMetaDataProducer( long id, String filter, String tag, String tagKey) { this(id, filter, tag, tagKey, Optional.empty(), Optional.empty()); } /** * The unique role identifier. */ @JsonIgnore public long id() { return id; } /** * The filter string for the role. */ @JsonIgnore public String filter() { return filter; } /** * The actor's name. */ @JsonIgnore public String tag() { return tag; } /** * A key associated with the actor tag. */ @JsonIgnore public String tagKey() { return tagKey; } /** * The character name or role. */ @JsonIgnore public Optional role() { return role; } /** * URL for the role thumbnail image. */ @JsonIgnore public Optional thumb() { return thumb; } public final static Builder builder() { return new Builder(); } /** * The unique role identifier. */ public GetMediaMetaDataProducer withId(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** * The filter string for the role. */ public GetMediaMetaDataProducer withFilter(String filter) { Utils.checkNotNull(filter, "filter"); this.filter = filter; return this; } /** * The actor's name. */ public GetMediaMetaDataProducer withTag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } /** * A key associated with the actor tag. */ public GetMediaMetaDataProducer withTagKey(String tagKey) { Utils.checkNotNull(tagKey, "tagKey"); this.tagKey = tagKey; return this; } /** * The character name or role. */ public GetMediaMetaDataProducer withRole(String role) { Utils.checkNotNull(role, "role"); this.role = Optional.ofNullable(role); return this; } /** * The character name or role. */ public GetMediaMetaDataProducer withRole(Optional role) { Utils.checkNotNull(role, "role"); this.role = role; return this; } /** * URL for the role thumbnail image. */ public GetMediaMetaDataProducer withThumb(String thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = Optional.ofNullable(thumb); return this; } /** * URL for the role thumbnail image. */ public GetMediaMetaDataProducer withThumb(Optional thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GetMediaMetaDataProducer other = (GetMediaMetaDataProducer) o; return Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.filter, other.filter) && Objects.deepEquals(this.tag, other.tag) && Objects.deepEquals(this.tagKey, other.tagKey) && Objects.deepEquals(this.role, other.role) && Objects.deepEquals(this.thumb, other.thumb); } @Override public int hashCode() { return Objects.hash( id, filter, tag, tagKey, role, thumb); } @Override public String toString() { return Utils.toString(GetMediaMetaDataProducer.class, "id", id, "filter", filter, "tag", tag, "tagKey", tagKey, "role", role, "thumb", thumb); } public final static class Builder { private Long id; private String filter; private String tag; private String tagKey; private Optional role = Optional.empty(); private Optional thumb = Optional.empty(); private Builder() { // force use of static builder() method } /** * The unique role identifier. */ public Builder id(long id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } /** * The filter string for the role. */ public Builder filter(String filter) { Utils.checkNotNull(filter, "filter"); this.filter = filter; return this; } /** * The actor's name. */ public Builder tag(String tag) { Utils.checkNotNull(tag, "tag"); this.tag = tag; return this; } /** * A key associated with the actor tag. */ public Builder tagKey(String tagKey) { Utils.checkNotNull(tagKey, "tagKey"); this.tagKey = tagKey; return this; } /** * The character name or role. */ public Builder role(String role) { Utils.checkNotNull(role, "role"); this.role = Optional.ofNullable(role); return this; } /** * The character name or role. */ public Builder role(Optional role) { Utils.checkNotNull(role, "role"); this.role = role; return this; } /** * URL for the role thumbnail image. */ public Builder thumb(String thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = Optional.ofNullable(thumb); return this; } /** * URL for the role thumbnail image. */ public Builder thumb(Optional thumb) { Utils.checkNotNull(thumb, "thumb"); this.thumb = thumb; return this; } public GetMediaMetaDataProducer build() { return new GetMediaMetaDataProducer( id, filter, tag, tagKey, role, thumb); } } }