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

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner;
import java.util.Map;

/** An immutable client-side representation of ServiceResource. */
public interface ServiceResource {
    /**
     * 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 properties property: Service properties.
     *
     * @return the properties value.
     */
    ServiceResponseBase properties();

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

    /**
     * Gets the sku property: The sku of the workspace.
     *
     * @return the sku value.
     */
    Sku sku();

    /**
     * Gets the systemData property: Read only system data.
     *
     * @return the systemData value.
     */
    SystemData systemData();

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

    /** The entirety of the ServiceResource definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The ServiceResource definition stages. */
    interface DefinitionStages {
        /** The first stage of the ServiceResource definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the ServiceResource definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, workspaceName.
             *
             * @param resourceGroupName Name of the resource group in which workspace is located.
             * @param workspaceName Name of Azure Machine Learning workspace.
             * @return the next definition stage.
             */
            WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName);
        }
        /**
         * The stage of the ServiceResource 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,
                DefinitionStages.WithDescription,
                DefinitionStages.WithKvTags,
                DefinitionStages.WithProperties,
                DefinitionStages.WithKeys,
                DefinitionStages.WithEnvironmentImageRequest {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            ServiceResource create();

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

            /**
             * Specifies the region for the resource.
             *
             * @param location The name of the Azure location/region.
             * @return the next definition stage.
             */
            WithCreate withRegion(String location);
        }
        /** The stage of the ServiceResource definition allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: The description of the service..
             *
             * @param description The description of the service.
             * @return the next definition stage.
             */
            WithCreate withDescription(String description);
        }
        /** The stage of the ServiceResource definition allowing to specify kvTags. */
        interface WithKvTags {
            /**
             * Specifies the kvTags property: The service tag dictionary. Tags are mutable..
             *
             * @param kvTags The service tag dictionary. Tags are mutable.
             * @return the next definition stage.
             */
            WithCreate withKvTags(Map<String, String> kvTags);
        }
        /** The stage of the ServiceResource definition allowing to specify properties. */
        interface WithProperties {
            /**
             * Specifies the properties property: The service properties dictionary. Properties are immutable..
             *
             * @param properties The service properties dictionary. Properties are immutable.
             * @return the next definition stage.
             */
            WithCreate withProperties(Map<String, String> properties);
        }
        /** The stage of the ServiceResource definition allowing to specify keys. */
        interface WithKeys {
            /**
             * Specifies the keys property: The authentication keys..
             *
             * @param keys The authentication keys.
             * @return the next definition stage.
             */
            WithCreate withKeys(CreateServiceRequestKeys keys);
        }
        /** The stage of the ServiceResource definition allowing to specify environmentImageRequest. */
        interface WithEnvironmentImageRequest {
            /**
             * Specifies the environmentImageRequest property: The Environment, models and assets needed for
             * inferencing..
             *
             * @param environmentImageRequest The Environment, models and assets needed for inferencing.
             * @return the next definition stage.
             */
            WithCreate withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest);
        }
    }
    /**
     * Begins update for the ServiceResource resource.
     *
     * @return the stage of resource update.
     */
    ServiceResource.Update update();

    /** The template for ServiceResource update. */
    interface Update
        extends UpdateStages.WithDescription,
            UpdateStages.WithKvTags,
            UpdateStages.WithProperties,
            UpdateStages.WithKeys,
            UpdateStages.WithEnvironmentImageRequest {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        ServiceResource apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        ServiceResource apply(Context context);
    }
    /** The ServiceResource update stages. */
    interface UpdateStages {
        /** The stage of the ServiceResource update allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: The description of the service..
             *
             * @param description The description of the service.
             * @return the next definition stage.
             */
            Update withDescription(String description);
        }
        /** The stage of the ServiceResource update allowing to specify kvTags. */
        interface WithKvTags {
            /**
             * Specifies the kvTags property: The service tag dictionary. Tags are mutable..
             *
             * @param kvTags The service tag dictionary. Tags are mutable.
             * @return the next definition stage.
             */
            Update withKvTags(Map<String, String> kvTags);
        }
        /** The stage of the ServiceResource update allowing to specify properties. */
        interface WithProperties {
            /**
             * Specifies the properties property: The service properties dictionary. Properties are immutable..
             *
             * @param properties The service properties dictionary. Properties are immutable.
             * @return the next definition stage.
             */
            Update withProperties(Map<String, String> properties);
        }
        /** The stage of the ServiceResource update allowing to specify keys. */
        interface WithKeys {
            /**
             * Specifies the keys property: The authentication keys..
             *
             * @param keys The authentication keys.
             * @return the next definition stage.
             */
            Update withKeys(CreateServiceRequestKeys keys);
        }
        /** The stage of the ServiceResource update allowing to specify environmentImageRequest. */
        interface WithEnvironmentImageRequest {
            /**
             * Specifies the environmentImageRequest property: The Environment, models and assets needed for
             * inferencing..
             *
             * @param environmentImageRequest The Environment, models and assets needed for inferencing.
             * @return the next definition stage.
             */
            Update withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    ServiceResource refresh();

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