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

package com.azure.resourcemanager.networkcloud.models;

import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.networkcloud.fluent.models.ClusterInner;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of Cluster. */
public interface Cluster {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the location property: The geo-location where the resource lives.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the tags property: Resource tags.
     *
     * @return the tags value.
     */
    Map<String, String> tags();

    /**
     * Gets the extendedLocation property: ExtendedLocation represents the Azure custom location where the resource will
     * be created.
     *
     * <p>The extended location of the cluster manager associated with the cluster.
     *
     * @return the extendedLocation value.
     */
    ExtendedLocation extendedLocation();

    /**
     * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the aggregatorOrSingleRackDefinition property: RackDefinition represents details regarding the rack.
     *
     * <p>The rack definition that is intended to reflect only a single rack in a single rack cluster, or an aggregator
     * rack in a multi-rack cluster.
     *
     * @return the aggregatorOrSingleRackDefinition value.
     */
    RackDefinition aggregatorOrSingleRackDefinition();

    /**
     * Gets the analyticsWorkspaceId property: The resource ID of the Log Analytics Workspace that will be used for
     * storing relevant logs.
     *
     * @return the analyticsWorkspaceId value.
     */
    String analyticsWorkspaceId();

    /**
     * Gets the availableUpgradeVersions property: The list of cluster runtime version upgrades available for this
     * cluster.
     *
     * @return the availableUpgradeVersions value.
     */
    List<ClusterAvailableUpgradeVersion> availableUpgradeVersions();

    /**
     * Gets the clusterCapacity property: ClusterCapacity represents various details regarding compute capacity.
     *
     * <p>The capacity supported by this cluster.
     *
     * @return the clusterCapacity value.
     */
    ClusterCapacity clusterCapacity();

    /**
     * Gets the clusterConnectionStatus property: The latest heartbeat status between the cluster manager and the
     * cluster.
     *
     * @return the clusterConnectionStatus value.
     */
    ClusterConnectionStatus clusterConnectionStatus();

    /**
     * Gets the clusterExtendedLocation property: ExtendedLocation represents the Azure custom location where the
     * resource will be created.
     *
     * <p>The extended location (custom location) that represents the cluster's control plane location. This extended
     * location is used to route the requests of child objects of the cluster that are handled by the platform operator.
     *
     * @return the clusterExtendedLocation value.
     */
    ExtendedLocation clusterExtendedLocation();

    /**
     * Gets the clusterLocation property: The customer-provided location information to identify where the cluster
     * resides.
     *
     * @return the clusterLocation value.
     */
    String clusterLocation();

    /**
     * Gets the clusterManagerConnectionStatus property: The latest connectivity status between cluster manager and the
     * cluster.
     *
     * @return the clusterManagerConnectionStatus value.
     */
    ClusterManagerConnectionStatus clusterManagerConnectionStatus();

    /**
     * Gets the clusterManagerId property: The resource ID of the cluster manager that manages this cluster. This is set
     * by the Cluster Manager when the cluster is created.
     *
     * @return the clusterManagerId value.
     */
    String clusterManagerId();

    /**
     * Gets the clusterServicePrincipal property: ServicePrincipalInformation represents the details of the service
     * principal to be used by the cluster during Arc Appliance installation.
     *
     * <p>The service principal to be used by the cluster during Arc Appliance installation.
     *
     * @return the clusterServicePrincipal value.
     */
    ServicePrincipalInformation clusterServicePrincipal();

    /**
     * Gets the clusterType property: The type of rack configuration for the cluster.
     *
     * @return the clusterType value.
     */
    ClusterType clusterType();

    /**
     * Gets the clusterVersion property: The current runtime version of the cluster.
     *
     * @return the clusterVersion value.
     */
    String clusterVersion();

