/* 
 * 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 GetBannerImageRequest {

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

    @SpeakeasyMetadata("queryParam:style=form,explode=true,name=width")
    private long width;

    @SpeakeasyMetadata("queryParam:style=form,explode=true,name=height")
    private long height;

    @SpeakeasyMetadata("queryParam:style=form,explode=true,name=minSize")
    private long minSize;

    @SpeakeasyMetadata("queryParam:style=form,explode=true,name=upscale")
    private long upscale;

    /**
     * An authentication token, obtained from plex.tv
     */
    @SpeakeasyMetadata("header:style=simple,explode=false,name=X-Plex-Token")
    private String xPlexToken;

    @JsonCreator
    public GetBannerImageRequest(
            long ratingKey,
            long width,
            long height,
            long minSize,
            long upscale,
            String xPlexToken) {
        Utils.checkNotNull(ratingKey, "ratingKey");
        Utils.checkNotNull(width, "width");
        Utils.checkNotNull(height, "height");
        Utils.checkNotNull(minSize, "minSize");
        Utils.checkNotNull(upscale, "upscale");
        Utils.checkNotNull(xPlexToken, "xPlexToken");
        this.ratingKey = ratingKey;
        this.width = width;
        this.height = height;
        this.minSize = minSize;
        this.upscale = upscale;
        this.xPlexToken = xPlexToken;
    }

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

    @JsonIgnore
    public long width() {
        return width;
    }

    @JsonIgnore
    public long height() {
        return height;
    }

    @JsonIgnore
    public long minSize() {
        return minSize;
    }

    @JsonIgnore
    public long upscale() {
        return upscale;
    }

    /**
     * An authentication token, obtained from plex.tv
     */
    @JsonIgnore
    public String xPlexToken() {
        return xPlexToken;
    }

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

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

    public GetBannerImageRequest withWidth(long width) {
        Utils.checkNotNull(width, "width");
        this.width = width;
        return this;
    }

    public GetBannerImageRequest withHeight(long height) {
        Utils.checkNotNull(height, "height");
        this.height = height;
        return this;
    }

    public GetBannerImageRequest withMinSize(long minSize) {
        Utils.checkNotNull(minSize, "minSize");
        this.minSize = minSize;
        return this;
    }

    public GetBannerImageRequest withUpscale(long upscale) {
        Utils.checkNotNull(upscale, "upscale");
        this.upscale = upscale;
        return this;
    }

    /**
     * An authentication token, obtained from plex.tv
     */
    public GetBannerImageRequest withXPlexToken(String xPlexToken) {
        Utils.checkNotNull(xPlexToken, "xPlexToken");
        this.xPlexToken = xPlexToken;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        GetBannerImageRequest other = (GetBannerImageRequest) o;
        return 
            Objects.deepEquals(this.ratingKey, other.ratingKey) &&
            Objects.deepEquals(this.width, other.width) &&
            Objects.deepEquals(this.height, other.height) &&
            Objects.deepEquals(this.minSize, other.minSize) &&
            Objects.deepEquals(this.upscale, other.upscale) &&
            Objects.deepEquals(this.xPlexToken, other.xPlexToken);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            ratingKey,
            width,
            height,
            minSize,
            upscale,
            xPlexToken);
    }
    
    @Override
    public String toString() {
        return Utils.toString(GetBannerImageRequest.class,
                "ratingKey", ratingKey,
                "width", width,
                "height", height,
                "minSize", minSize,
                "upscale", upscale,
                "xPlexToken", xPlexToken);
    }
    
    public final static class Builder {
 
        private Long ratingKey;
 
        private Long width;
 
        private Long height;
 
        private Long minSize;
 
        private Long upscale;
 
        private String xPlexToken;  
        
        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 Builder width(long width) {
            Utils.checkNotNull(width, "width");
            this.width = width;
            return this;
        }

        public Builder height(long height) {
            Utils.checkNotNull(height, "height");
            this.height = height;
            return this;
        }

        public Builder minSize(long minSize) {
            Utils.checkNotNull(minSize, "minSize");
            this.minSize = minSize;
            return this;
        }

        public Builder upscale(long upscale) {
            Utils.checkNotNull(upscale, "upscale");
            this.upscale = upscale;
            return this;
        }

        /**
         * An authentication token, obtained from plex.tv
         */
        public Builder xPlexToken(String xPlexToken) {
            Utils.checkNotNull(xPlexToken, "xPlexToken");
            this.xPlexToken = xPlexToken;
            return this;
        }
        
        public GetBannerImageRequest build() {
            return new GetBannerImageRequest(
                ratingKey,
                width,
                height,
                minSize,
                upscale,
                xPlexToken);
        }
    }
}

