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

package com.azure.resourcemanager.devspaces.models;

import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.devspaces.fluent.models.ControllerInner;
import java.util.Map;

/** An immutable client-side representation of Controller. */
public interface Controller {
    /**
     * 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: Model representing SKU for Azure Dev Spaces Controller.
     *
     * @return the sku value.
     */
    Sku sku();

    /**
     * Gets the provisioningState property: Provisioning state of the Azure Dev Spaces Controller.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the hostSuffix property: DNS suffix for public endpoints running in the Azure Dev Spaces Controller.
     *
     * @return the hostSuffix value.
     */
    String hostSuffix();

    /**
     * Gets the dataPlaneFqdn property: DNS name for accessing DataPlane services.
     *
     * @return the dataPlaneFqdn value.
     */
    String dataPlaneFqdn();

    /**
     * Gets the targetContainerHostApiServerFqdn property: DNS of the target container host's API server.
     *
     * @return the targetContainerHostApiServerFqdn value.
     */
    String targetContainerHostApiServerFqdn();

    /**
     * Gets the targetContainerHostResourceId property: Resource ID of the target container host.
     *
     * @return the targetContainerHostResourceId value.
     */
    String targetContainerHostResourceId();

    /**
     * Gets the targetContainerHostCredentialsBase64 property: Credentials of the target container host (base64).
     *
     * @return the targetContainerHostCredentialsBase64 value.
     */
    String targetContainerHostCredentialsBase64();

    /**
     * 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.devspaces.fluent.models.ControllerInner object.
     *
     * @return the inner object.
     */
    ControllerInner innerModel();

    /** The entirety of the Controller definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithSku,
            DefinitionStages.WithTargetContainerHostResourceId,
            DefinitionStages.WithTargetContainerHostCredentialsBase64,
            DefinitionStages.WithCreate {
    }
    /** The Controller definition stages. */
    interface DefinitionStages {
        /** The first stage of the Controller definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the Controller 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 Controller definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName Resource group to which the resource belongs.
             * @return the next definition stage.
             */
            WithSku withExistingResourceGroup(String resourceGroupName);
        }
        /** The stage of the Controller definition allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: Model representing SKU for Azure Dev Spaces Controller..
             *
             * @param sku Model representing SKU for Azure Dev Spaces Controller.
             * @return the next definition stage.
             */
            WithTargetContainerHostResourceId withSku(Sku sku);
        }
        /** The stage of the Controller definition allowing to specify targetContainerHostResourceId. */
        interface WithTargetContainerHostResourceId {
            /**
             * Specifies the targetContainerHostResourceId property: Resource ID of the target container host.
             *
             * @param targetContainerHostResourceId Resource ID of the target container host.
             * @return the next definition stage.
             */
            WithTargetContainerHostCredentialsBase64 withTargetContainerHostResourceId(
                String targetContainerHostResourceId);
        }
        /** The stage of the Controller definition allowing to specify targetContainerHostCredentialsBase64. */
        interface WithTargetContainerHostCredentialsBase64 {
            /**
             * Specifies the targetContainerHostCredentialsBase64 property: Credentials of the target container host
             * (base64)..
             *
             * @param targetContainerHostCredentialsBase64 Credentials of the target container host (base64).
             * @return the next definition stage.
             */
            WithCreate withTargetContainerHostCredentialsBase64(String targetContainerHostCredentialsBase64);
        }
        /**
         * The stage of the Controller 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 {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            Controller create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Controller create(Context context);
        }
        /** The stage of the Controller 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);
        }
    }
    /**
     * Begins update for the Controller resource.
     *
     * @return the stage of resource update.
     */
    Controller.Update update();

    /** The template for Controller update. */
    interface Update extends UpdateStages.WithTags, UpdateStages.WithTargetContainerHostCredentialsBase64 {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        Controller apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        Controller apply(Context context);
    }
    /** The Controller update stages. */
    interface UpdateStages {
        /** The stage of the Controller update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Tags for the Azure Dev Spaces Controller..
             *
             * @param tags Tags for the Azure Dev Spaces Controller.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the Controller update allowing to specify targetContainerHostCredentialsBase64. */
        interface WithTargetContainerHostCredentialsBase64 {
            /**
             * Specifies the targetContainerHostCredentialsBase64 property: Credentials of the target container host
             * (base64)..
             *
             * @param targetContainerHostCredentialsBase64 Credentials of the target container host (base64).
             * @return the next definition stage.
             */
            Update withTargetContainerHostCredentialsBase64(String targetContainerHostCredentialsBase64);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    Controller refresh();

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

    /**
     * Lists connection details for an Azure Dev Spaces Controller.
     *
     * <p>Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
     *
     * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller.
     * @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 response body along with {@link Response}.
     */
    Response<ControllerConnectionDetailsList> listConnectionDetailsWithResponse(
        ListConnectionDetailsParameters listConnectionDetailsParameters, Context context);

    /**
     * Lists connection details for an Azure Dev Spaces Controller.
     *
     * <p>Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
     *
     * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller.
     * @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 response.
     */
    ControllerConnectionDetailsList listConnectionDetails(
        ListConnectionDetailsParameters listConnectionDetailsParameters);
}
