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

/** Policy governing how jobs are distributed to workers. */
@Fluent
public final class DistributionPolicyInternal {
    /*
     * The unique identifier of the policy.
     */
    @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
    private String id;

    /*
     * The human readable name of the policy.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The number of seconds after which any offers created under this policy will be expired.
     */
    @JsonProperty(value = "offerExpiresAfterSeconds")
    private Double offerExpiresAfterSeconds;

    /*
     * Abstract base class for defining a distribution mode
     */
    @JsonProperty(value = "mode")
    private DistributionModeInternal mode;

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

    /**
     * Get the id property: The unique identifier of the policy.
     *
     * @return the id value.
     */
    public String getId() {
        return this.id;
    }

    /**
     * Get the name property: The human readable name of the policy.
     *
     * @return the name value.
     */
    public String getName() {
        return this.name;
    }

    /**
     * Set the name property: The human readable name of the policy.
     *
     * @param name the name value to set.
     * @return the DistributionPolicyInternal object itself.
     */
    public DistributionPolicyInternal setName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the offerExpiresAfterSeconds property: The number of seconds after which any offers created under this policy
     * will be expired.
     *
     * @return the offerExpiresAfterSeconds value.
     */
    public Double getOfferExpiresAfterSeconds() {
        return this.offerExpiresAfterSeconds;
    }

    /**
     * Set the offerExpiresAfterSeconds property: The number of seconds after which any offers created under this policy
     * will be expired.
     *
     * @param offerExpiresAfterSeconds the offerExpiresAfterSeconds value to set.
     * @return the DistributionPolicyInternal object itself.
     */
    public DistributionPolicyInternal setOfferExpiresAfterSeconds(Double offerExpiresAfterSeconds) {
        this.offerExpiresAfterSeconds = offerExpiresAfterSeconds;
        return this;
    }

    /**
     * Get the mode property: Abstract base class for defining a distribution mode.
     *
     * @return the mode value.
     */
    public DistributionModeInternal getMode() {
        return this.mode;
    }

    /**
     * Set the mode property: Abstract base class for defining a distribution mode.
     *
     * @param mode the mode value to set.
     * @return the DistributionPolicyInternal object itself.
     */
    public DistributionPolicyInternal setMode(DistributionModeInternal mode) {
        this.mode = mode;
        return this;
    }
}
