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

package com.azure.resourcemanager.cognitiveservices.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Properties of Cognitive Services account deployment. */
@Fluent
public final class DeploymentProperties {
    /*
     * Gets the status of the resource at the time the operation was called.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private DeploymentProvisioningState provisioningState;

    /*
     * Properties of Cognitive Services account deployment model.
     */
    @JsonProperty(value = "model")
    private DeploymentModel model;

    /*
     * Properties of Cognitive Services account deployment model.
     */
    @JsonProperty(value = "scaleSettings")
    private DeploymentScaleSettings scaleSettings;

    /*
     * The capabilities.
     */
    @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY)
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> capabilities;

    /*
     * The name of RAI policy.
     */
    @JsonProperty(value = "raiPolicyName")
    private String raiPolicyName;

    /*
     * The call rate limit Cognitive Services account.
     */
    @JsonProperty(value = "callRateLimit", access = JsonProperty.Access.WRITE_ONLY)
    private CallRateLimit callRateLimit;

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

    /**
     * Get the provisioningState property: Gets the status of the resource at the time the operation was called.
     *
     * @return the provisioningState value.
     */
    public DeploymentProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the model property: Properties of Cognitive Services account deployment model.
     *
     * @return the model value.
     */
    public DeploymentModel model() {
        return this.model;
    }

    /**
     * Set the model property: Properties of Cognitive Services account deployment model.
     *
     * @param model the model value to set.
     * @return the DeploymentProperties object itself.
     */
    public DeploymentProperties withModel(DeploymentModel model) {
        this.model = model;
        return this;
    }

    /**
     * Get the scaleSettings property: Properties of Cognitive Services account deployment model.
     *
     * @return the scaleSettings value.
     */
    public DeploymentScaleSettings scaleSettings() {
        return this.scaleSettings;
    }

    /**
     * Set the scaleSettings property: Properties of Cognitive Services account deployment model.
     *
     * @param scaleSettings the scaleSettings value to set.
     * @return the DeploymentProperties object itself.
     */
    public DeploymentProperties withScaleSettings(DeploymentScaleSettings scaleSettings) {
        this.scaleSettings = scaleSettings;
        return this;
    }

    /**
     * Get the capabilities property: The capabilities.
     *
     * @return the capabilities value.
     */
    public Map<String, String> capabilities() {
        return this.capabilities;
    }

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

    /**
     * Set the raiPolicyName property: The name of RAI policy.
     *
     * @param raiPolicyName the raiPolicyName value to set.
     * @return the DeploymentProperties object itself.
     */
    public DeploymentProperties withRaiPolicyName(String raiPolicyName) {
        this.raiPolicyName = raiPolicyName;
        return this;
    }

    /**
     * Get the callRateLimit property: The call rate limit Cognitive Services account.
     *
     * @return the callRateLimit value.
     */
    public CallRateLimit callRateLimit() {
        return this.callRateLimit;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (model() != null) {
            model().validate();
        }
        if (scaleSettings() != null) {
            scaleSettings().validate();
        }
        if (callRateLimit() != null) {
            callRateLimit().validate();
        }
    }
}
