Files
plexjava/src/main/java/dev/plexapi/sdk/models/operations/Genre.java

166 lines
3.5 KiB
Java

/*
* 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.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
/**
* Genre - The filter query string for similar items.
*/
public class Genre {
@JsonProperty("id")
private long id;
@JsonProperty("filter")
private String filter;
/**
* The genre name of this media-item
*
*/
@JsonProperty("tag")
private String tag;
@JsonCreator
public Genre(
@JsonProperty("id") long id,
@JsonProperty("filter") String filter,
@JsonProperty("tag") String tag) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(filter, "filter");
Utils.checkNotNull(tag, "tag");
this.id = id;
this.filter = filter;
this.tag = tag;
}
@JsonIgnore
public long id() {
return id;
}
@JsonIgnore
public String filter() {
return filter;
}
/**
* The genre name of this media-item
*
*/
@JsonIgnore
public String tag() {
return tag;
}
public final static Builder builder() {
return new Builder();
}
public Genre withId(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Genre withFilter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The genre name of this media-item
*
*/
public Genre withTag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Genre other = (Genre) o;
return
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.filter, other.filter) &&
Objects.deepEquals(this.tag, other.tag);
}
@Override
public int hashCode() {
return Objects.hash(
id,
filter,
tag);
}
@Override
public String toString() {
return Utils.toString(Genre.class,
"id", id,
"filter", filter,
"tag", tag);
}
public final static class Builder {
private Long id;
private String filter;
private String tag;
private Builder() {
// force use of static builder() method
}
public Builder id(long id) {
Utils.checkNotNull(id, "id");
this.id = id;
return this;
}
public Builder filter(String filter) {
Utils.checkNotNull(filter, "filter");
this.filter = filter;
return this;
}
/**
* The genre name of this media-item
*
*/
public Builder tag(String tag) {
Utils.checkNotNull(tag, "tag");
this.tag = tag;
return this;
}
public Genre build() {
return new Genre(
id,
filter,
tag);
}
}
}