    /**
     * Gets the computeDeploymentThreshold property: ValidationThreshold indicates allowed machine and node hardware and
     * deployment failures.
     *
     * <p>The validation threshold indicating the allowable failures of compute machines during environment validation
     * and deployment.
     *
     * @return the computeDeploymentThreshold value.
     */
    ValidationThreshold computeDeploymentThreshold();

    /**
     * Gets the computeRackDefinitions property: The list of rack definitions for the compute racks in a multi-rack
     * cluster, or an empty list in a single-rack cluster.
     *
     * @return the computeRackDefinitions value.
     */
    List<RackDefinition> computeRackDefinitions();

    /**
     * Gets the detailedStatus property: The current detailed status of the cluster.
     *
     * @return the detailedStatus value.
     */
    ClusterDetailedStatus detailedStatus();

    /**
     * Gets the detailedStatusMessage property: The descriptive message about the detailed status.
     *
     * @return the detailedStatusMessage value.
     */
    String detailedStatusMessage();

    /**
     * Gets the hybridAksExtendedLocation property: ExtendedLocation represents the Azure custom location where the
     * resource will be created.
     *
     * <p>Field Deprecated. This field will not be populated in an upcoming version. The extended location (custom
     * location) that represents the Hybrid AKS control plane location. This extended location is used when creating
     * provisioned clusters (Hybrid AKS clusters).
     *
     * @return the hybridAksExtendedLocation value.
     */
    ExtendedLocation hybridAksExtendedLocation();

    /**
     * Gets the managedResourceGroupConfiguration property: ManagedResourceGroupConfiguration represents the
     * configuration of the resource group managed by Azure.
     *
     * <p>The configuration of the managed resource group associated with the resource.
     *
     * @return the managedResourceGroupConfiguration value.
     */
    ManagedResourceGroupConfiguration managedResourceGroupConfiguration();

    /**
     * Gets the manualActionCount property: The count of Manual Action Taken (MAT) events that have not been validated.
     *
     * @return the manualActionCount value.
     */
    Long manualActionCount();

    /**
     * Gets the networkFabricId property: The resource ID of the Network Fabric associated with the cluster.
     *
     * @return the networkFabricId value.
     */
    String networkFabricId();

    /**
     * Gets the provisioningState property: The provisioning state of the cluster.
     *
     * @return the provisioningState value.
     */
    ClusterProvisioningState provisioningState();

    /**
     * Gets the supportExpiryDate property: The support end date of the runtime version of the cluster.
     *
     * @return the supportExpiryDate value.
     */
    String supportExpiryDate();

    /**
     * Gets the workloadResourceIds property: The list of workload resource IDs that are hosted within this cluster.
     *
     * @return the workloadResourceIds value.
     */
    List<String> workloadResourceIds();

    /**
     * Gets the region of the resource.
     *
     * @return the region of the resource.
     */
    Region region();

    /**
     * Gets the name of the resource region.
     *
     * @return the name of the resource region.
     */
    String regionName();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.networkcloud.fluent.models.ClusterInner object.
     *
     * @return the inner object.
     */
    ClusterInner innerModel();

