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

package com.azure.resourcemanager.hdinsight.containers.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesAksClusterProfile;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile;
import com.azure.resourcemanager.hdinsight.containers.models.ProvisioningStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Cluster pool. */
@Fluent
public final class ClusterPoolInner extends Resource {
    /*
     * Gets or sets the properties. Define cluster pool specific properties.
     */
    @JsonProperty(value = "properties")
    private ClusterPoolResourceProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: Gets or sets the properties. Define cluster pool specific properties.
     *
     * @return the innerProperties value.
     */
    private ClusterPoolResourceProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /** {@inheritDoc} */
    @Override
    public ClusterPoolInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ClusterPoolInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning state of the resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningStatus provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the deploymentId property: A unique id generated by the RP to identify the resource.
     *
     * @return the deploymentId value.
     */
    public String deploymentId() {
        return this.innerProperties() == null ? null : this.innerProperties().deploymentId();
    }

    /**
     * Get the managedResourceGroupName property: A resource group created by RP, to hold the resources created by RP
     * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern:
     * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name
     * restriction.
     *
     * @return the managedResourceGroupName value.
     */
    public String managedResourceGroupName() {
        return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupName();
    }

    /**
     * Set the managedResourceGroupName property: A resource group created by RP, to hold the resources created by RP
     * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern:
     * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name
     * restriction.
     *
     * @param managedResourceGroupName the managedResourceGroupName value to set.
     * @return the ClusterPoolInner object itself.
     */
    public ClusterPoolInner withManagedResourceGroupName(String managedResourceGroupName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterPoolResourceProperties();
        }
        this.innerProperties().withManagedResourceGroupName(managedResourceGroupName);
        return this;
    }

    /**
     * Get the aksManagedResourceGroupName property: A resource group created by AKS, to hold the infrastructure
     * resources created by AKS on-behalf of customers. It is generated by cluster pool name and managed resource group
     * name by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}.
     *
     * @return the aksManagedResourceGroupName value.
     */
    public String aksManagedResourceGroupName() {
        return this.innerProperties() == null ? null : this.innerProperties().aksManagedResourceGroupName();
    }

    /**
     * Get the clusterPoolProfile property: CLuster pool profile.
     *
     * @return the clusterPoolProfile value.
     */
    public ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().clusterPoolProfile();
    }

    /**
     * Set the clusterPoolProfile property: CLuster pool profile.
     *
     * @param clusterPoolProfile the clusterPoolProfile value to set.
     * @return the ClusterPoolInner object itself.
     */
    public ClusterPoolInner withClusterPoolProfile(ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterPoolResourceProperties();
        }
        this.innerProperties().withClusterPoolProfile(clusterPoolProfile);
        return this;
    }

    /**
     * Get the computeProfile property: CLuster pool compute profile.
     *
     * @return the computeProfile value.
     */
    public ClusterPoolResourcePropertiesComputeProfile computeProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().computeProfile();
    }

    /**
     * Set the computeProfile property: CLuster pool compute profile.
     *
     * @param computeProfile the computeProfile value to set.
     * @return the ClusterPoolInner object itself.
     */
    public ClusterPoolInner withComputeProfile(ClusterPoolResourcePropertiesComputeProfile computeProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterPoolResourceProperties();
        }
        this.innerProperties().withComputeProfile(computeProfile);
        return this;
    }

    /**
     * Get the aksClusterProfile property: Properties of underlying AKS cluster.
     *
     * @return the aksClusterProfile value.
     */
    public ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().aksClusterProfile();
    }

    /**
     * Get the networkProfile property: Cluster pool network profile.
     *
     * @return the networkProfile value.
     */
    public ClusterPoolResourcePropertiesNetworkProfile networkProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().networkProfile();
    }

    /**
     * Set the networkProfile property: Cluster pool network profile.
     *
     * @param networkProfile the networkProfile value to set.
     * @return the ClusterPoolInner object itself.
     */
    public ClusterPoolInner withNetworkProfile(ClusterPoolResourcePropertiesNetworkProfile networkProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterPoolResourceProperties();
        }
        this.innerProperties().withNetworkProfile(networkProfile);
        return this;
    }

    /**
     * Get the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster.
     *
     * @return the logAnalyticsProfile value.
     */
    public ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().logAnalyticsProfile();
    }

    /**
     * Set the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster.
     *
     * @param logAnalyticsProfile the logAnalyticsProfile value to set.
     * @return the ClusterPoolInner object itself.
     */
    public ClusterPoolInner withLogAnalyticsProfile(
        ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ClusterPoolResourceProperties();
        }
        this.innerProperties().withLogAnalyticsProfile(logAnalyticsProfile);
        return this;
    }

    /**
     * Get the status property: Business status of the resource.
     *
     * @return the status value.
     */
    public String status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

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