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

package com.azure.resourcemanager.networkcloud.models;

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

/** An immutable client-side representation of StorageAppliance. */
public interface StorageAppliance {
    /**
     * 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 extendedLocation property: ExtendedLocation represents the Azure custom location where the resource will
     * be created.
     *
     * <p>The extended location of the cluster associated with the resource.
     *
     * @return the extendedLocation value.
     */
    ExtendedLocation extendedLocation();

    /**
     * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the administratorCredentials property: AdministrativeCredentials represents the admin credentials for the
     * device requiring password-based authentication.
     *
     * <p>The credentials of the administrative interface on this storage appliance.
     *
     * @return the administratorCredentials value.
     */
    AdministrativeCredentials administratorCredentials();

    /**
     * Gets the capacity property: The total capacity of the storage appliance.
     *
     * @return the capacity value.
     */
    Long capacity();

    /**
     * Gets the capacityUsed property: The amount of storage consumed.
     *
     * @return the capacityUsed value.
     */
    Long capacityUsed();

    /**
     * Gets the clusterId property: The resource ID of the cluster this storage appliance is associated with.
     *
     * @return the clusterId value.
     */
    String clusterId();

    /**
     * Gets the detailedStatus property: The detailed status of the storage appliance.
     *
     * @return the detailedStatus value.
     */
    StorageApplianceDetailedStatus detailedStatus();

    /**
     * Gets the detailedStatusMessage property: The descriptive message about the current detailed status.
     *
     * @return the detailedStatusMessage value.
     */
    String detailedStatusMessage();

    /**
     * Gets the managementIpv4Address property: The endpoint for the management interface of the storage appliance.
     *
     * @return the managementIpv4Address value.
     */
    String managementIpv4Address();

    /**
     * Gets the provisioningState property: The provisioning state of the storage appliance.
     *
     * @return the provisioningState value.
     */
    StorageApplianceProvisioningState provisioningState();

    /**
     * Gets the rackId property: The resource ID of the rack where this storage appliance resides.
     *
     * @return the rackId value.
     */
    String rackId();

    /**
     * Gets the rackSlot property: The slot the storage appliance is in the rack based on the BOM configuration.
     *
     * @return the rackSlot value.
     */
    long rackSlot();

    /**
     * Gets the remoteVendorManagementFeature property: The indicator of whether the storage appliance supports remote
     * vendor management.
     *
     * @return the remoteVendorManagementFeature value.
     */
    RemoteVendorManagementFeature remoteVendorManagementFeature();

    /**
     * Gets the remoteVendorManagementStatus property: The indicator of whether the remote vendor management feature is
     * enabled or disabled, or unsupported if it is an unsupported feature.
     *
     * @return the remoteVendorManagementStatus value.
     */
    RemoteVendorManagementStatus remoteVendorManagementStatus();

    /**
     * Gets the serialNumber property: The serial number for the storage appliance.
     *
     * @return the serialNumber value.
     */
    String serialNumber();

    /**
     * Gets the storageApplianceSkuId property: The SKU for the storage appliance.
     *
     * @return the storageApplianceSkuId value.
     */
    String storageApplianceSkuId();

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

