/* 
 * 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.Override;
import java.lang.String;
import java.util.Objects;


public class GetAllMediaLibraryRole {

    /**
     * The name of the actor for this role
     */
    @JsonProperty("tag")
    private String tag;

    @JsonCreator
    public GetAllMediaLibraryRole(
            @JsonProperty("tag") String tag) {
        Utils.checkNotNull(tag, "tag");
        this.tag = tag;
    }

    /**
     * The name of the actor for this role
     */
    @JsonIgnore
    public String tag() {
        return tag;
    }

    public final static Builder builder() {
        return new Builder();
    }

    /**
     * The name of the actor for this role
     */
    public GetAllMediaLibraryRole 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;
        }
        GetAllMediaLibraryRole other = (GetAllMediaLibraryRole) o;
        return 
            Objects.deepEquals(this.tag, other.tag);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            tag);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetAllMediaLibraryRole.class,
                "tag", tag);
    }
    
    public final static class Builder {
 
        private String tag;  
        
        private Builder() {
          // force use of static builder() method
        }

        /**
         * The name of the actor for this role
         */
        public Builder tag(String tag) {
            Utils.checkNotNull(tag, "tag");
            this.tag = tag;
            return this;
        }
        
        public GetAllMediaLibraryRole build() {
            return new GetAllMediaLibraryRole(
                tag);
        }
    }
}

