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

/** Properties of Cognitive Services account deployment model. */
@Fluent
public class DeploymentModel {
    /*
     * Deployment model format.
     */
    @JsonProperty(value = "format")
    private String format;

    /*
     * Deployment model name.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Deployment model version.
     */
    @JsonProperty(value = "version")
    private String version;

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

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

    /**
     * Get the format property: Deployment model format.
     *
     * @return the format value.
     */
    public String format() {
        return this.format;
    }

    /**
     * Set the format property: Deployment model format.
     *
     * @param format the format value to set.
     * @return the DeploymentModel object itself.
     */
    public DeploymentModel withFormat(String format) {
        this.format = format;
        return this;
    }

    /**
     * Get the name property: Deployment model name.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Deployment model name.
     *
     * @param name the name value to set.
     * @return the DeploymentModel object itself.
     */
    public DeploymentModel withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the version property: Deployment model version.
     *
     * @return the version value.
     */
    public String version() {
        return this.version;
    }

    /**
     * Set the version property: Deployment model version.
     *
     * @param version the version value to set.
     * @return the DeploymentModel object itself.
     */
    public DeploymentModel withVersion(String version) {
        this.version = version;
        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 (callRateLimit() != null) {
            callRateLimit().validate();
        }
    }
}
