/* 
 * 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 dev.plexapi.sdk.utils.SpeakeasyMetadata;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Long;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;


public class GetMetaDataByRatingKeyRequest {

    /**
     * the id of the library item to return the children of.
     */
    @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=ratingKey")
    private long ratingKey;

    @JsonCreator
    public GetMetaDataByRatingKeyRequest(
            long ratingKey) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        this.ratingKey = ratingKey;
    }

    /**
     * the id of the library item to return the children of.
     */
    @JsonIgnore
    public long ratingKey() {
        return ratingKey;
    }

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

    /**
     * the id of the library item to return the children of.
     */
    public GetMetaDataByRatingKeyRequest withRatingKey(long ratingKey) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        this.ratingKey = ratingKey;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetMetaDataByRatingKeyRequest other = (GetMetaDataByRatingKeyRequest) o;
        return 
            Objects.deepEquals(this.ratingKey, other.ratingKey);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            ratingKey);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetMetaDataByRatingKeyRequest.class,
                "ratingKey", ratingKey);
    }
    
    public final static class Builder {
 
        private Long ratingKey;  
        
        private Builder() {
          // force use of static builder() method
        }

        /**
         * the id of the library item to return the children of.
         */
        public Builder ratingKey(long ratingKey) {
            Utils.checkNotNull(ratingKey, "ratingKey");
            this.ratingKey = ratingKey;
            return this;
        }
        
        public GetMetaDataByRatingKeyRequest build() {
            return new GetMetaDataByRatingKeyRequest(
                ratingKey);
        }
    }
}

