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

package com.azure.resourcemanager.scvmm.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.scvmm.models.CloudCapacity;
import com.azure.resourcemanager.scvmm.models.StorageQoSPolicy;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Defines the resource properties. */
@Fluent
public final class CloudProperties {
    /*
     * Gets or sets the inventory Item ID for the resource.
     */
    @JsonProperty(value = "inventoryItemId")
    private String inventoryItemId;

    /*
     * Unique ID of the cloud.
     */
    @JsonProperty(value = "uuid")
    private String uuid;

    /*
     * ARM Id of the vmmServer resource in which this resource resides.
     */
    @JsonProperty(value = "vmmServerId")
    private String vmmServerId;

    /*
     * Name of the cloud in VMMServer.
     */
    @JsonProperty(value = "cloudName", access = JsonProperty.Access.WRITE_ONLY)
    private String cloudName;

    /*
     * Capacity of the cloud.
     */
    @JsonProperty(value = "cloudCapacity", access = JsonProperty.Access.WRITE_ONLY)
    private CloudCapacity cloudCapacity;

    /*
     * List of QoS policies available for the cloud.
     */
    @JsonProperty(value = "storageQoSPolicies", access = JsonProperty.Access.WRITE_ONLY)
    private List<StorageQoSPolicy> storageQoSPolicies;

    /*
     * Gets or sets the provisioning state.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningState;

    /**
     * Get the inventoryItemId property: Gets or sets the inventory Item ID for the resource.
     *
     * @return the inventoryItemId value.
     */
    public String inventoryItemId() {
        return this.inventoryItemId;
    }

    /**
     * Set the inventoryItemId property: Gets or sets the inventory Item ID for the resource.
     *
     * @param inventoryItemId the inventoryItemId value to set.
     * @return the CloudProperties object itself.
     */
    public CloudProperties withInventoryItemId(String inventoryItemId) {
        this.inventoryItemId = inventoryItemId;
        return this;
    }

    /**
     * Get the uuid property: Unique ID of the cloud.
     *
     * @return the uuid value.
     */
    public String uuid() {
        return this.uuid;
    }

    /**
     * Set the uuid property: Unique ID of the cloud.
     *
     * @param uuid the uuid value to set.
     * @return the CloudProperties object itself.
     */
    public CloudProperties withUuid(String uuid) {
        this.uuid = uuid;
        return this;
    }

    /**
     * Get the vmmServerId property: ARM Id of the vmmServer resource in which this resource resides.
     *
     * @return the vmmServerId value.
     */
    public String vmmServerId() {
        return this.vmmServerId;
    }

    /**
     * Set the vmmServerId property: ARM Id of the vmmServer resource in which this resource resides.
     *
     * @param vmmServerId the vmmServerId value to set.
     * @return the CloudProperties object itself.
     */
    public CloudProperties withVmmServerId(String vmmServerId) {
        this.vmmServerId = vmmServerId;
        return this;
    }

    /**
     * Get the cloudName property: Name of the cloud in VMMServer.
     *
     * @return the cloudName value.
     */
    public String cloudName() {
        return this.cloudName;
    }

    /**
     * Get the cloudCapacity property: Capacity of the cloud.
     *
     * @return the cloudCapacity value.
     */
    public CloudCapacity cloudCapacity() {
        return this.cloudCapacity;
    }

    /**
     * Get the storageQoSPolicies property: List of QoS policies available for the cloud.
     *
     * @return the storageQoSPolicies value.
     */
    public List<StorageQoSPolicy> storageQoSPolicies() {
        return this.storageQoSPolicies;
    }

    /**
     * Get the provisioningState property: Gets or sets the provisioning state.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (cloudCapacity() != null) {
            cloudCapacity().validate();
        }
        if (storageQoSPolicies() != null) {
            storageQoSPolicies().forEach(e -> e.validate());
        }
    }
}
