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

package com.azure.resourcemanager.sphere.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner;
import com.azure.resourcemanager.sphere.fluent.models.ImageInner;
import java.time.OffsetDateTime;
import java.util.List;

/** An immutable client-side representation of Deployment. */
public interface Deployment {
    /**
     * 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 deploymentId property: Deployment ID.
     *
     * @return the deploymentId value.
     */
    String deploymentId();

    /**
     * Gets the deployedImages property: Images deployed.
     *
     * @return the deployedImages value.
     */
    List<Image> deployedImages();

    /**
     * Gets the deploymentDateUtc property: Deployment date UTC.
     *
     * @return the deploymentDateUtc value.
     */
    OffsetDateTime deploymentDateUtc();

    /**
     * Gets the provisioningState property: The status of the last operation.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.sphere.fluent.models.DeploymentInner object.
     *
     * @return the inner object.
     */
    DeploymentInner innerModel();

    /** The entirety of the Deployment definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }

    /** The Deployment definition stages. */
    interface DefinitionStages {
        /** The first stage of the Deployment definition. */
        interface Blank extends WithParentResource {
        }

        /** The stage of the Deployment definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, catalogName, productName, deviceGroupName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param catalogName Name of catalog.
             * @param productName Name of product.
             * @param deviceGroupName Name of device group.
             * @return the next definition stage.
             */
            WithCreate withExistingDeviceGroup(
                String resourceGroupName, String catalogName, String productName, String deviceGroupName);
        }

        /**
         * The stage of the Deployment 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.WithDeploymentId, DefinitionStages.WithDeployedImages {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            Deployment create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            Deployment create(Context context);
        }

        /** The stage of the Deployment definition allowing to specify deploymentId. */
        interface WithDeploymentId {
            /**
             * Specifies the deploymentId property: Deployment ID.
             *
             * @param deploymentId Deployment ID.
             * @return the next definition stage.
             */
            WithCreate withDeploymentId(String deploymentId);
        }

        /** The stage of the Deployment definition allowing to specify deployedImages. */
        interface WithDeployedImages {
            /**
             * Specifies the deployedImages property: Images deployed.
             *
             * @param deployedImages Images deployed.
             * @return the next definition stage.
             */
            WithCreate withDeployedImages(List<ImageInner> deployedImages);
        }
    }

    /**
     * Begins update for the Deployment resource.
     *
     * @return the stage of resource update.
     */
    Deployment.Update update();

    /** The template for Deployment update. */
    interface Update {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        Deployment apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        Deployment apply(Context context);
    }

    /** The Deployment update stages. */
    interface UpdateStages {
    }

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    Deployment refresh();

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