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


public class StopTaskRequest {

    /**
     * The name of the task to be started.
     */
    @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=taskName")
    private PathParamTaskName taskName;

    @JsonCreator
    public StopTaskRequest(
            PathParamTaskName taskName) {
        Utils.checkNotNull(taskName, "taskName");
        this.taskName = taskName;
    }

    /**
     * The name of the task to be started.
     */
    @JsonIgnore
    public PathParamTaskName taskName() {
        return taskName;
    }

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

    /**
     * The name of the task to be started.
     */
    public StopTaskRequest withTaskName(PathParamTaskName taskName) {
        Utils.checkNotNull(taskName, "taskName");
        this.taskName = taskName;
        return this;
    }
    
    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        StopTaskRequest other = (StopTaskRequest) o;
        return 
            Objects.deepEquals(this.taskName, other.taskName);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(
            taskName);
    }
    
    @Override
    public String toString() {
        return Utils.toString(StopTaskRequest.class,
                "taskName", taskName);
    }
    
    public final static class Builder {
 
        private PathParamTaskName taskName;  
        
        private Builder() {
          // force use of static builder() method
        }

        /**
         * The name of the task to be started.
         */
        public Builder taskName(PathParamTaskName taskName) {
            Utils.checkNotNull(taskName, "taskName");
            this.taskName = taskName;
            return this;
        }
        
        public StopTaskRequest build() {
            return new StopTaskRequest(
                taskName);
        }
    }
}

