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

package com.azure.resourcemanager.appconfiguration.models;

import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.appconfiguration.fluent.models.ReplicaInner;

/** An immutable client-side representation of Replica. */
public interface Replica {
    /**
     * 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 location of the replica.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the systemData property: Resource system metadata.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the endpoint property: The URI of the replica where the replica API will be available.
     *
     * @return the endpoint value.
     */
    String endpoint();

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

    /**
     * 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 inner com.azure.resourcemanager.appconfiguration.fluent.models.ReplicaInner object.
     *
     * @return the inner object.
     */
    ReplicaInner innerModel();

    /** The entirety of the Replica definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The Replica definition stages. */
    interface DefinitionStages {
        /** The first stage of the Replica definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the Replica definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, configStoreName.
             *
             * @param resourceGroupName The name of the resource group to which the container registry belongs.
             * @param configStoreName The name of the configuration store.
             * @return the next definition stage.
             */
            WithCreate withExistingConfigurationStore(String resourceGroupName, String configStoreName);
        }
        /**
         * The stage of the Replica 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.WithLocation {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            Replica create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Replica create(Context context);
        }
        /** The stage of the Replica definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The location of the replica.
             * @return the next definition stage.
             */
            WithCreate withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The location of the replica.
             * @return the next definition stage.
             */
            WithCreate withRegion(String location);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    Replica refresh();

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