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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.powerbidedicated.models.DedicatedCapacityAdministrators;
import com.azure.resourcemanager.powerbidedicated.models.Mode;
import com.fasterxml.jackson.annotation.JsonProperty;

/** An object that represents a set of mutable Dedicated capacity resource properties. */
@Fluent
public class DedicatedCapacityMutableProperties {
    /*
     * A collection of Dedicated capacity administrators
     */
    @JsonProperty(value = "administration")
    private DedicatedCapacityAdministrators administration;

    /*
     * Specifies the generation of the Power BI Embedded capacity. If no value is specified, the default value 'Gen2'
     * is used. [Learn More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2)
     */
    @JsonProperty(value = "mode")
    private Mode mode;

    /*
     * Tenant ID for the capacity. Used for creating Pro Plus capacity.
     */
    @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
    private String tenantId;

    /*
     * Capacity name
     */
    @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY)
    private String friendlyName;

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

    /**
     * Get the administration property: A collection of Dedicated capacity administrators.
     *
     * @return the administration value.
     */
    public DedicatedCapacityAdministrators administration() {
        return this.administration;
    }

    /**
     * Set the administration property: A collection of Dedicated capacity administrators.
     *
     * @param administration the administration value to set.
     * @return the DedicatedCapacityMutableProperties object itself.
     */
    public DedicatedCapacityMutableProperties withAdministration(DedicatedCapacityAdministrators administration) {
        this.administration = administration;
        return this;
    }

    /**
     * Get the mode property: Specifies the generation of the Power BI Embedded capacity. If no value is specified, the
     * default value 'Gen2' is used. [Learn
     * More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
     *
     * @return the mode value.
     */
    public Mode mode() {
        return this.mode;
    }

    /**
     * Set the mode property: Specifies the generation of the Power BI Embedded capacity. If no value is specified, the
     * default value 'Gen2' is used. [Learn
     * More](https://docs.microsoft.com/power-bi/developer/embedded/power-bi-embedded-generation-2).
     *
     * @param mode the mode value to set.
     * @return the DedicatedCapacityMutableProperties object itself.
     */
    public DedicatedCapacityMutableProperties withMode(Mode mode) {
        this.mode = mode;
        return this;
    }

    /**
     * Get the tenantId property: Tenant ID for the capacity. Used for creating Pro Plus capacity.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.tenantId;
    }

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

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