    /** The entirety of the Cluster definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithExtendedLocation,
            DefinitionStages.WithAggregatorOrSingleRackDefinition,
            DefinitionStages.WithClusterType,
            DefinitionStages.WithClusterVersion,
            DefinitionStages.WithNetworkFabricId,
            DefinitionStages.WithCreate {
    }
    /** The Cluster definition stages. */
    interface DefinitionStages {
        /** The first stage of the Cluster definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the Cluster definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(String location);
        }
        /** The stage of the Cluster definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @return the next definition stage.
             */
            WithExtendedLocation withExistingResourceGroup(String resourceGroupName);
        }
        /** The stage of the Cluster definition allowing to specify extendedLocation. */
        interface WithExtendedLocation {
            /**
             * Specifies the extendedLocation property: ExtendedLocation represents the Azure custom location where the
             * resource will be created.
             *
             * <p>The extended location of the cluster manager associated with the cluster..
             *
             * @param extendedLocation ExtendedLocation represents the Azure custom location where the resource will be
             *     created.
             *     <p>The extended location of the cluster manager associated with the cluster.
             * @return the next definition stage.
             */
            WithAggregatorOrSingleRackDefinition withExtendedLocation(ExtendedLocation extendedLocation);
        }
        /** The stage of the Cluster definition allowing to specify aggregatorOrSingleRackDefinition. */
        interface WithAggregatorOrSingleRackDefinition {
            /**
             * Specifies the aggregatorOrSingleRackDefinition property: RackDefinition represents details regarding the
             * rack.
             *
             * <p>The rack definition that is intended to reflect only a single rack in a single rack cluster, or an
             * aggregator rack in a multi-rack cluster..
             *
             * @param aggregatorOrSingleRackDefinition RackDefinition represents details regarding the rack.
             *     <p>The rack definition that is intended to reflect only a single rack in a single rack cluster, or an
             *     aggregator rack in a multi-rack cluster.
             * @return the next definition stage.
             */
            WithClusterType withAggregatorOrSingleRackDefinition(RackDefinition aggregatorOrSingleRackDefinition);
        }
        /** The stage of the Cluster definition allowing to specify clusterType. */
        interface WithClusterType {
            /**
             * Specifies the clusterType property: The type of rack configuration for the cluster..
             *
             * @param clusterType The type of rack configuration for the cluster.
             * @return the next definition stage.
             */
            WithClusterVersion withClusterType(ClusterType clusterType);
        }
        /** The stage of the Cluster definition allowing to specify clusterVersion. */
        interface WithClusterVersion {
            /**
             * Specifies the clusterVersion property: The current runtime version of the cluster..
             *
             * @param clusterVersion The current runtime version of the cluster.
             * @return the next definition stage.
             */
            WithNetworkFabricId withClusterVersion(String clusterVersion);
        }
        /** The stage of the Cluster definition allowing to specify networkFabricId. */
        interface WithNetworkFabricId {
            /**
             * Specifies the networkFabricId property: The resource ID of the Network Fabric associated with the
             * cluster..
             *
             * @param networkFabricId The resource ID of the Network Fabric associated with the cluster.
             * @return the next definition stage.
             */
            WithCreate withNetworkFabricId(String networkFabricId);
        }
        /**
         * The stage of the Cluster definition which contains all the minimum required properties for the resource to be
         * created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithTags,
                DefinitionStages.WithAnalyticsWorkspaceId,
                DefinitionStages.WithClusterLocation,
                DefinitionStages.WithClusterServicePrincipal,
                DefinitionStages.WithComputeDeploymentThreshold,
                DefinitionStages.WithComputeRackDefinitions,
                DefinitionStages.WithManagedResourceGroupConfiguration {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            Cluster create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Cluster create(Context context);
        }
        /** The stage of the Cluster definition allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            WithCreate withTags(Map<String, String> tags);
        }
        /** The stage of the Cluster definition allowing to specify analyticsWorkspaceId. */
        interface WithAnalyticsWorkspaceId {
            /**
             * Specifies the analyticsWorkspaceId property: The resource ID of the Log Analytics Workspace that will be
             * used for storing relevant logs..
             *
             * @param analyticsWorkspaceId The resource ID of the Log Analytics Workspace that will be used for storing
             *     relevant logs.
             * @return the next definition stage.
             */
            WithCreate withAnalyticsWorkspaceId(String analyticsWorkspaceId);
        }
        /** The stage of the Cluster definition allowing to specify clusterLocation. */
        interface WithClusterLocation {
            /**
             * Specifies the clusterLocation property: The customer-provided location information to identify where the
             * cluster resides..
             *
             * @param clusterLocation The customer-provided location information to identify where the cluster resides.
             * @return the next definition stage.
             */
            WithCreate withClusterLocation(String clusterLocation);
        }
        /** The stage of the Cluster definition allowing to specify clusterServicePrincipal. */
        interface WithClusterServicePrincipal {
            /**
             * Specifies the clusterServicePrincipal property: ServicePrincipalInformation represents the details of the
             * service principal to be used by the cluster during Arc Appliance installation.
             *
             * <p>The service principal to be used by the cluster during Arc Appliance installation..
             *
             * @param clusterServicePrincipal ServicePrincipalInformation represents the details of the service
             *     principal to be used by the cluster during Arc Appliance installation.
             *     <p>The service principal to be used by the cluster during Arc Appliance installation.
             * @return the next definition stage.
             */
            WithCreate withClusterServicePrincipal(ServicePrincipalInformation clusterServicePrincipal);
        }
        /** The stage of the Cluster definition allowing to specify computeDeploymentThreshold. */
        interface WithComputeDeploymentThreshold {
            /**
             * Specifies the computeDeploymentThreshold property: ValidationThreshold indicates allowed machine and node
             * hardware and deployment failures.
             *
             * <p>The validation threshold indicating the allowable failures of compute machines during environment
             * validation and deployment..
             *
             * @param computeDeploymentThreshold ValidationThreshold indicates allowed machine and node hardware and
             *     deployment failures.
             *     <p>The validation threshold indicating the allowable failures of compute machines during environment
             *     validation and deployment.
             * @return the next definition stage.
             */
            WithCreate withComputeDeploymentThreshold(ValidationThreshold computeDeploymentThreshold);
        }
        /** The stage of the Cluster definition allowing to specify computeRackDefinitions. */
        interface WithComputeRackDefinitions {
            /**
             * Specifies the computeRackDefinitions property: The list of rack definitions for the compute racks in a
             * multi-rack cluster, or an empty list in a single-rack cluster..
             *
             * @param computeRackDefinitions The list of rack definitions for the compute racks in a multi-rack cluster,
             *     or an empty list in a single-rack cluster.
             * @return the next definition stage.
             */
            WithCreate withComputeRackDefinitions(List<RackDefinition> computeRackDefinitions);
        }
        /** The stage of the Cluster definition allowing to specify managedResourceGroupConfiguration. */
        interface WithManagedResourceGroupConfiguration {
            /**
             * Specifies the managedResourceGroupConfiguration property: ManagedResourceGroupConfiguration represents
             * the configuration of the resource group managed by Azure.
             *
             * <p>The configuration of the managed resource group associated with the resource..
             *
             * @param managedResourceGroupConfiguration ManagedResourceGroupConfiguration represents the configuration
             *     of the resource group managed by Azure.
             *     <p>The configuration of the managed resource group associated with the resource.
             * @return the next definition stage.
             */
            WithCreate withManagedResourceGroupConfiguration(
                ManagedResourceGroupConfiguration managedResourceGroupConfiguration);
        }
    }
    /**
     * Begins update for the Cluster resource.
     *
     * @return the stage of resource update.
     */
    Cluster.Update update();

    /** The template for Cluster update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithAggregatorOrSingleRackDefinition,
            UpdateStages.WithClusterLocation,
            UpdateStages.WithClusterServicePrincipal,
            UpdateStages.WithComputeDeploymentThreshold,
            UpdateStages.WithComputeRackDefinitions {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        Cluster apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        Cluster apply(Context context);
    }
    /** The Cluster update stages. */
    interface UpdateStages {
        /** The stage of the Cluster update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: The Azure resource tags that will replace the existing ones..
             *
             * @param tags The Azure resource tags that will replace the existing ones.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the Cluster update allowing to specify aggregatorOrSingleRackDefinition. */
        interface WithAggregatorOrSingleRackDefinition {
            /**
             * Specifies the aggregatorOrSingleRackDefinition property: RackDefinition represents details regarding the
             * rack.
             *
             * <p>The rack definition that is intended to reflect only a single rack in a single rack cluster, or an
             * aggregator rack in a multi-rack cluster..
             *
             * @param aggregatorOrSingleRackDefinition RackDefinition represents details regarding the rack.
             *     <p>The rack definition that is intended to reflect only a single rack in a single rack cluster, or an
             *     aggregator rack in a multi-rack cluster.
             * @return the next definition stage.
             */
            Update withAggregatorOrSingleRackDefinition(RackDefinition aggregatorOrSingleRackDefinition);
        }
        /** The stage of the Cluster update allowing to specify clusterLocation. */
        interface WithClusterLocation {
            /**
             * Specifies the clusterLocation property: The customer-provided location information to identify where the
             * cluster resides..
             *
             * @param clusterLocation The customer-provided location information to identify where the cluster resides.
             * @return the next definition stage.
             */
            Update withClusterLocation(String clusterLocation);
        }
        /** The stage of the Cluster update allowing to specify clusterServicePrincipal. */
        interface WithClusterServicePrincipal {
            /**
             * Specifies the clusterServicePrincipal property: ServicePrincipalInformation represents the details of the
             * service principal to be used by the cluster during Arc Appliance installation.
             *
             * <p>The service principal to be used by the cluster during Arc Appliance installation..
             *
             * @param clusterServicePrincipal ServicePrincipalInformation represents the details of the service
             *     principal to be used by the cluster during Arc Appliance installation.
             *     <p>The service principal to be used by the cluster during Arc Appliance installation.
             * @return the next definition stage.
             */
            Update withClusterServicePrincipal(ServicePrincipalInformation clusterServicePrincipal);
        }
        /** The stage of the Cluster update allowing to specify computeDeploymentThreshold. */
        interface WithComputeDeploymentThreshold {
            /**
             * Specifies the computeDeploymentThreshold property: ValidationThreshold indicates allowed machine and node
             * hardware and deployment failures.
             *
             * <p>The validation threshold indicating the allowable failures of compute machines during environment
             * validation and deployment..
             *
             * @param computeDeploymentThreshold ValidationThreshold indicates allowed machine and node hardware and
             *     deployment failures.
             *     <p>The validation threshold indicating the allowable failures of compute machines during environment
             *     validation and deployment.
             * @return the next definition stage.
             */
            Update withComputeDeploymentThreshold(ValidationThreshold computeDeploymentThreshold);
        }
        /** The stage of the Cluster update allowing to specify computeRackDefinitions. */
        interface WithComputeRackDefinitions {
            /**
             * Specifies the computeRackDefinitions property: The list of rack definitions for the compute racks in a
             * multi-rack cluster, or an empty list in a single-rack cluster..
             *
             * @param computeRackDefinitions The list of rack definitions for the compute racks in a multi-rack cluster,
             *     or an empty list in a single-rack cluster.
             * @return the next definition stage.
             */
            Update withComputeRackDefinitions(List<RackDefinition> computeRackDefinitions);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    Cluster refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    Cluster refresh(Context context);

    /**
     * Deploy the cluster to the rack.
     *
     * <p>Deploy the cluster to the provided rack.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deploy();

    /**
     * Deploy the cluster to the rack.
     *
     * <p>Deploy the cluster to the provided rack.
     *
     * @param clusterDeployParameters The request body.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void deploy(ClusterDeployParameters clusterDeployParameters, Context context);

    /**
     * Update the cluster version.
     *
     * <p>Update the version of the provided cluster to one of the available supported versions.
     *
     * @param clusterUpdateVersionParameters The request body.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void updateVersion(ClusterUpdateVersionParameters clusterUpdateVersionParameters);

    /**
     * Update the cluster version.
     *
     * <p>Update the version of the provided cluster to one of the available supported versions.
     *
     * @param clusterUpdateVersionParameters The request body.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void updateVersion(ClusterUpdateVersionParameters clusterUpdateVersionParameters, Context context);
}