    /** The entirety of the StorageAppliance definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithExtendedLocation,
            DefinitionStages.WithAdministratorCredentials,
            DefinitionStages.WithRackId,
            DefinitionStages.WithRackSlot,
            DefinitionStages.WithSerialNumber,
            DefinitionStages.WithStorageApplianceSkuId,
            DefinitionStages.WithCreate {
    }
    /** The StorageAppliance definition stages. */
    interface DefinitionStages {
        /** The first stage of the StorageAppliance definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the StorageAppliance 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 StorageAppliance definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @return the next definition stage.
             */
            WithExtendedLocation withExistingResourceGroup(String resourceGroupName);
        }
        /** The stage of the StorageAppliance definition allowing to specify extendedLocation. */
        interface WithExtendedLocation {
            /**
             * Specifies the extendedLocation property: ExtendedLocation represents the Azure custom location where the
             * resource will be created.
             *
             * <p>The extended location of the cluster associated with the resource..
             *
             * @param extendedLocation ExtendedLocation represents the Azure custom location where the resource will be
             *     created.
             *     <p>The extended location of the cluster associated with the resource.
             * @return the next definition stage.
             */
            WithAdministratorCredentials withExtendedLocation(ExtendedLocation extendedLocation);
        }
        /** The stage of the StorageAppliance definition allowing to specify administratorCredentials. */
        interface WithAdministratorCredentials {
            /**
             * Specifies the administratorCredentials property: AdministrativeCredentials represents the admin
             * credentials for the device requiring password-based authentication.
             *
             * <p>The credentials of the administrative interface on this storage appliance..
             *
             * @param administratorCredentials AdministrativeCredentials represents the admin credentials for the device
             *     requiring password-based authentication.
             *     <p>The credentials of the administrative interface on this storage appliance.
             * @return the next definition stage.
             */
            WithRackId withAdministratorCredentials(AdministrativeCredentials administratorCredentials);
        }
        /** The stage of the StorageAppliance definition allowing to specify rackId. */
        interface WithRackId {
            /**
             * Specifies the rackId property: The resource ID of the rack where this storage appliance resides..
             *
             * @param rackId The resource ID of the rack where this storage appliance resides.
             * @return the next definition stage.
             */
            WithRackSlot withRackId(String rackId);
        }
        /** The stage of the StorageAppliance definition allowing to specify rackSlot. */
        interface WithRackSlot {
            /**
             * Specifies the rackSlot property: The slot the storage appliance is in the rack based on the BOM
             * configuration..
             *
             * @param rackSlot The slot the storage appliance is in the rack based on the BOM configuration.
             * @return the next definition stage.
             */
            WithSerialNumber withRackSlot(long rackSlot);
        }
        /** The stage of the StorageAppliance definition allowing to specify serialNumber. */
        interface WithSerialNumber {
            /**
             * Specifies the serialNumber property: The serial number for the storage appliance..
             *
             * @param serialNumber The serial number for the storage appliance.
             * @return the next definition stage.
             */
            WithStorageApplianceSkuId withSerialNumber(String serialNumber);
        }
        /** The stage of the StorageAppliance definition allowing to specify storageApplianceSkuId. */
        interface WithStorageApplianceSkuId {
            /**
             * Specifies the storageApplianceSkuId property: The SKU for the storage appliance..
             *
             * @param storageApplianceSkuId The SKU for the storage appliance.
             * @return the next definition stage.
             */
            WithCreate withStorageApplianceSkuId(String storageApplianceSkuId);
        }
        /**
         * The stage of the StorageAppliance 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.
             */
            StorageAppliance create();

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

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

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        StorageAppliance apply(Context context);
    }
    /** The StorageAppliance update stages. */
    interface UpdateStages {
        /** The stage of the StorageAppliance update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: The Azure resource tags that will replace the existing ones..
             *
             * @param tags The Azure resource tags that will replace the existing ones.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the StorageAppliance update allowing to specify serialNumber. */
        interface WithSerialNumber {
            /**
             * Specifies the serialNumber property: The serial number for the storage appliance..
             *
             * @param serialNumber The serial number for the storage appliance.
             * @return the next definition stage.
             */
            Update withSerialNumber(String serialNumber);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    StorageAppliance refresh();

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

    /**
     * Turn off remote vendor management for a storage appliance, if supported.
     *
     * <p>Disable remote vendor management of the provided storage appliance.
     *
     * @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.
     */
    void disableRemoteVendorManagement();

    /**
     * Turn off remote vendor management for a storage appliance, if supported.
     *
     * <p>Disable remote vendor management of the provided storage appliance.
     *
     * @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.
     */
    void disableRemoteVendorManagement(Context context);

    /**
     * Turn on remote vendor management for a storage appliance, if supported.
     *
     * <p>Enable remote vendor management of the provided storage appliance.
     *
     * @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.
     */
    void enableRemoteVendorManagement();

    /**
     * Turn on remote vendor management for a storage appliance, if supported.
     *
     * <p>Enable remote vendor management of the provided storage appliance.
     *
     * @param storageApplianceEnableRemoteVendorManagementParameters The request body.
     * @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.
     */
    void enableRemoteVendorManagement(
        StorageApplianceEnableRemoteVendorManagementParameters storageApplianceEnableRemoteVendorManagementParameters,
        Context context);

    /**
     * Retrieve output from read-only commands exercised against a storage appliance.
     *
     * <p>Run and retrieve output from read only commands on the provided storage appliance.
     *
     * @param storageApplianceRunReadCommandsParameters The request body.
     * @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.
     */
    void runReadCommands(StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters);

    /**
     * Retrieve output from read-only commands exercised against a storage appliance.
     *
     * <p>Run and retrieve output from read only commands on the provided storage appliance.
     *
     * @param storageApplianceRunReadCommandsParameters The request body.
     * @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.
     */
    void runReadCommands(
        StorageApplianceRunReadCommandsParameters storageApplianceRunReadCommandsParameters, Context context);
}
