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

package com.azure.resourcemanager.cosmosdbforpostgresql.models;

import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ClusterInner;
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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the administratorLogin property: The administrator's login name of the servers in the cluster.
     *
     * @return the administratorLogin value.
     */
    String administratorLogin();

    /**
     * Gets the administratorLoginPassword property: The password of the administrator login. Required for creation.
     *
     * @return the administratorLoginPassword value.
     */
    String administratorLoginPassword();

    /**
     * Gets the provisioningState property: Provisioning state of the cluster.
     *
     * @return the provisioningState value.
     */
    String provisioningState();

    /**
     * Gets the state property: A state of a cluster/server that is visible to user.
     *
     * @return the state value.
     */
    String state();

    /**
     * Gets the postgresqlVersion property: The major PostgreSQL version on all cluster servers.
     *
     * @return the postgresqlVersion value.
     */
    String postgresqlVersion();

    /**
     * Gets the citusVersion property: The Citus extension version on all cluster servers.
     *
     * @return the citusVersion value.
     */
    String citusVersion();

    /**
     * Gets the maintenanceWindow property: Maintenance window of a cluster.
     *
     * @return the maintenanceWindow value.
     */
    MaintenanceWindow maintenanceWindow();

    /**
     * Gets the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers.
     *
     * @return the preferredPrimaryZone value.
     */
    String preferredPrimaryZone();

    /**
     * Gets the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
     *
     * @return the enableShardsOnCoordinator value.
     */
    Boolean enableShardsOnCoordinator();

    /**
     * Gets the enableHa property: If high availability (HA) is enabled or not for the cluster.
     *
     * @return the enableHa value.
     */
    Boolean enableHa();

    /**
     * Gets the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose).
     * Required for creation.
     *
     * @return the coordinatorServerEdition value.
     */
    String coordinatorServerEdition();

    /**
     * Gets the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See
     * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
     *
     * @return the coordinatorStorageQuotaInMb value.
     */
    Integer coordinatorStorageQuotaInMb();

    /**
     * Gets the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See
     * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
     *
     * @return the coordinatorVCores value.
     */
    Integer coordinatorVCores();

    /**
     * Gets the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator.
     *
     * @return the coordinatorEnablePublicIpAccess value.
     */
    Boolean coordinatorEnablePublicIpAccess();

    /**
     * Gets the nodeServerEdition property: The edition of a node server (default: MemoryOptimized).
     *
     * @return the nodeServerEdition value.
     */
    String nodeServerEdition();

    /**
     * Gets the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node
     * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent
     * multi-node configuration. Node count value cannot be 1. Required for creation.
     *
     * @return the nodeCount value.
     */
    Integer nodeCount();

    /**
     * Gets the nodeStorageQuotaInMb property: The storage in MB on each worker node. See
     * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
     *
     * @return the nodeStorageQuotaInMb value.
     */
    Integer nodeStorageQuotaInMb();

    /**
     * Gets the nodeVCores property: The compute in vCores on each worker node (max: 104). See
     * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
     *
     * @return the nodeVCores value.
     */
    Integer nodeVCores();

    /**
     * Gets the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes.
     *
     * @return the nodeEnablePublicIpAccess value.
     */
    Boolean nodeEnablePublicIpAccess();

    /**
     * Gets the serverNames property: The list of server names in the cluster.
     *
     * @return the serverNames value.
     */
    List<ServerNameItem> serverNames();

    /**
     * Gets the sourceResourceId property: The resource id of source cluster for read replica clusters.
     *
     * @return the sourceResourceId value.
     */
    String sourceResourceId();

    /**
     * Gets the sourceLocation property: The Azure region of source cluster for read replica clusters.
     *
     * @return the sourceLocation value.
     */
    String sourceLocation();

    /**
     * Gets the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore.
     *
     * @return the pointInTimeUtc value.
     */
    OffsetDateTime pointInTimeUtc();

    /**
     * Gets the readReplicas property: The array of read replica clusters.
     *
     * @return the readReplicas value.
     */
    List<String> readReplicas();

    /**
     * Gets the earliestRestoreTime property: The earliest restore point time (ISO8601 format) for the cluster.
     *
     * @return the earliestRestoreTime value.
     */
    OffsetDateTime earliestRestoreTime();

    /**
     * Gets the privateEndpointConnections property: The private endpoint connections for a cluster.
     *
     * @return the privateEndpointConnections value.
     */
    List<SimplePrivateEndpointConnection> privateEndpointConnections();

    /**
     * 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.cosmosdbforpostgresql.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. The name is case insensitive.
             * @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.WithAdministratorLoginPassword,
                DefinitionStages.WithPostgresqlVersion,
                DefinitionStages.WithCitusVersion,
                DefinitionStages.WithMaintenanceWindow,
                DefinitionStages.WithPreferredPrimaryZone,
                DefinitionStages.WithEnableShardsOnCoordinator,
                DefinitionStages.WithEnableHa,
                DefinitionStages.WithCoordinatorServerEdition,
                DefinitionStages.WithCoordinatorStorageQuotaInMb,
                DefinitionStages.WithCoordinatorVCores,
                DefinitionStages.WithCoordinatorEnablePublicIpAccess,
                DefinitionStages.WithNodeServerEdition,
                DefinitionStages.WithNodeCount,
                DefinitionStages.WithNodeStorageQuotaInMb,
                DefinitionStages.WithNodeVCores,
                DefinitionStages.WithNodeEnablePublicIpAccess,
                DefinitionStages.WithSourceResourceId,
                DefinitionStages.WithSourceLocation,
                DefinitionStages.WithPointInTimeUtc {
            /**
             * 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 administratorLoginPassword. */
        interface WithAdministratorLoginPassword {
            /**
             * Specifies the administratorLoginPassword property: The password of the administrator login. Required for
             * creation..
             *
             * @param administratorLoginPassword The password of the administrator login. Required for creation.
             * @return the next definition stage.
             */
            WithCreate withAdministratorLoginPassword(String administratorLoginPassword);
        }
        /** The stage of the Cluster definition allowing to specify postgresqlVersion. */
        interface WithPostgresqlVersion {
            /**
             * Specifies the postgresqlVersion property: The major PostgreSQL version on all cluster servers..
             *
             * @param postgresqlVersion The major PostgreSQL version on all cluster servers.
             * @return the next definition stage.
             */
            WithCreate withPostgresqlVersion(String postgresqlVersion);
        }
        /** The stage of the Cluster definition allowing to specify citusVersion. */
        interface WithCitusVersion {
            /**
             * Specifies the citusVersion property: The Citus extension version on all cluster servers..
             *
             * @param citusVersion The Citus extension version on all cluster servers.
             * @return the next definition stage.
             */
            WithCreate withCitusVersion(String citusVersion);
        }
        /** The stage of the Cluster definition allowing to specify maintenanceWindow. */
        interface WithMaintenanceWindow {
            /**
             * Specifies the maintenanceWindow property: Maintenance window of a cluster..
             *
             * @param maintenanceWindow Maintenance window of a cluster.
             * @return the next definition stage.
             */
            WithCreate withMaintenanceWindow(MaintenanceWindow maintenanceWindow);
        }
        /** The stage of the Cluster definition allowing to specify preferredPrimaryZone. */
        interface WithPreferredPrimaryZone {
            /**
             * Specifies the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster
             * servers..
             *
             * @param preferredPrimaryZone Preferred primary availability zone (AZ) for all cluster servers.
             * @return the next definition stage.
             */
            WithCreate withPreferredPrimaryZone(String preferredPrimaryZone);
        }
        /** The stage of the Cluster definition allowing to specify enableShardsOnCoordinator. */
        interface WithEnableShardsOnCoordinator {
            /**
             * Specifies the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the
             * cluster..
             *
             * @param enableShardsOnCoordinator If shards on coordinator is enabled or not for the cluster.
             * @return the next definition stage.
             */
            WithCreate withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator);
        }
        /** The stage of the Cluster definition allowing to specify enableHa. */
        interface WithEnableHa {
            /**
             * Specifies the enableHa property: If high availability (HA) is enabled or not for the cluster..
             *
             * @param enableHa If high availability (HA) is enabled or not for the cluster.
             * @return the next definition stage.
             */
            WithCreate withEnableHa(Boolean enableHa);
        }
        /** The stage of the Cluster definition allowing to specify coordinatorServerEdition. */
        interface WithCoordinatorServerEdition {
            /**
             * Specifies the coordinatorServerEdition property: The edition of a coordinator server (default:
             * GeneralPurpose). Required for creation..
             *
             * @param coordinatorServerEdition The edition of a coordinator server (default: GeneralPurpose). Required
             *     for creation.
             * @return the next definition stage.
             */
            WithCreate withCoordinatorServerEdition(String coordinatorServerEdition);
        }
        /** The stage of the Cluster definition allowing to specify coordinatorStorageQuotaInMb. */
        interface WithCoordinatorStorageQuotaInMb {
            /**
             * Specifies the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation.
             * See https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information..
             *
             * @param coordinatorStorageQuotaInMb The storage of a server in MB. Required for creation. See
             *     https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
             * @return the next definition stage.
             */
            WithCreate withCoordinatorStorageQuotaInMb(Integer coordinatorStorageQuotaInMb);
        }
        /** The stage of the Cluster definition allowing to specify coordinatorVCores. */
        interface WithCoordinatorVCores {
            /**
             * Specifies the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation.
             * See https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information..
             *
             * @param coordinatorVCores The vCores count of a server (max: 96). Required for creation. See
             *     https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
             * @return the next definition stage.
             */
            WithCreate withCoordinatorVCores(Integer coordinatorVCores);
        }
        /** The stage of the Cluster definition allowing to specify coordinatorEnablePublicIpAccess. */
        interface WithCoordinatorEnablePublicIpAccess {
            /**
             * Specifies the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator..
             *
             * @param coordinatorEnablePublicIpAccess If public access is enabled on coordinator.
             * @return the next definition stage.
             */
            WithCreate withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess);
        }
        /** The stage of the Cluster definition allowing to specify nodeServerEdition. */
        interface WithNodeServerEdition {
            /**
             * Specifies the nodeServerEdition property: The edition of a node server (default: MemoryOptimized)..
             *
             * @param nodeServerEdition The edition of a node server (default: MemoryOptimized).
             * @return the next definition stage.
             */
            WithCreate withNodeServerEdition(String nodeServerEdition);
        }
        /** The stage of the Cluster definition allowing to specify nodeCount. */
        interface WithNodeCount {
            /**
             * Specifies the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a
             * single node configuration with the ability to create distributed tables on that node. 2 or more worker
             * nodes represent multi-node configuration. Node count value cannot be 1. Required for creation..
             *
             * @param nodeCount Worker node count of the cluster. When node count is 0, it represents a single node
             *     configuration with the ability to create distributed tables on that node. 2 or more worker nodes
             *     represent multi-node configuration. Node count value cannot be 1. Required for creation.
             * @return the next definition stage.
             */
            WithCreate withNodeCount(Integer nodeCount);
        }
        /** The stage of the Cluster definition allowing to specify nodeStorageQuotaInMb. */
        interface WithNodeStorageQuotaInMb {
            /**
             * Specifies the nodeStorageQuotaInMb property: The storage in MB on each worker node. See
             * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information..
             *
             * @param nodeStorageQuotaInMb The storage in MB on each worker node. See
             *     https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
             * @return the next definition stage.
             */
            WithCreate withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb);
        }
        /** The stage of the Cluster definition allowing to specify nodeVCores. */
        interface WithNodeVCores {
            /**
             * Specifies the nodeVCores property: The compute in vCores on each worker node (max: 104). See
             * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information..
             *
             * @param nodeVCores The compute in vCores on each worker node (max: 104). See
             *     https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
             * @return the next definition stage.
             */
            WithCreate withNodeVCores(Integer nodeVCores);
        }
        /** The stage of the Cluster definition allowing to specify nodeEnablePublicIpAccess. */
        interface WithNodeEnablePublicIpAccess {
            /**
             * Specifies the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes..
             *
             * @param nodeEnablePublicIpAccess If public access is enabled on worker nodes.
             * @return the next definition stage.
             */
            WithCreate withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIpAccess);
        }
        /** The stage of the Cluster definition allowing to specify sourceResourceId. */
        interface WithSourceResourceId {
            /**
             * Specifies the sourceResourceId property: The resource id of source cluster for read replica clusters..
             *
             * @param sourceResourceId The resource id of source cluster for read replica clusters.
             * @return the next definition stage.
             */
            WithCreate withSourceResourceId(String sourceResourceId);
        }
        /** The stage of the Cluster definition allowing to specify sourceLocation. */
        interface WithSourceLocation {
            /**
             * Specifies the sourceLocation property: The Azure region of source cluster for read replica clusters..
             *
             * @param sourceLocation The Azure region of source cluster for read replica clusters.
             * @return the next definition stage.
             */
            WithCreate withSourceLocation(String sourceLocation);
        }
        /** The stage of the Cluster definition allowing to specify pointInTimeUtc. */
        interface WithPointInTimeUtc {
            /**
             * Specifies the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore..
             *
             * @param pointInTimeUtc Date and time in UTC (ISO8601 format) for cluster restore.
             * @return the next definition stage.
             */
            WithCreate withPointInTimeUtc(OffsetDateTime pointInTimeUtc);
        }
    }
    /**
     * 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.WithAdministratorLoginPassword,
            UpdateStages.WithPostgresqlVersion,
            UpdateStages.WithCitusVersion,
            UpdateStages.WithEnableShardsOnCoordinator,
            UpdateStages.WithEnableHa,
            UpdateStages.WithPreferredPrimaryZone,
            UpdateStages.WithCoordinatorServerEdition,
            UpdateStages.WithCoordinatorStorageQuotaInMb,
            UpdateStages.WithCoordinatorVCores,
            UpdateStages.WithCoordinatorEnablePublicIpAccess,
            UpdateStages.WithNodeServerEdition,
            UpdateStages.WithNodeCount,
            UpdateStages.WithNodeStorageQuotaInMb,
            UpdateStages.WithNodeVCores,
            UpdateStages.WithMaintenanceWindow {
        /**
         * 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: Application-specific metadata in the form of key-value pairs..
             *
             * @param tags Application-specific metadata in the form of key-value pairs.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the Cluster update allowing to specify administratorLoginPassword. */
        interface WithAdministratorLoginPassword {
            /**
             * Specifies the administratorLoginPassword property: The password of the administrator login. Each cluster
             * is created with pre-defined administrative role called ‘citus’. .
             *
             * @param administratorLoginPassword The password of the administrator login. Each cluster is created with
             *     pre-defined administrative role called ‘citus’. .
             * @return the next definition stage.
             */
            Update withAdministratorLoginPassword(String administratorLoginPassword);
        }
        /** The stage of the Cluster update allowing to specify postgresqlVersion. */
        interface WithPostgresqlVersion {
            /**
             * Specifies the postgresqlVersion property: The major PostgreSQL version on all cluster servers..
             *
             * @param postgresqlVersion The major PostgreSQL version on all cluster servers.
             * @return the next definition stage.
             */
            Update withPostgresqlVersion(String postgresqlVersion);
        }
        /** The stage of the Cluster update allowing to specify citusVersion. */
        interface WithCitusVersion {
            /**
             * Specifies the citusVersion property: The Citus extension version on all cluster servers..
             *
             * @param citusVersion The Citus extension version on all cluster servers.
             * @return the next definition stage.
             */
            Update withCitusVersion(String citusVersion);
        }
        /** The stage of the Cluster update allowing to specify enableShardsOnCoordinator. */
        interface WithEnableShardsOnCoordinator {
            /**
             * Specifies the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the
             * cluster..
             *
             * @param enableShardsOnCoordinator If shards on coordinator is enabled or not for the cluster.
             * @return the next definition stage.
             */
            Update withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator);
        }
        /** The stage of the Cluster update allowing to specify enableHa. */
        interface WithEnableHa {
            /**
             * Specifies the enableHa property: If high availability (HA) is enabled or not for the cluster..
             *
             * @param enableHa If high availability (HA) is enabled or not for the cluster.
             * @return the next definition stage.
             */
            Update withEnableHa(Boolean enableHa);
        }
        /** The stage of the Cluster update allowing to specify preferredPrimaryZone. */
        interface WithPreferredPrimaryZone {
            /**
             * Specifies the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster
             * servers..
             *
             * @param preferredPrimaryZone Preferred primary availability zone (AZ) for all cluster servers.
             * @return the next definition stage.
             */
            Update withPreferredPrimaryZone(String preferredPrimaryZone);
        }
        /** The stage of the Cluster update allowing to specify coordinatorServerEdition. */
        interface WithCoordinatorServerEdition {
            /**
             * Specifies the coordinatorServerEdition property: The edition of the coordinator (default:
             * GeneralPurpose)..
             *
             * @param coordinatorServerEdition The edition of the coordinator (default: GeneralPurpose).
             * @return the next definition stage.
             */
            Update withCoordinatorServerEdition(String coordinatorServerEdition);
        }
        /** The stage of the Cluster update allowing to specify coordinatorStorageQuotaInMb. */
        interface WithCoordinatorStorageQuotaInMb {
            /**
             * Specifies the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB..
             *
             * @param coordinatorStorageQuotaInMb The storage of the coordinator in MB.
             * @return the next definition stage.
             */
            Update withCoordinatorStorageQuotaInMb(Integer coordinatorStorageQuotaInMb);
        }
        /** The stage of the Cluster update allowing to specify coordinatorVCores. */
        interface WithCoordinatorVCores {
            /**
             * Specifies the coordinatorVCores property: The vCores count of the coordinator (max: 96)..
             *
             * @param coordinatorVCores The vCores count of the coordinator (max: 96).
             * @return the next definition stage.
             */
            Update withCoordinatorVCores(Integer coordinatorVCores);
        }
        /** The stage of the Cluster update allowing to specify coordinatorEnablePublicIpAccess. */
        interface WithCoordinatorEnablePublicIpAccess {
            /**
             * Specifies the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator..
             *
             * @param coordinatorEnablePublicIpAccess If public access is enabled on coordinator.
             * @return the next definition stage.
             */
            Update withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess);
        }
        /** The stage of the Cluster update allowing to specify nodeServerEdition. */
        interface WithNodeServerEdition {
            /**
             * Specifies the nodeServerEdition property: The edition of a node (default: MemoryOptimized)..
             *
             * @param nodeServerEdition The edition of a node (default: MemoryOptimized).
             * @return the next definition stage.
             */
            Update withNodeServerEdition(String nodeServerEdition);
        }
        /** The stage of the Cluster update allowing to specify nodeCount. */
        interface WithNodeCount {
            /**
             * Specifies the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a
             * single node configuration with the ability to create distributed tables on that node. 2 or more worker
             * nodes represent multi-node configuration. Node count value cannot be 1..
             *
             * @param nodeCount Worker node count of the cluster. When node count is 0, it represents a single node
             *     configuration with the ability to create distributed tables on that node. 2 or more worker nodes
             *     represent multi-node configuration. Node count value cannot be 1.
             * @return the next definition stage.
             */
            Update withNodeCount(Integer nodeCount);
        }
        /** The stage of the Cluster update allowing to specify nodeStorageQuotaInMb. */
        interface WithNodeStorageQuotaInMb {
            /**
             * Specifies the nodeStorageQuotaInMb property: The storage in MB on each worker node..
             *
             * @param nodeStorageQuotaInMb The storage in MB on each worker node.
             * @return the next definition stage.
             */
            Update withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb);
        }
        /** The stage of the Cluster update allowing to specify nodeVCores. */
        interface WithNodeVCores {
            /**
             * Specifies the nodeVCores property: The compute in vCores on each worker node (max: 104)..
             *
             * @param nodeVCores The compute in vCores on each worker node (max: 104).
             * @return the next definition stage.
             */
            Update withNodeVCores(Integer nodeVCores);
        }
        /** The stage of the Cluster update allowing to specify maintenanceWindow. */
        interface WithMaintenanceWindow {
            /**
             * Specifies the maintenanceWindow property: Maintenance window of a cluster..
             *
             * @param maintenanceWindow Maintenance window of a cluster.
             * @return the next definition stage.
             */
            Update withMaintenanceWindow(MaintenanceWindow maintenanceWindow);
        }
    }
    /**
     * 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);

    /**
     * Restarts all nodes in the cluster.
     *
     * @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 restart();

    /**
     * Restarts all nodes in the cluster.
     *
     * @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 restart(Context context);

    /**
     * Starts stopped compute on all cluster nodes.
     *
     * @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 start();

    /**
     * Starts stopped compute on all cluster nodes.
     *
     * @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 start(Context context);

    /**
     * Stops compute on all cluster nodes.
     *
     * @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 stop();

    /**
     * Stops compute on all cluster nodes.
     *
     * @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 stop(Context context);

    /**
     * Promotes read replica cluster to an independent read-write cluster.
     *
     * @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 promoteReadReplica();

    /**
     * Promotes read replica cluster to an independent read-write cluster.
     *
     * @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 promoteReadReplica(Context context);
}
