// 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;

/** The assignment for a worker to a job. */
@Fluent
public final class RouterWorkerAssignmentInternal {
    /*
     * The Id of the assignment.
     */
    @JsonProperty(value = "assignmentId", required = true)
    private String assignmentId;

    /*
     * The Id of the Job assigned.
     */
    @JsonProperty(value = "jobId", required = true)
    private String jobId;

    /*
     * The amount of capacity this assignment has consumed on the worker.
     */
    @JsonProperty(value = "capacityCost", required = true)
    private int capacityCost;

    /*
     * The assignment time of the job in UTC.
     */
    @JsonProperty(value = "assignedAt", required = true)
    private OffsetDateTime assignedAt;

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

    /**
     * Get the assignmentId property: The Id of the assignment.
     *
     * @return the assignmentId value.
     */
    public String getAssignmentId() {
        return this.assignmentId;
    }

    /**
     * Set the assignmentId property: The Id of the assignment.
     *
     * @param assignmentId the assignmentId value to set.
     * @return the RouterWorkerAssignmentInternal object itself.
     */
    public RouterWorkerAssignmentInternal setAssignmentId(String assignmentId) {
        this.assignmentId = assignmentId;
        return this;
    }

    /**
     * Get the jobId property: The Id of the Job assigned.
     *
     * @return the jobId value.
     */
    public String getJobId() {
        return this.jobId;
    }

    /**
     * Set the jobId property: The Id of the Job assigned.
     *
     * @param jobId the jobId value to set.
     * @return the RouterWorkerAssignmentInternal object itself.
     */
    public RouterWorkerAssignmentInternal setJobId(String jobId) {
        this.jobId = jobId;
        return this;
    }

    /**
     * Get the capacityCost property: The amount of capacity this assignment has consumed on the worker.
     *
     * @return the capacityCost value.
     */
    public int getCapacityCost() {
        return this.capacityCost;
    }

    /**
     * Set the capacityCost property: The amount of capacity this assignment has consumed on the worker.
     *
     * @param capacityCost the capacityCost value to set.
     * @return the RouterWorkerAssignmentInternal object itself.
     */
    public RouterWorkerAssignmentInternal setCapacityCost(int capacityCost) {
        this.capacityCost = capacityCost;
        return this;
    }

    /**
     * Get the assignedAt property: The assignment time of the job in UTC.
     *
     * @return the assignedAt value.
     */
    public OffsetDateTime getAssignedAt() {
        return this.assignedAt;
    }

    /**
     * Set the assignedAt property: The assignment time of the job in UTC.
     *
     * @param assignedAt the assignedAt value to set.
     * @return the RouterWorkerAssignmentInternal object itself.
     */
    public RouterWorkerAssignmentInternal setAssignedAt(OffsetDateTime assignedAt) {
        this.assignedAt = assignedAt;
        return this;
    }
}
