/* * 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; /** * Meta - The Meta object is only included in the response if the `includeMeta` parameter is set to `1`. * */ public class Meta { @JsonInclude(Include.NON_ABSENT) @JsonProperty("Type") private Optional> type; @JsonInclude(Include.NON_ABSENT) @JsonProperty("FieldType") private Optional> fieldType; @JsonCreator public Meta( @JsonProperty("Type") Optional> type, @JsonProperty("FieldType") Optional> fieldType) { Utils.checkNotNull(type, "type"); Utils.checkNotNull(fieldType, "fieldType"); this.type = type; this.fieldType = fieldType; } public Meta() { this(Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @JsonIgnore public Optional> type() { return (Optional>) type; } @SuppressWarnings("unchecked") @JsonIgnore public Optional> fieldType() { return (Optional>) fieldType; } public final static Builder builder() { return new Builder(); } public Meta withType(List type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); return this; } public Meta withType(Optional> type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } public Meta withFieldType(List fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = Optional.ofNullable(fieldType); return this; } public Meta withFieldType(Optional> fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = fieldType; return this; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Meta other = (Meta) o; return Objects.deepEquals(this.type, other.type) && Objects.deepEquals(this.fieldType, other.fieldType); } @Override public int hashCode() { return Objects.hash( type, fieldType); } @Override public String toString() { return Utils.toString(Meta.class, "type", type, "fieldType", fieldType); } public final static class Builder { private Optional> type = Optional.empty(); private Optional> fieldType = Optional.empty(); private Builder() { // force use of static builder() method } public Builder type(List 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 Builder fieldType(List fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = Optional.ofNullable(fieldType); return this; } public Builder fieldType(Optional> fieldType) { Utils.checkNotNull(fieldType, "fieldType"); this.fieldType = fieldType; return this; } public Meta build() { return new Meta( type, fieldType); } } }