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

package com.azure.resourcemanager.iotcentral.models;

import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.iotcentral.fluent.models.AppInner;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of App. */
public interface App {
    /**
     * 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: A valid instance SKU.
     *
     * @return the sku value.
     */
    AppSkuInfo sku();

    /**
     * Gets the identity property: The managed identities for the IoT Central application.
     *
     * @return the identity value.
     */
    SystemAssignedServiceIdentity identity();

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

    /**
     * Gets the applicationId property: The ID of the application.
     *
     * @return the applicationId value.
     */
    String applicationId();

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

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

    /**
     * Gets the template property: The ID of the application template, which is a blueprint that defines the
     * characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and
     * allows the application to be defined from scratch.
     *
     * @return the template value.
     */
    String template();

    /**
     * Gets the state property: The current state of the application.
     *
     * @return the state value.
     */
    AppState state();

    /**
     * Gets the publicNetworkAccess property: Whether requests from the public network are allowed.
     *
     * @return the publicNetworkAccess value.
     */
    PublicNetworkAccess publicNetworkAccess();

    /**
     * Gets the networkRuleSets property: Network Rule Set Properties of this IoT Central application.
     *
     * @return the networkRuleSets value.
     */
    NetworkRuleSets networkRuleSets();

    /**
     * Gets the privateEndpointConnections property: Private endpoint connections created on this IoT Central
     * application.
     *
     * @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 inner com.azure.resourcemanager.iotcentral.fluent.models.AppInner object.
     *
     * @return the inner object.
     */
    AppInner innerModel();

    /** The entirety of the App definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithSku,
            DefinitionStages.WithCreate {
    }
    /** The App definition stages. */
    interface DefinitionStages {
        /** The first stage of the App definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the App 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 App definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the resource group that contains the IoT Central application.
             * @return the next definition stage.
             */
            WithSku withExistingResourceGroup(String resourceGroupName);
        }
        /** The stage of the App definition allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: A valid instance SKU..
             *
             * @param sku A valid instance SKU.
             * @return the next definition stage.
             */
            WithCreate withSku(AppSkuInfo sku);
        }
        /**
         * The stage of the App 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.WithIdentity,
                DefinitionStages.WithDisplayName,
                DefinitionStages.WithSubdomain,
                DefinitionStages.WithTemplate,
                DefinitionStages.WithPublicNetworkAccess,
                DefinitionStages.WithNetworkRuleSets {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            App create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            App create(Context context);
        }
        /** The stage of the App 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 App definition allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The managed identities for the IoT Central application..
             *
             * @param identity The managed identities for the IoT Central application.
             * @return the next definition stage.
             */
            WithCreate withIdentity(SystemAssignedServiceIdentity identity);
        }
        /** The stage of the App definition allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: The display name of the application..
             *
             * @param displayName The display name of the application.
             * @return the next definition stage.
             */
            WithCreate withDisplayName(String displayName);
        }
        /** The stage of the App definition allowing to specify subdomain. */
        interface WithSubdomain {
            /**
             * Specifies the subdomain property: The subdomain of the application..
             *
             * @param subdomain The subdomain of the application.
             * @return the next definition stage.
             */
            WithCreate withSubdomain(String subdomain);
        }
        /** The stage of the App definition allowing to specify template. */
        interface WithTemplate {
            /**
             * Specifies the template property: The ID of the application template, which is a blueprint that defines
             * the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank
             * blueprint and allows the application to be defined from scratch..
             *
             * @param template The ID of the application template, which is a blueprint that defines the characteristics
             *     and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows
             *     the application to be defined from scratch.
             * @return the next definition stage.
             */
            WithCreate withTemplate(String template);
        }
        /** The stage of the App definition allowing to specify publicNetworkAccess. */
        interface WithPublicNetworkAccess {
            /**
             * Specifies the publicNetworkAccess property: Whether requests from the public network are allowed..
             *
             * @param publicNetworkAccess Whether requests from the public network are allowed.
             * @return the next definition stage.
             */
            WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess);
        }
        /** The stage of the App definition allowing to specify networkRuleSets. */
        interface WithNetworkRuleSets {
            /**
             * Specifies the networkRuleSets property: Network Rule Set Properties of this IoT Central application..
             *
             * @param networkRuleSets Network Rule Set Properties of this IoT Central application.
             * @return the next definition stage.
             */
            WithCreate withNetworkRuleSets(NetworkRuleSets networkRuleSets);
        }
    }
    /**
     * Begins update for the App resource.
     *
     * @return the stage of resource update.
     */
    App.Update update();

    /** The template for App update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithSku,
            UpdateStages.WithIdentity,
            UpdateStages.WithDisplayName,
            UpdateStages.WithSubdomain,
            UpdateStages.WithPublicNetworkAccess,
            UpdateStages.WithNetworkRuleSets {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        App apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        App apply(Context context);
    }
    /** The App update stages. */
    interface UpdateStages {
        /** The stage of the App 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 App update allowing to specify sku. */
        interface WithSku {
            /**
             * Specifies the sku property: A valid instance SKU..
             *
             * @param sku A valid instance SKU.
             * @return the next definition stage.
             */
            Update withSku(AppSkuInfo sku);
        }
        /** The stage of the App update allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The managed identities for the IoT Central application..
             *
             * @param identity The managed identities for the IoT Central application.
             * @return the next definition stage.
             */
            Update withIdentity(SystemAssignedServiceIdentity identity);
        }
        /** The stage of the App update allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: The display name of the application..
             *
             * @param displayName The display name of the application.
             * @return the next definition stage.
             */
            Update withDisplayName(String displayName);
        }
        /** The stage of the App update allowing to specify subdomain. */
        interface WithSubdomain {
            /**
             * Specifies the subdomain property: The subdomain of the application..
             *
             * @param subdomain The subdomain of the application.
             * @return the next definition stage.
             */
            Update withSubdomain(String subdomain);
        }
        /** The stage of the App update allowing to specify publicNetworkAccess. */
        interface WithPublicNetworkAccess {
            /**
             * Specifies the publicNetworkAccess property: Whether requests from the public network are allowed..
             *
             * @param publicNetworkAccess Whether requests from the public network are allowed.
             * @return the next definition stage.
             */
            Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess);
        }
        /** The stage of the App update allowing to specify networkRuleSets. */
        interface WithNetworkRuleSets {
            /**
             * Specifies the networkRuleSets property: Network Rule Set Properties of this IoT Central application..
             *
             * @param networkRuleSets Network Rule Set Properties of this IoT Central application.
             * @return the next definition stage.
             */
            Update withNetworkRuleSets(NetworkRuleSets networkRuleSets);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    App refresh();

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