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

package com.azure.resourcemanager.redisenterprise.models;

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

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

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

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

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

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

    /**
     * Gets the sku property: The SKU to create, which affects price, performance, and features.
     *
     * @return the sku value.
     */
    Sku sku();

    /**
     * Gets the zones property: The Availability Zones where this cluster will be deployed.
     *
     * @return the zones value.
     */
    List<String> zones();

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

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

    /**
     * Gets the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
     *
     * @return the minimumTlsVersion value.
     */
    TlsVersion minimumTlsVersion();

    /**
     * Gets the encryption property: Encryption-at-rest configuration for the cluster.
     *
     * @return the encryption value.
     */
    ClusterPropertiesEncryption encryption();

    /**
     * Gets the hostname property: DNS name of the cluster endpoint.
     *
     * @return the hostname value.
     */
    String hostname();

    /**
     * Gets the provisioningState property: Current provisioning status of the cluster.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the resourceState property: Current resource status of the cluster.
     *
     * @return the resourceState value.
     */
    ResourceState resourceState();

    /**
     * Gets the redisVersion property: Version of redis the cluster supports, e.g. '6'.
     *
     * @return the redisVersion value.
     */
    String redisVersion();

    /**
     * Gets the privateEndpointConnections property: List of private endpoint connections associated with the specified
     * RedisEnterprise cluster.
     *
     * @return the privateEndpointConnections value.
     */
    List<PrivateEndpointConnection> 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.redisenterprise.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.WithSku,
            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.
             */
            WithSku withExistingResourceGroup(String resourceGroupName);
        }
        /** The stage of the Cluster definition allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: The SKU to create, which affects price, performance, and features..
             *
             * @param sku The SKU to create, which affects price, performance, and features.
             * @return the next definition stage.
             */
            WithCreate withSku(Sku sku);
        }
        /**
         * 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.WithZones,
                DefinitionStages.WithIdentity,
                DefinitionStages.WithMinimumTlsVersion,
                DefinitionStages.WithEncryption {
            /**
             * 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 zones. */
        interface WithZones {
            /**
             * Specifies the zones property: The Availability Zones where this cluster will be deployed..
             *
             * @param zones The Availability Zones where this cluster will be deployed.
             * @return the next definition stage.
             */
            WithCreate withZones(List<String> zones);
        }
        /** The stage of the Cluster definition allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The identity of the resource..
             *
             * @param identity The identity of the resource.
             * @return the next definition stage.
             */
            WithCreate withIdentity(ManagedServiceIdentity identity);
        }
        /** The stage of the Cluster definition allowing to specify minimumTlsVersion. */
        interface WithMinimumTlsVersion {
            /**
             * Specifies the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
             *
             * @param minimumTlsVersion The minimum TLS version for the cluster to support, e.g. '1.2'.
             * @return the next definition stage.
             */
            WithCreate withMinimumTlsVersion(TlsVersion minimumTlsVersion);
        }
        /** The stage of the Cluster definition allowing to specify encryption. */
        interface WithEncryption {
            /**
             * Specifies the encryption property: Encryption-at-rest configuration for the cluster..
             *
             * @param encryption Encryption-at-rest configuration for the cluster.
             * @return the next definition stage.
             */
            WithCreate withEncryption(ClusterPropertiesEncryption encryption);
        }
    }
    /**
     * 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.WithSku,
            UpdateStages.WithIdentity,
            UpdateStages.WithMinimumTlsVersion,
            UpdateStages.WithEncryption {
        /**
         * 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: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the Cluster update allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: The SKU to create, which affects price, performance, and features..
             *
             * @param sku The SKU to create, which affects price, performance, and features.
             * @return the next definition stage.
             */
            Update withSku(Sku sku);
        }
        /** The stage of the Cluster update allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The identity of the resource..
             *
             * @param identity The identity of the resource.
             * @return the next definition stage.
             */
            Update withIdentity(ManagedServiceIdentity identity);
        }
        /** The stage of the Cluster update allowing to specify minimumTlsVersion. */
        interface WithMinimumTlsVersion {
            /**
             * Specifies the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
             *
             * @param minimumTlsVersion The minimum TLS version for the cluster to support, e.g. '1.2'.
             * @return the next definition stage.
             */
            Update withMinimumTlsVersion(TlsVersion minimumTlsVersion);
        }
        /** The stage of the Cluster update allowing to specify encryption. */
        interface WithEncryption {
            /**
             * Specifies the encryption property: Encryption-at-rest configuration for the cluster..
             *
             * @param encryption Encryption-at-rest configuration for the cluster.
             * @return the next definition stage.
             */
            Update withEncryption(ClusterPropertiesEncryption encryption);
        }
    }
    /**
     * 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);
}
