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

package com.azure.resourcemanager.servicefabric.models;

import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterInner;
import com.azure.resourcemanager.servicefabric.fluent.models.ClusterVersionDetails;
import java.time.OffsetDateTime;
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 etag property: Azure resource etag.
     *
     * @return the etag value.
     */
    String etag();

    /**
     * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the addOnFeatures property: The list of add-on features to enable in the cluster.
     *
     * @return the addOnFeatures value.
     */
    List<AddOnFeatures> addOnFeatures();

    /**
     * Gets the availableClusterVersions property: The Service Fabric runtime versions available for this cluster.
     *
     * @return the availableClusterVersions value.
     */
    List<ClusterVersionDetails> availableClusterVersions();

    /**
     * Gets the azureActiveDirectory property: The AAD authentication settings of the cluster.
     *
     * @return the azureActiveDirectory value.
     */
    AzureActiveDirectory azureActiveDirectory();

    /**
     * Gets the certificate property: The certificate to use for securing the cluster. The certificate provided will be
     * used for node to node security within the cluster, SSL certificate for cluster management endpoint and default
     * admin client.
     *
     * @return the certificate value.
     */
    CertificateDescription certificate();

    /**
     * Gets the certificateCommonNames property: Describes a list of server certificates referenced by common name that
     * are used to secure the cluster.
     *
     * @return the certificateCommonNames value.
     */
    ServerCertificateCommonNames certificateCommonNames();

    /**
     * Gets the clientCertificateCommonNames property: The list of client certificates referenced by common name that
     * are allowed to manage the cluster.
     *
     * @return the clientCertificateCommonNames value.
     */
    List<ClientCertificateCommonName> clientCertificateCommonNames();

    /**
     * Gets the clientCertificateThumbprints property: The list of client certificates referenced by thumbprint that are
     * allowed to manage the cluster.
     *
     * @return the clientCertificateThumbprints value.
     */
    List<ClientCertificateThumbprint> clientCertificateThumbprints();

    /**
     * Gets the clusterCodeVersion property: The Service Fabric runtime version of the cluster. This property can only
     * by set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new
     * clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing
     * clusters use **availableClusterVersions**.
     *
     * @return the clusterCodeVersion value.
     */
    String clusterCodeVersion();

    /**
     * Gets the clusterEndpoint property: The Azure Resource Provider endpoint. A system service in the cluster connects
     * to this endpoint.
     *
     * @return the clusterEndpoint value.
     */
    String clusterEndpoint();

    /**
     * Gets the clusterId property: A service generated unique identifier for the cluster resource.
     *
     * @return the clusterId value.
     */
    String clusterId();

    /**
     * Gets the clusterState property: The current state of the cluster.
     *
     * <p>- WaitingForNodes - Indicates that the cluster resource is created and the resource provider is waiting for
     * Service Fabric VM extension to boot up and report to it. - Deploying - Indicates that the Service Fabric runtime
     * is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system
     * services are up. - BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version.
     * This upgrade is automatically initiated when the cluster boots up for the first time. - UpdatingUserConfiguration
     * - Indicates that the cluster is being upgraded with the user provided configuration. - UpdatingUserCertificate -
     * Indicates that the cluster is being upgraded with the user provided certificate. - UpdatingInfrastructure -
     * Indicates that the cluster is being upgraded with the latest Service Fabric runtime version. This happens only
     * when the **upgradeMode** is set to 'Automatic'. - EnforcingClusterVersion - Indicates that cluster is on a
     * different version than expected and the cluster is being upgraded to the expected version. -
     * UpgradeServiceUnreachable - Indicates that the system service in the cluster is no longer polling the Resource
     * Provider. Clusters in this state cannot be managed by the Resource Provider. - AutoScale - Indicates that the
     * ReliabilityLevel of the cluster is being adjusted. - Ready - Indicates that the cluster is in a stable state.
     *
     * @return the clusterState value.
     */
    ClusterState clusterState();

    /**
     * Gets the diagnosticsStorageAccountConfig property: The storage account information for storing Service Fabric
     * diagnostic logs.
     *
     * @return the diagnosticsStorageAccountConfig value.
     */
    DiagnosticsStorageAccountConfig diagnosticsStorageAccountConfig();

    /**
     * Gets the eventStoreServiceEnabled property: Indicates if the event store service is enabled.
     *
     * @return the eventStoreServiceEnabled value.
     */
    Boolean eventStoreServiceEnabled();

    /**
     * Gets the fabricSettings property: The list of custom fabric settings to configure the cluster.
     *
     * @return the fabricSettings value.
     */
    List<SettingsSectionDescription> fabricSettings();

    /**
     * Gets the managementEndpoint property: The http management endpoint of the cluster.
     *
     * @return the managementEndpoint value.
     */
    String managementEndpoint();

    /**
     * Gets the nodeTypes property: The list of node types in the cluster.
     *
     * @return the nodeTypes value.
     */
    List<NodeTypeDescription> nodeTypes();

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

    /**
     * Gets the reliabilityLevel property: The reliability level sets the replica set size of system services. Learn
     * about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
     *
     * <p>- None - Run the System services with a target replica set count of 1. This should only be used for test
     * clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for
     * test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System
     * services with a target replica set count of 7. - Platinum - Run the System services with a target replica set
     * count of 9.
     *
     * @return the reliabilityLevel value.
     */
    ReliabilityLevel reliabilityLevel();

    /**
     * Gets the reverseProxyCertificate property: The server certificate used by reverse proxy.
     *
     * @return the reverseProxyCertificate value.
     */
    CertificateDescription reverseProxyCertificate();

    /**
     * Gets the reverseProxyCertificateCommonNames property: Describes a list of server certificates referenced by
     * common name that are used to secure the cluster.
     *
     * @return the reverseProxyCertificateCommonNames value.
     */
    ServerCertificateCommonNames reverseProxyCertificateCommonNames();

    /**
     * Gets the upgradeDescription property: The policy to use when upgrading the cluster.
     *
     * @return the upgradeDescription value.
     */
    ClusterUpgradePolicy upgradeDescription();

    /**
     * Gets the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime version is
     * available.
     *
     * @return the upgradeMode value.
     */
    UpgradeMode upgradeMode();

    /**
     * Gets the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused versions.
     *
     * @return the applicationTypeVersionsCleanupPolicy value.
     */
    ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy();

    /**
     * Gets the vmImage property: The VM image VMSS has been configured with. Generic names such as Windows or Linux can
     * be used.
     *
     * @return the vmImage value.
     */
    String vmImage();

    /**
     * Gets the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade domains
     * (UDs). This property can't be modified if a node type with multiple Availability Zones is already present in the
     * cluster.
     *
     * @return the sfZonalUpgradeMode value.
     */
    SfZonalUpgradeMode sfZonalUpgradeMode();

    /**
     * Gets the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual machine scale set,
     * it is mandatory if a node type with multiple Availability Zones is added.
     *
     * @return the vmssZonalUpgradeMode value.
     */
    VmssZonalUpgradeMode vmssZonalUpgradeMode();

    /**
     * Gets the infrastructureServiceManager property: Indicates if infrastructure service manager is enabled.
     *
     * @return the infrastructureServiceManager value.
     */
    Boolean infrastructureServiceManager();

    /**
     * Gets the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied after they are
     * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
     *
     * @return the upgradeWave value.
     */
    ClusterUpgradeCadence upgradeWave();

    /**
     * Gets the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause automatic runtime
     * version upgrades on the cluster for an specific period of time on the cluster (UTC).
     *
     * @return the upgradePauseStartTimestampUtc value.
     */
    OffsetDateTime upgradePauseStartTimestampUtc();

    /**
     * Gets the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic runtime version
     * upgrades on the cluster for an specific period of time on the cluster (UTC).
     *
     * @return the upgradePauseEndTimestampUtc value.
     */
    OffsetDateTime upgradePauseEndTimestampUtc();

    /**
     * Gets the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the cluster.
     *
     * @return the waveUpgradePaused value.
     */
    Boolean waveUpgradePaused();

    /**
     * Gets the notifications property: Indicates a list of notification channels for cluster events.
     *
     * @return the notifications value.
     */
    List<Notification> notifications();

    /**
     * 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.servicefabric.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.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.
             * @return the next definition stage.
             */
            WithCreate withExistingResourceGroup(String resourceGroupName);
        }
        /**
         * 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.WithAddOnFeatures,
                DefinitionStages.WithAzureActiveDirectory,
                DefinitionStages.WithCertificate,
                DefinitionStages.WithCertificateCommonNames,
                DefinitionStages.WithClientCertificateCommonNames,
                DefinitionStages.WithClientCertificateThumbprints,
                DefinitionStages.WithClusterCodeVersion,
                DefinitionStages.WithDiagnosticsStorageAccountConfig,
                DefinitionStages.WithEventStoreServiceEnabled,
                DefinitionStages.WithFabricSettings,
                DefinitionStages.WithManagementEndpoint,
                DefinitionStages.WithNodeTypes,
                DefinitionStages.WithReliabilityLevel,
                DefinitionStages.WithReverseProxyCertificate,
                DefinitionStages.WithReverseProxyCertificateCommonNames,
                DefinitionStages.WithUpgradeDescription,
                DefinitionStages.WithUpgradeMode,
                DefinitionStages.WithApplicationTypeVersionsCleanupPolicy,
                DefinitionStages.WithVmImage,
                DefinitionStages.WithSfZonalUpgradeMode,
                DefinitionStages.WithVmssZonalUpgradeMode,
                DefinitionStages.WithInfrastructureServiceManager,
                DefinitionStages.WithUpgradeWave,
                DefinitionStages.WithUpgradePauseStartTimestampUtc,
                DefinitionStages.WithUpgradePauseEndTimestampUtc,
                DefinitionStages.WithWaveUpgradePaused,
                DefinitionStages.WithNotifications {
            /**
             * 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 addOnFeatures. */
        interface WithAddOnFeatures {
            /**
             * Specifies the addOnFeatures property: The list of add-on features to enable in the cluster..
             *
             * @param addOnFeatures The list of add-on features to enable in the cluster.
             * @return the next definition stage.
             */
            WithCreate withAddOnFeatures(List<AddOnFeatures> addOnFeatures);
        }
        /** The stage of the Cluster definition allowing to specify azureActiveDirectory. */
        interface WithAzureActiveDirectory {
            /**
             * Specifies the azureActiveDirectory property: The AAD authentication settings of the cluster..
             *
             * @param azureActiveDirectory The AAD authentication settings of the cluster.
             * @return the next definition stage.
             */
            WithCreate withAzureActiveDirectory(AzureActiveDirectory azureActiveDirectory);
        }
        /** The stage of the Cluster definition allowing to specify certificate. */
        interface WithCertificate {
            /**
             * Specifies the certificate property: The certificate to use for securing the cluster. The certificate
             * provided will be used for node to node security within the cluster, SSL certificate for cluster
             * management endpoint and default admin client..
             *
             * @param certificate The certificate to use for securing the cluster. The certificate provided will be used
             *     for node to node security within the cluster, SSL certificate for cluster management endpoint and
             *     default admin client.
             * @return the next definition stage.
             */
            WithCreate withCertificate(CertificateDescription certificate);
        }
        /** The stage of the Cluster definition allowing to specify certificateCommonNames. */
        interface WithCertificateCommonNames {
            /**
             * Specifies the certificateCommonNames property: Describes a list of server certificates referenced by
             * common name that are used to secure the cluster..
             *
             * @param certificateCommonNames Describes a list of server certificates referenced by common name that are
             *     used to secure the cluster.
             * @return the next definition stage.
             */
            WithCreate withCertificateCommonNames(ServerCertificateCommonNames certificateCommonNames);
        }
        /** The stage of the Cluster definition allowing to specify clientCertificateCommonNames. */
        interface WithClientCertificateCommonNames {
            /**
             * Specifies the clientCertificateCommonNames property: The list of client certificates referenced by common
             * name that are allowed to manage the cluster..
             *
             * @param clientCertificateCommonNames The list of client certificates referenced by common name that are
             *     allowed to manage the cluster.
             * @return the next definition stage.
             */
            WithCreate withClientCertificateCommonNames(List<ClientCertificateCommonName> clientCertificateCommonNames);
        }
        /** The stage of the Cluster definition allowing to specify clientCertificateThumbprints. */
        interface WithClientCertificateThumbprints {
            /**
             * Specifies the clientCertificateThumbprints property: The list of client certificates referenced by
             * thumbprint that are allowed to manage the cluster..
             *
             * @param clientCertificateThumbprints The list of client certificates referenced by thumbprint that are
             *     allowed to manage the cluster.
             * @return the next definition stage.
             */
            WithCreate withClientCertificateThumbprints(List<ClientCertificateThumbprint> clientCertificateThumbprints);
        }
        /** The stage of the Cluster definition allowing to specify clusterCodeVersion. */
        interface WithClusterCodeVersion {
            /**
             * Specifies the clusterCodeVersion property: The Service Fabric runtime version of the cluster. This
             * property can only by set the user when **upgradeMode** is set to 'Manual'. To get list of available
             * Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list
             * of available version for existing clusters use **availableClusterVersions**..
             *
             * @param clusterCodeVersion The Service Fabric runtime version of the cluster. This property can only by
             *     set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric
             *     versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available
             *     version for existing clusters use **availableClusterVersions**.
             * @return the next definition stage.
             */
            WithCreate withClusterCodeVersion(String clusterCodeVersion);
        }
        /** The stage of the Cluster definition allowing to specify diagnosticsStorageAccountConfig. */
        interface WithDiagnosticsStorageAccountConfig {
            /**
             * Specifies the diagnosticsStorageAccountConfig property: The storage account information for storing
             * Service Fabric diagnostic logs..
             *
             * @param diagnosticsStorageAccountConfig The storage account information for storing Service Fabric
             *     diagnostic logs.
             * @return the next definition stage.
             */
            WithCreate withDiagnosticsStorageAccountConfig(
                DiagnosticsStorageAccountConfig diagnosticsStorageAccountConfig);
        }
        /** The stage of the Cluster definition allowing to specify eventStoreServiceEnabled. */
        interface WithEventStoreServiceEnabled {
            /**
             * Specifies the eventStoreServiceEnabled property: Indicates if the event store service is enabled..
             *
             * @param eventStoreServiceEnabled Indicates if the event store service is enabled.
             * @return the next definition stage.
             */
            WithCreate withEventStoreServiceEnabled(Boolean eventStoreServiceEnabled);
        }
        /** The stage of the Cluster definition allowing to specify fabricSettings. */
        interface WithFabricSettings {
            /**
             * Specifies the fabricSettings property: The list of custom fabric settings to configure the cluster..
             *
             * @param fabricSettings The list of custom fabric settings to configure the cluster.
             * @return the next definition stage.
             */
            WithCreate withFabricSettings(List<SettingsSectionDescription> fabricSettings);
        }
        /** The stage of the Cluster definition allowing to specify managementEndpoint. */
        interface WithManagementEndpoint {
            /**
             * Specifies the managementEndpoint property: The http management endpoint of the cluster..
             *
             * @param managementEndpoint The http management endpoint of the cluster.
             * @return the next definition stage.
             */
            WithCreate withManagementEndpoint(String managementEndpoint);
        }
        /** The stage of the Cluster definition allowing to specify nodeTypes. */
        interface WithNodeTypes {
            /**
             * Specifies the nodeTypes property: The list of node types in the cluster..
             *
             * @param nodeTypes The list of node types in the cluster.
             * @return the next definition stage.
             */
            WithCreate withNodeTypes(List<NodeTypeDescription> nodeTypes);
        }
        /** The stage of the Cluster definition allowing to specify reliabilityLevel. */
        interface WithReliabilityLevel {
            /**
             * Specifies the reliabilityLevel property: The reliability level sets the replica set size of system
             * services. Learn about
             * [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
             *
             * <p>- None - Run the System services with a target replica set count of 1. This should only be used for
             * test clusters. - Bronze - Run the System services with a target replica set count of 3. This should only
             * be used for test clusters. - Silver - Run the System services with a target replica set count of 5. -
             * Gold - Run the System services with a target replica set count of 7. - Platinum - Run the System services
             * with a target replica set count of 9. .
             *
             * @param reliabilityLevel The reliability level sets the replica set size of system services. Learn about
             *     [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
             *     <p>- None - Run the System services with a target replica set count of 1. This should only be used
             *     for test clusters. - Bronze - Run the System services with a target replica set count of 3. This
             *     should only be used for test clusters. - Silver - Run the System services with a target replica set
             *     count of 5. - Gold - Run the System services with a target replica set count of 7. - Platinum - Run
             *     the System services with a target replica set count of 9.
             * @return the next definition stage.
             */
            WithCreate withReliabilityLevel(ReliabilityLevel reliabilityLevel);
        }
        /** The stage of the Cluster definition allowing to specify reverseProxyCertificate. */
        interface WithReverseProxyCertificate {
            /**
             * Specifies the reverseProxyCertificate property: The server certificate used by reverse proxy..
             *
             * @param reverseProxyCertificate The server certificate used by reverse proxy.
             * @return the next definition stage.
             */
            WithCreate withReverseProxyCertificate(CertificateDescription reverseProxyCertificate);
        }
        /** The stage of the Cluster definition allowing to specify reverseProxyCertificateCommonNames. */
        interface WithReverseProxyCertificateCommonNames {
            /**
             * Specifies the reverseProxyCertificateCommonNames property: Describes a list of server certificates
             * referenced by common name that are used to secure the cluster..
             *
             * @param reverseProxyCertificateCommonNames Describes a list of server certificates referenced by common
             *     name that are used to secure the cluster.
             * @return the next definition stage.
             */
            WithCreate withReverseProxyCertificateCommonNames(
                ServerCertificateCommonNames reverseProxyCertificateCommonNames);
        }
        /** The stage of the Cluster definition allowing to specify upgradeDescription. */
        interface WithUpgradeDescription {
            /**
             * Specifies the upgradeDescription property: The policy to use when upgrading the cluster..
             *
             * @param upgradeDescription The policy to use when upgrading the cluster.
             * @return the next definition stage.
             */
            WithCreate withUpgradeDescription(ClusterUpgradePolicy upgradeDescription);
        }
        /** The stage of the Cluster definition allowing to specify upgradeMode. */
        interface WithUpgradeMode {
            /**
             * Specifies the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime
             * version is available..
             *
             * @param upgradeMode The upgrade mode of the cluster when new Service Fabric runtime version is available.
             * @return the next definition stage.
             */
            WithCreate withUpgradeMode(UpgradeMode upgradeMode);
        }
        /** The stage of the Cluster definition allowing to specify applicationTypeVersionsCleanupPolicy. */
        interface WithApplicationTypeVersionsCleanupPolicy {
            /**
             * Specifies the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused
             * versions..
             *
             * @param applicationTypeVersionsCleanupPolicy The policy used to clean up unused versions.
             * @return the next definition stage.
             */
            WithCreate withApplicationTypeVersionsCleanupPolicy(
                ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy);
        }
        /** The stage of the Cluster definition allowing to specify vmImage. */
        interface WithVmImage {
            /**
             * Specifies the vmImage property: The VM image VMSS has been configured with. Generic names such as Windows
             * or Linux can be used..
             *
             * @param vmImage The VM image VMSS has been configured with. Generic names such as Windows or Linux can be
             *     used.
             * @return the next definition stage.
             */
            WithCreate withVmImage(String vmImage);
        }
        /** The stage of the Cluster definition allowing to specify sfZonalUpgradeMode. */
        interface WithSfZonalUpgradeMode {
            /**
             * Specifies the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade
             * domains (UDs). This property can't be modified if a node type with multiple Availability Zones is already
             * present in the cluster..
             *
             * @param sfZonalUpgradeMode This property controls the logical grouping of VMs in upgrade domains (UDs).
             *     This property can't be modified if a node type with multiple Availability Zones is already present in
             *     the cluster.
             * @return the next definition stage.
             */
            WithCreate withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode);
        }
        /** The stage of the Cluster definition allowing to specify vmssZonalUpgradeMode. */
        interface WithVmssZonalUpgradeMode {
            /**
             * Specifies the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual
             * machine scale set, it is mandatory if a node type with multiple Availability Zones is added..
             *
             * @param vmssZonalUpgradeMode This property defines the upgrade mode for the virtual machine scale set, it
             *     is mandatory if a node type with multiple Availability Zones is added.
             * @return the next definition stage.
             */
            WithCreate withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode);
        }
        /** The stage of the Cluster definition allowing to specify infrastructureServiceManager. */
        interface WithInfrastructureServiceManager {
            /**
             * Specifies the infrastructureServiceManager property: Indicates if infrastructure service manager is
             * enabled..
             *
             * @param infrastructureServiceManager Indicates if infrastructure service manager is enabled.
             * @return the next definition stage.
             */
            WithCreate withInfrastructureServiceManager(Boolean infrastructureServiceManager);
        }
        /** The stage of the Cluster definition allowing to specify upgradeWave. */
        interface WithUpgradeWave {
            /**
             * Specifies the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied
             * after they are released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'..
             *
             * @param upgradeWave Indicates when new cluster runtime version upgrades will be applied after they are
             *     released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
             * @return the next definition stage.
             */
            WithCreate withUpgradeWave(ClusterUpgradeCadence upgradeWave);
        }
        /** The stage of the Cluster definition allowing to specify upgradePauseStartTimestampUtc. */
        interface WithUpgradePauseStartTimestampUtc {
            /**
             * Specifies the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause
             * automatic runtime version upgrades on the cluster for an specific period of time on the cluster (UTC)..
             *
             * @param upgradePauseStartTimestampUtc Indicates the start date and time to pause automatic runtime version
             *     upgrades on the cluster for an specific period of time on the cluster (UTC).
             * @return the next definition stage.
             */
            WithCreate withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc);
        }
        /** The stage of the Cluster definition allowing to specify upgradePauseEndTimestampUtc. */
        interface WithUpgradePauseEndTimestampUtc {
            /**
             * Specifies the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic
             * runtime version upgrades on the cluster for an specific period of time on the cluster (UTC)..
             *
             * @param upgradePauseEndTimestampUtc Indicates the end date and time to pause automatic runtime version
             *     upgrades on the cluster for an specific period of time on the cluster (UTC).
             * @return the next definition stage.
             */
            WithCreate withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc);
        }
        /** The stage of the Cluster definition allowing to specify waveUpgradePaused. */
        interface WithWaveUpgradePaused {
            /**
             * Specifies the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the
             * cluster..
             *
             * @param waveUpgradePaused Boolean to pause automatic runtime version upgrades to the cluster.
             * @return the next definition stage.
             */
            WithCreate withWaveUpgradePaused(Boolean waveUpgradePaused);
        }
        /** The stage of the Cluster definition allowing to specify notifications. */
        interface WithNotifications {
            /**
             * Specifies the notifications property: Indicates a list of notification channels for cluster events..
             *
             * @param notifications Indicates a list of notification channels for cluster events.
             * @return the next definition stage.
             */
            WithCreate withNotifications(List<Notification> notifications);
        }
    }
    /**
     * 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.WithAddOnFeatures,
            UpdateStages.WithCertificate,
            UpdateStages.WithCertificateCommonNames,
            UpdateStages.WithClientCertificateCommonNames,
            UpdateStages.WithClientCertificateThumbprints,
            UpdateStages.WithClusterCodeVersion,
            UpdateStages.WithEventStoreServiceEnabled,
            UpdateStages.WithFabricSettings,
            UpdateStages.WithNodeTypes,
            UpdateStages.WithReliabilityLevel,
            UpdateStages.WithReverseProxyCertificate,
            UpdateStages.WithUpgradeDescription,
            UpdateStages.WithApplicationTypeVersionsCleanupPolicy,
            UpdateStages.WithUpgradeMode,
            UpdateStages.WithSfZonalUpgradeMode,
            UpdateStages.WithVmssZonalUpgradeMode,
            UpdateStages.WithInfrastructureServiceManager,
            UpdateStages.WithUpgradeWave,
            UpdateStages.WithUpgradePauseStartTimestampUtc,
            UpdateStages.WithUpgradePauseEndTimestampUtc,
            UpdateStages.WithWaveUpgradePaused,
            UpdateStages.WithNotifications {
        /**
         * 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: Cluster update parameters.
             *
             * @param tags Cluster update parameters.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the Cluster update allowing to specify addOnFeatures. */
        interface WithAddOnFeatures {
            /**
             * Specifies the addOnFeatures property: The list of add-on features to enable in the cluster..
             *
             * @param addOnFeatures The list of add-on features to enable in the cluster.
             * @return the next definition stage.
             */
            Update withAddOnFeatures(List<AddOnFeatures> addOnFeatures);
        }
        /** The stage of the Cluster update allowing to specify certificate. */
        interface WithCertificate {
            /**
             * Specifies the certificate property: The certificate to use for securing the cluster. The certificate
             * provided will be used for node to node security within the cluster, SSL certificate for cluster
             * management endpoint and default admin client..
             *
             * @param certificate The certificate to use for securing the cluster. The certificate provided will be used
             *     for node to node security within the cluster, SSL certificate for cluster management endpoint and
             *     default admin client.
             * @return the next definition stage.
             */
            Update withCertificate(CertificateDescription certificate);
        }
        /** The stage of the Cluster update allowing to specify certificateCommonNames. */
        interface WithCertificateCommonNames {
            /**
             * Specifies the certificateCommonNames property: Describes a list of server certificates referenced by
             * common name that are used to secure the cluster..
             *
             * @param certificateCommonNames Describes a list of server certificates referenced by common name that are
             *     used to secure the cluster.
             * @return the next definition stage.
             */
            Update withCertificateCommonNames(ServerCertificateCommonNames certificateCommonNames);
        }
        /** The stage of the Cluster update allowing to specify clientCertificateCommonNames. */
        interface WithClientCertificateCommonNames {
            /**
             * Specifies the clientCertificateCommonNames property: The list of client certificates referenced by common
             * name that are allowed to manage the cluster. This will overwrite the existing list..
             *
             * @param clientCertificateCommonNames The list of client certificates referenced by common name that are
             *     allowed to manage the cluster. This will overwrite the existing list.
             * @return the next definition stage.
             */
            Update withClientCertificateCommonNames(List<ClientCertificateCommonName> clientCertificateCommonNames);
        }
        /** The stage of the Cluster update allowing to specify clientCertificateThumbprints. */
        interface WithClientCertificateThumbprints {
            /**
             * Specifies the clientCertificateThumbprints property: The list of client certificates referenced by
             * thumbprint that are allowed to manage the cluster. This will overwrite the existing list..
             *
             * @param clientCertificateThumbprints The list of client certificates referenced by thumbprint that are
             *     allowed to manage the cluster. This will overwrite the existing list.
             * @return the next definition stage.
             */
            Update withClientCertificateThumbprints(List<ClientCertificateThumbprint> clientCertificateThumbprints);
        }
        /** The stage of the Cluster update allowing to specify clusterCodeVersion. */
        interface WithClusterCodeVersion {
            /**
             * Specifies the clusterCodeVersion property: The Service Fabric runtime version of the cluster. This
             * property can only by set the user when **upgradeMode** is set to 'Manual'. To get list of available
             * Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list
             * of available version for existing clusters use **availableClusterVersions**..
             *
             * @param clusterCodeVersion The Service Fabric runtime version of the cluster. This property can only by
             *     set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric
             *     versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available
             *     version for existing clusters use **availableClusterVersions**.
             * @return the next definition stage.
             */
            Update withClusterCodeVersion(String clusterCodeVersion);
        }
        /** The stage of the Cluster update allowing to specify eventStoreServiceEnabled. */
        interface WithEventStoreServiceEnabled {
            /**
             * Specifies the eventStoreServiceEnabled property: Indicates if the event store service is enabled..
             *
             * @param eventStoreServiceEnabled Indicates if the event store service is enabled.
             * @return the next definition stage.
             */
            Update withEventStoreServiceEnabled(Boolean eventStoreServiceEnabled);
        }
        /** The stage of the Cluster update allowing to specify fabricSettings. */
        interface WithFabricSettings {
            /**
             * Specifies the fabricSettings property: The list of custom fabric settings to configure the cluster. This
             * will overwrite the existing list..
             *
             * @param fabricSettings The list of custom fabric settings to configure the cluster. This will overwrite
             *     the existing list.
             * @return the next definition stage.
             */
            Update withFabricSettings(List<SettingsSectionDescription> fabricSettings);
        }
        /** The stage of the Cluster update allowing to specify nodeTypes. */
        interface WithNodeTypes {
            /**
             * Specifies the nodeTypes property: The list of node types in the cluster. This will overwrite the existing
             * list..
             *
             * @param nodeTypes The list of node types in the cluster. This will overwrite the existing list.
             * @return the next definition stage.
             */
            Update withNodeTypes(List<NodeTypeDescription> nodeTypes);
        }
        /** The stage of the Cluster update allowing to specify reliabilityLevel. */
        interface WithReliabilityLevel {
            /**
             * Specifies the reliabilityLevel property: The reliability level sets the replica set size of system
             * services. Learn about
             * [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
             *
             * <p>- None - Run the System services with a target replica set count of 1. This should only be used for
             * test clusters. - Bronze - Run the System services with a target replica set count of 3. This should only
             * be used for test clusters. - Silver - Run the System services with a target replica set count of 5. -
             * Gold - Run the System services with a target replica set count of 7. - Platinum - Run the System services
             * with a target replica set count of 9. .
             *
             * @param reliabilityLevel The reliability level sets the replica set size of system services. Learn about
             *     [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
             *     <p>- None - Run the System services with a target replica set count of 1. This should only be used
             *     for test clusters. - Bronze - Run the System services with a target replica set count of 3. This
             *     should only be used for test clusters. - Silver - Run the System services with a target replica set
             *     count of 5. - Gold - Run the System services with a target replica set count of 7. - Platinum - Run
             *     the System services with a target replica set count of 9.
             * @return the next definition stage.
             */
            Update withReliabilityLevel(ReliabilityLevel reliabilityLevel);
        }
        /** The stage of the Cluster update allowing to specify reverseProxyCertificate. */
        interface WithReverseProxyCertificate {
            /**
             * Specifies the reverseProxyCertificate property: The server certificate used by reverse proxy..
             *
             * @param reverseProxyCertificate The server certificate used by reverse proxy.
             * @return the next definition stage.
             */
            Update withReverseProxyCertificate(CertificateDescription reverseProxyCertificate);
        }
        /** The stage of the Cluster update allowing to specify upgradeDescription. */
        interface WithUpgradeDescription {
            /**
             * Specifies the upgradeDescription property: The policy to use when upgrading the cluster..
             *
             * @param upgradeDescription The policy to use when upgrading the cluster.
             * @return the next definition stage.
             */
            Update withUpgradeDescription(ClusterUpgradePolicy upgradeDescription);
        }
        /** The stage of the Cluster update allowing to specify applicationTypeVersionsCleanupPolicy. */
        interface WithApplicationTypeVersionsCleanupPolicy {
            /**
             * Specifies the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused
             * versions..
             *
             * @param applicationTypeVersionsCleanupPolicy The policy used to clean up unused versions.
             * @return the next definition stage.
             */
            Update withApplicationTypeVersionsCleanupPolicy(
                ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy);
        }
        /** The stage of the Cluster update allowing to specify upgradeMode. */
        interface WithUpgradeMode {
            /**
             * Specifies the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime
             * version is available..
             *
             * @param upgradeMode The upgrade mode of the cluster when new Service Fabric runtime version is available.
             * @return the next definition stage.
             */
            Update withUpgradeMode(UpgradeMode upgradeMode);
        }
        /** The stage of the Cluster update allowing to specify sfZonalUpgradeMode. */
        interface WithSfZonalUpgradeMode {
            /**
             * Specifies the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade
             * domains (UDs). This property can't be modified if a node type with multiple Availability Zones is already
             * present in the cluster..
             *
             * @param sfZonalUpgradeMode This property controls the logical grouping of VMs in upgrade domains (UDs).
             *     This property can't be modified if a node type with multiple Availability Zones is already present in
             *     the cluster.
             * @return the next definition stage.
             */
            Update withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode);
        }
        /** The stage of the Cluster update allowing to specify vmssZonalUpgradeMode. */
        interface WithVmssZonalUpgradeMode {
            /**
             * Specifies the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual
             * machine scale set, it is mandatory if a node type with multiple Availability Zones is added..
             *
             * @param vmssZonalUpgradeMode This property defines the upgrade mode for the virtual machine scale set, it
             *     is mandatory if a node type with multiple Availability Zones is added.
             * @return the next definition stage.
             */
            Update withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode);
        }
        /** The stage of the Cluster update allowing to specify infrastructureServiceManager. */
        interface WithInfrastructureServiceManager {
            /**
             * Specifies the infrastructureServiceManager property: Indicates if infrastructure service manager is
             * enabled..
             *
             * @param infrastructureServiceManager Indicates if infrastructure service manager is enabled.
             * @return the next definition stage.
             */
            Update withInfrastructureServiceManager(Boolean infrastructureServiceManager);
        }
        /** The stage of the Cluster update allowing to specify upgradeWave. */
        interface WithUpgradeWave {
            /**
             * Specifies the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied
             * after they are released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'..
             *
             * @param upgradeWave Indicates when new cluster runtime version upgrades will be applied after they are
             *     released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.
             * @return the next definition stage.
             */
            Update withUpgradeWave(ClusterUpgradeCadence upgradeWave);
        }
        /** The stage of the Cluster update allowing to specify upgradePauseStartTimestampUtc. */
        interface WithUpgradePauseStartTimestampUtc {
            /**
             * Specifies the upgradePauseStartTimestampUtc property: The start timestamp to pause runtime version
             * upgrades on the cluster (UTC)..
             *
             * @param upgradePauseStartTimestampUtc The start timestamp to pause runtime version upgrades on the cluster
             *     (UTC).
             * @return the next definition stage.
             */
            Update withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc);
        }
        /** The stage of the Cluster update allowing to specify upgradePauseEndTimestampUtc. */
        interface WithUpgradePauseEndTimestampUtc {
            /**
             * Specifies the upgradePauseEndTimestampUtc property: The end timestamp of pause runtime version upgrades
             * on the cluster (UTC)..
             *
             * @param upgradePauseEndTimestampUtc The end timestamp of pause runtime version upgrades on the cluster
             *     (UTC).
             * @return the next definition stage.
             */
            Update withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc);
        }
        /** The stage of the Cluster update allowing to specify waveUpgradePaused. */
        interface WithWaveUpgradePaused {
            /**
             * Specifies the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the
             * cluster..
             *
             * @param waveUpgradePaused Boolean to pause automatic runtime version upgrades to the cluster.
             * @return the next definition stage.
             */
            Update withWaveUpgradePaused(Boolean waveUpgradePaused);
        }
        /** The stage of the Cluster update allowing to specify notifications. */
        interface WithNotifications {
            /**
             * Specifies the notifications property: Indicates a list of notification channels for cluster events..
             *
             * @param notifications Indicates a list of notification channels for cluster events.
             * @return the next definition stage.
             */
            Update withNotifications(List<Notification> notifications);
        }
    }
    /**
     * 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);

    /**
     * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required
     * path to get to the an specific target version.
     *
     * <p>If a target is not provided, it will get the minimum and maximum versions available from the current cluster
     * version. If a target is given, it will provide the required path to get from the current cluster version to the
     * target version.
     *
     * @param versionsDescription The upgrade path description with target version.
     * @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.
     * @return the list of intermediate cluster code versions for an upgrade or downgrade along with {@link Response}.
     */
    Response<UpgradableVersionPathResult> listUpgradableVersionsWithResponse(
        UpgradableVersionsDescription versionsDescription, Context context);

    /**
     * Operation to get the minimum and maximum upgradable version from the current cluster version, or the required
     * path to get to the an specific target version.
     *
     * <p>If a target is not provided, it will get the minimum and maximum versions available from the current cluster
     * version. If a target is given, it will provide the required path to get from the current cluster version to the
     * target version.
     *
     * @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.
     * @return the list of intermediate cluster code versions for an upgrade or downgrade.
     */
    UpgradableVersionPathResult listUpgradableVersions();
}
