mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 12:37:45 +00:00
274 lines
7.0 KiB
Java
274 lines
7.0 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.JsonInclude.Include;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import dev.plexapi.sdk.utils.Utils;
|
|
import java.lang.Integer;
|
|
import java.lang.Override;
|
|
import java.lang.String;
|
|
import java.util.Objects;
|
|
import java.util.Optional;
|
|
|
|
public class GetLibraryItemsRole {
|
|
|
|
/**
|
|
* The unique identifier for the role.
|
|
* NOTE: This is different for each Plex server and is not globally unique.
|
|
*/
|
|
@JsonProperty("id")
|
|
private int id;
|
|
|
|
/**
|
|
* The display tag for the actor (typically the actor's name).
|
|
*/
|
|
@JsonProperty("tag")
|
|
private String tag;
|
|
|
|
/**
|
|
* The role played by the actor in the media item.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("role")
|
|
private Optional<String> role;
|
|
|
|
/**
|
|
* The absolute URL of the thumbnail image for the actor.
|
|
*/
|
|
@JsonInclude(Include.NON_ABSENT)
|
|
@JsonProperty("thumb")
|
|
private Optional<String> thumb;
|
|
|
|
@JsonCreator
|
|
public GetLibraryItemsRole(
|
|
@JsonProperty("id") int id,
|
|
@JsonProperty("tag") String tag,
|
|
@JsonProperty("role") Optional<String> role,
|
|
@JsonProperty("thumb") Optional<String> thumb) {
|
|
Utils.checkNotNull(id, "id");
|
|
Utils.checkNotNull(tag, "tag");
|
|
Utils.checkNotNull(role, "role");
|
|
Utils.checkNotNull(thumb, "thumb");
|
|
this.id = id;
|
|
this.tag = tag;
|
|
this.role = role;
|
|
this.thumb = thumb;
|
|
}
|
|
|
|
public GetLibraryItemsRole(
|
|
int id,
|
|
String tag) {
|
|
this(id, tag, Optional.empty(), Optional.empty());
|
|
}
|
|
|
|
/**
|
|
* The unique identifier for the role.
|
|
* NOTE: This is different for each Plex server and is not globally unique.
|
|
*/
|
|
@JsonIgnore
|
|
public int id() {
|
|
return id;
|
|
}
|
|
|
|
/**
|
|
* The display tag for the actor (typically the actor's name).
|
|
*/
|
|
@JsonIgnore
|
|
public String tag() {
|
|
return tag;
|
|
}
|
|
|
|
/**
|
|
* The role played by the actor in the media item.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> role() {
|
|
return role;
|
|
}
|
|
|
|
/**
|
|
* The absolute URL of the thumbnail image for the actor.
|
|
*/
|
|
@JsonIgnore
|
|
public Optional<String> thumb() {
|
|
return thumb;
|
|
}
|
|
|
|
public final static Builder builder() {
|
|
return new Builder();
|
|
}
|
|
|
|
/**
|
|
* The unique identifier for the role.
|
|
* NOTE: This is different for each Plex server and is not globally unique.
|
|
*/
|
|
public GetLibraryItemsRole withId(int id) {
|
|
Utils.checkNotNull(id, "id");
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The display tag for the actor (typically the actor's name).
|
|
*/
|
|
public GetLibraryItemsRole withTag(String tag) {
|
|
Utils.checkNotNull(tag, "tag");
|
|
this.tag = tag;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The role played by the actor in the media item.
|
|
*/
|
|
public GetLibraryItemsRole withRole(String role) {
|
|
Utils.checkNotNull(role, "role");
|
|
this.role = Optional.ofNullable(role);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The role played by the actor in the media item.
|
|
*/
|
|
public GetLibraryItemsRole withRole(Optional<String> role) {
|
|
Utils.checkNotNull(role, "role");
|
|
this.role = role;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The absolute URL of the thumbnail image for the actor.
|
|
*/
|
|
public GetLibraryItemsRole withThumb(String thumb) {
|
|
Utils.checkNotNull(thumb, "thumb");
|
|
this.thumb = Optional.ofNullable(thumb);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The absolute URL of the thumbnail image for the actor.
|
|
*/
|
|
public GetLibraryItemsRole withThumb(Optional<String> 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;
|
|
}
|
|
GetLibraryItemsRole other = (GetLibraryItemsRole) o;
|
|
return
|
|
Objects.deepEquals(this.id, other.id) &&
|
|
Objects.deepEquals(this.tag, other.tag) &&
|
|
Objects.deepEquals(this.role, other.role) &&
|
|
Objects.deepEquals(this.thumb, other.thumb);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(
|
|
id,
|
|
tag,
|
|
role,
|
|
thumb);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return Utils.toString(GetLibraryItemsRole.class,
|
|
"id", id,
|
|
"tag", tag,
|
|
"role", role,
|
|
"thumb", thumb);
|
|
}
|
|
|
|
public final static class Builder {
|
|
|
|
private Integer id;
|
|
|
|
private String tag;
|
|
|
|
private Optional<String> role = Optional.empty();
|
|
|
|
private Optional<String> thumb = Optional.empty();
|
|
|
|
private Builder() {
|
|
// force use of static builder() method
|
|
}
|
|
|
|
/**
|
|
* The unique identifier for the role.
|
|
* NOTE: This is different for each Plex server and is not globally unique.
|
|
*/
|
|
public Builder id(int id) {
|
|
Utils.checkNotNull(id, "id");
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The display tag for the actor (typically the actor's name).
|
|
*/
|
|
public Builder tag(String tag) {
|
|
Utils.checkNotNull(tag, "tag");
|
|
this.tag = tag;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The role played by the actor in the media item.
|
|
*/
|
|
public Builder role(String role) {
|
|
Utils.checkNotNull(role, "role");
|
|
this.role = Optional.ofNullable(role);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The role played by the actor in the media item.
|
|
*/
|
|
public Builder role(Optional<String> role) {
|
|
Utils.checkNotNull(role, "role");
|
|
this.role = role;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The absolute URL of the thumbnail image for the actor.
|
|
*/
|
|
public Builder thumb(String thumb) {
|
|
Utils.checkNotNull(thumb, "thumb");
|
|
this.thumb = Optional.ofNullable(thumb);
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* The absolute URL of the thumbnail image for the actor.
|
|
*/
|
|
public Builder thumb(Optional<String> thumb) {
|
|
Utils.checkNotNull(thumb, "thumb");
|
|
this.thumb = thumb;
|
|
return this;
|
|
}
|
|
|
|
public GetLibraryItemsRole build() {
|
|
return new GetLibraryItemsRole(
|
|
id,
|
|
tag,
|
|
role,
|
|
thumb);
|
|
}
|
|
}
|
|
}
|