// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.communication.jobrouter.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Request payload for closing jobs. */
@Fluent
public final class CloseJobRequest {
    /*
     * The assignment within which the job is to be closed.
     */
    @JsonProperty(value = "assignmentId", required = true)
    private String assignmentId;

    /*
     * Indicates the outcome of the job, populate this field with your own custom values.
     */
    @JsonProperty(value = "dispositionCode")
    private String dispositionCode;

    /*
     * If not provided, worker capacity is released immediately along with a JobClosedEvent notification.
     * If provided, worker capacity is released along with a JobClosedEvent notification at a future time in UTC.
     */
    @JsonProperty(value = "closeAt")
    private OffsetDateTime closeAt;

    /*
     * (Optional) A note that will be appended to the jobs' Notes collection with the current timestamp.
     */
    @JsonProperty(value = "note")
    private String note;

    /** Creates an instance of CloseJobRequest class. */
    public CloseJobRequest() {}

    /**
     * Get the assignmentId property: The assignment within which the job is to be closed.
     *
     * @return the assignmentId value.
     */
    public String getAssignmentId() {
        return this.assignmentId;
    }

    /**
     * Set the assignmentId property: The assignment within which the job is to be closed.
     *
     * @param assignmentId the assignmentId value to set.
     * @return the CloseJobRequest object itself.
     */
    public CloseJobRequest setAssignmentId(String assignmentId) {
        this.assignmentId = assignmentId;
        return this;
    }

    /**
     * Get the dispositionCode property: Indicates the outcome of the job, populate this field with your own custom
     * values.
     *
     * @return the dispositionCode value.
     */
    public String getDispositionCode() {
        return this.dispositionCode;
    }

    /**
     * Set the dispositionCode property: Indicates the outcome of the job, populate this field with your own custom
     * values.
     *
     * @param dispositionCode the dispositionCode value to set.
     * @return the CloseJobRequest object itself.
     */
    public CloseJobRequest setDispositionCode(String dispositionCode) {
        this.dispositionCode = dispositionCode;
        return this;
    }

    /**
     * Get the closeAt property: If not provided, worker capacity is released immediately along with a JobClosedEvent
     * notification. If provided, worker capacity is released along with a JobClosedEvent notification at a future time
     * in UTC.
     *
     * @return the closeAt value.
     */
    public OffsetDateTime getCloseAt() {
        return this.closeAt;
    }

    /**
     * Set the closeAt property: If not provided, worker capacity is released immediately along with a JobClosedEvent
     * notification. If provided, worker capacity is released along with a JobClosedEvent notification at a future time
     * in UTC.
     *
     * @param closeAt the closeAt value to set.
     * @return the CloseJobRequest object itself.
     */
    public CloseJobRequest setCloseAt(OffsetDateTime closeAt) {
        this.closeAt = closeAt;
        return this;
    }

    /**
     * Get the note property: (Optional) A note that will be appended to the jobs' Notes collection with the current
     * timestamp.
     *
     * @return the note value.
     */
    public String getNote() {
        return this.note;
    }

    /**
     * Set the note property: (Optional) A note that will be appended to the jobs' Notes collection with the current
     * timestamp.
     *
     * @param note the note value to set.
     * @return the CloseJobRequest object itself.
     */
    public CloseJobRequest setNote(String note) {
        this.note = note;
        return this;
    }
}
