diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md index 1f3065c5c4d0d..0a30adf64db7a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2024-06-04) + +- Azure Resource Manager AzureStackHci client library for Java. This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-2024-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md index 08f0b785e7342..08e59d8ce46f2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/README.md @@ -2,7 +2,7 @@ Azure Resource Manager AzureStackHci client library for Java. -This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-preview-2023-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for AzureStackHci Management SDK. Azure Stack HCI management service. Package tag package-2024-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-azurestackhci - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md index 232130de49e50..c402bc760337e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/SAMPLE.md @@ -1,6 +1,54 @@ # Code snippets and samples +## ArcSettings + +- [ConsentAndInstallDefaultExtensions](#arcsettings_consentandinstalldefaultextensions) +- [Create](#arcsettings_create) +- [CreateIdentity](#arcsettings_createidentity) +- [Delete](#arcsettings_delete) +- [GeneratePassword](#arcsettings_generatepassword) +- [Get](#arcsettings_get) +- [InitializeDisableProcess](#arcsettings_initializedisableprocess) +- [ListByCluster](#arcsettings_listbycluster) +- [Update](#arcsettings_update) + +## Clusters + +- [Create](#clusters_create) +- [CreateIdentity](#clusters_createidentity) +- [Delete](#clusters_delete) +- [ExtendSoftwareAssuranceBenefit](#clusters_extendsoftwareassurancebenefit) +- [GetByResourceGroup](#clusters_getbyresourcegroup) +- [List](#clusters_list) +- [ListByResourceGroup](#clusters_listbyresourcegroup) +- [Update](#clusters_update) +- [UploadCertificate](#clusters_uploadcertificate) + +## DeploymentSettings + +- [CreateOrUpdate](#deploymentsettings_createorupdate) +- [Delete](#deploymentsettings_delete) +- [Get](#deploymentsettings_get) +- [ListByClusters](#deploymentsettings_listbyclusters) + +## EdgeDevices + +- [CreateOrUpdate](#edgedevices_createorupdate) +- [Delete](#edgedevices_delete) +- [Get](#edgedevices_get) +- [List](#edgedevices_list) +- [Validate](#edgedevices_validate) + +## Extensions + +- [Create](#extensions_create) +- [Delete](#extensions_delete) +- [Get](#extensions_get) +- [ListByArcSetting](#extensions_listbyarcsetting) +- [Update](#extensions_update) +- [Upgrade](#extensions_upgrade) + ## GalleryImagesOperation - [CreateOrUpdate](#galleryimagesoperation_createorupdate) @@ -52,10 +100,33 @@ - [ListByResourceGroup](#networkinterfacesoperation_listbyresourcegroup) - [Update](#networkinterfacesoperation_update) +## Offers + +- [Get](#offers_get) +- [ListByCluster](#offers_listbycluster) +- [ListByPublisher](#offers_listbypublisher) + ## Operations - [List](#operations_list) +## Publishers + +- [Get](#publishers_get) +- [ListByCluster](#publishers_listbycluster) + +## SecuritySettings + +- [CreateOrUpdate](#securitysettings_createorupdate) +- [Delete](#securitysettings_delete) +- [Get](#securitysettings_get) +- [ListByClusters](#securitysettings_listbyclusters) + +## Skus + +- [Get](#skus_get) +- [ListByOffer](#skus_listbyoffer) + ## StorageContainersOperation - [CreateOrUpdate](#storagecontainersoperation_createorupdate) @@ -65,6 +136,28 @@ - [ListByResourceGroup](#storagecontainersoperation_listbyresourcegroup) - [Update](#storagecontainersoperation_update) +## UpdateRuns + +- [Delete](#updateruns_delete) +- [Get](#updateruns_get) +- [List](#updateruns_list) +- [Put](#updateruns_put) + +## UpdateSummariesOperation + +- [Delete](#updatesummariesoperation_delete) +- [Get](#updatesummariesoperation_get) +- [List](#updatesummariesoperation_list) +- [Put](#updatesummariesoperation_put) + +## Updates + +- [Delete](#updates_delete) +- [Get](#updates_get) +- [List](#updates_list) +- [Post](#updates_post) +- [Put](#updates_put) + ## VirtualHardDisksOperation - [CreateOrUpdate](#virtualharddisksoperation_createorupdate) @@ -84,147 +177,416 @@ - [Start](#virtualmachineinstances_start) - [Stop](#virtualmachineinstances_stop) - [Update](#virtualmachineinstances_update) -### GalleryImagesOperation_CreateOrUpdate +### ArcSettings_ConsentAndInstallDefaultExtensions ```java -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; -import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; +/** + * Samples for ArcSettings ConsentAndInstallDefaultExtensions. + */ +public final class ArcSettingsConsentAndInstallDefaultExtensionsSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ConsentAndInstallDefaultExtensions.json + */ + /** + * Sample code: Consent And Install Default Extensions. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + consentAndInstallDefaultExtensions(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings() + .consentAndInstallDefaultExtensionsWithResponse("test-rg", "myCluster", "default", + com.azure.core.util.Context.NONE); + } +} +``` -/** Samples for GalleryImagesOperation CreateOrUpdate. */ -public final class GalleryImagesOperationCreateOrUpdateSamples { +### ArcSettings_Create + +```java +/** + * Samples for ArcSettings Create. + */ +public final class ArcSettingsCreateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutArcSetting.json */ /** - * Sample code: PutGalleryImage. - * + * Sample code: Create ArcSetting. + * * @param manager Entry point to AzureStackHciManager. */ - public static void putGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .galleryImagesOperations() - .define("test-gallery-image") - .withRegion("West US2") + public static void createArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().define("default").withExistingCluster("test-rg", "myCluster").create(); + } +} +``` + +### ArcSettings_CreateIdentity + +```java +/** + * Samples for ArcSettings CreateIdentity. + */ +public final class ArcSettingsCreateIdentitySamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/CreateArcIdentity.json + */ + /** + * Sample code: Create Arc Identity. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createArcIdentity(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().createIdentity("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### ArcSettings_Delete + +```java +/** + * Samples for ArcSettings Delete. + */ +public final class ArcSettingsDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteArcSetting.json + */ + /** + * Sample code: Delete ArcSetting. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().delete("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### ArcSettings_GeneratePassword + +```java +/** + * Samples for ArcSettings GeneratePassword. + */ +public final class ArcSettingsGeneratePasswordSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GeneratePassword.json + */ + /** + * Sample code: Generate Password. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void generatePassword(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings() + .generatePasswordWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### ArcSettings_Get + +```java +/** + * Samples for ArcSettings Get. + */ +public final class ArcSettingsGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetArcSetting.json + */ + /** + * Sample code: Get ArcSetting. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### ArcSettings_InitializeDisableProcess + +```java +/** + * Samples for ArcSettings InitializeDisableProcess. + */ +public final class ArcSettingsInitializeDisableProcessSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/InitializeDisableProcess.json + */ + /** + * Sample code: Trigger ARC Disable. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void triggerARCDisable(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings() + .initializeDisableProcess("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### ArcSettings_ListByCluster + +```java +/** + * Samples for ArcSettings ListByCluster. + */ +public final class ArcSettingsListByClusterSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListArcSettingsByCluster.json + */ + /** + * Sample code: List ArcSetting resources by HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listArcSettingResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().listByCluster("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} +``` + +### ArcSettings_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import java.io.IOException; + +/** + * Samples for ArcSettings Update. + */ +public final class ArcSettingsUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PatchArcSetting.json + */ + /** + * Sample code: Patch ArcSetting. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void patchArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) + throws IOException { + ArcSetting resource = manager.arcSettings() + .getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withConnectivityProperties(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"enabled\":true,\"serviceConfigurations\":[{\"port\":6516,\"serviceName\":\"WAC\"}]}", + Object.class, SerializerEncoding.JSON)) + .apply(); + } +} +``` + +### Clusters_Create + +```java +import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; + +/** + * Samples for Clusters Create. + */ +public final class ClustersCreateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/CreateCluster.json + */ + /** + * Sample code: Create cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .define("myCluster") + .withRegion("East US") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withContainerId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container") - .withImagePath("C:\\test.vhdx") - .withOsType(OperatingSystemTypes.LINUX) + .withTypeIdentityType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withCloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com") + .withAadClientId("24a6e53d-04e5-44d2-b7cc-1b732a847dfc") + .withAadTenantId("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94") .create(); } } ``` -### GalleryImagesOperation_Delete +### Clusters_CreateIdentity ```java -/** Samples for GalleryImagesOperation Delete. */ -public final class GalleryImagesOperationDeleteSamples { +/** + * Samples for Clusters CreateIdentity. + */ +public final class ClustersCreateIdentitySamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/CreateClusterIdentity.json */ /** - * Sample code: DeleteGalleryImage. - * + * Sample code: Create cluster Identity. + * * @param manager Entry point to AzureStackHciManager. */ - public static void deleteGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.galleryImagesOperations().delete("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE); + public static void createClusterIdentity(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().createIdentity("test-rg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### GalleryImagesOperation_GetByResourceGroup +### Clusters_Delete ```java -/** Samples for GalleryImagesOperation GetByResourceGroup. */ -public final class GalleryImagesOperationGetByResourceGroupSamples { +/** + * Samples for Clusters Delete. + */ +public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteCluster.json */ /** - * Sample code: GetGalleryImage. - * + * Sample code: Delete cluster. + * * @param manager Entry point to AzureStackHciManager. */ - public static void getGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .galleryImagesOperations() - .getByResourceGroupWithResponse("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE); + public static void deleteCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().delete("test-rg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### GalleryImagesOperation_List +### Clusters_ExtendSoftwareAssuranceBenefit ```java -/** Samples for GalleryImagesOperation List. */ -public final class GalleryImagesOperationListSamples { +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequestProperties; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; + +/** + * Samples for Clusters ExtendSoftwareAssuranceBenefit. + */ +public final class ClustersExtendSoftwareAssuranceBenefitSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListGalleryImageBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ExtendSoftwareAssuranceBenefit.json */ /** - * Sample code: ListGalleryImageBySubscription. - * + * Sample code: Create cluster Identity. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listGalleryImageBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.galleryImagesOperations().list(com.azure.core.util.Context.NONE); + public static void createClusterIdentity(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .extendSoftwareAssuranceBenefit("test-rg", "myCluster", + new SoftwareAssuranceChangeRequest().withProperties(new SoftwareAssuranceChangeRequestProperties() + .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.ENABLE)), + com.azure.core.util.Context.NONE); } } ``` -### GalleryImagesOperation_ListByResourceGroup +### Clusters_GetByResourceGroup ```java -/** Samples for GalleryImagesOperation ListByResourceGroup. */ -public final class GalleryImagesOperationListByResourceGroupSamples { +/** + * Samples for Clusters GetByResourceGroup. + */ +public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListGalleryImageByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetCluster.json */ /** - * Sample code: ListGalleryImageByResourceGroup. - * + * Sample code: Get cluster. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listGalleryImageByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.galleryImagesOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + public static void getCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().getByResourceGroupWithResponse("test-rg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### GalleryImagesOperation_Update +### Clusters_List ```java -import com.azure.resourcemanager.azurestackhci.models.GalleryImages; +/** + * Samples for Clusters List. + */ +public final class ClustersListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListClustersBySubscription.json + */ + /** + * Sample code: List clusters in a given subscription. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listClustersInAGivenSubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Clusters_ListByResourceGroup + +```java +/** + * Samples for Clusters ListByResourceGroup. + */ +public final class ClustersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListClustersByResourceGroup.json + */ + /** + * Sample code: List clusters in a given resource group. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listClustersInAGivenResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### Clusters_Update + +```java +import com.azure.resourcemanager.azurestackhci.models.Cluster; +import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; +import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; +import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; import java.util.HashMap; import java.util.Map; -/** Samples for GalleryImagesOperation Update. */ -public final class GalleryImagesOperationUpdateSamples { +/** + * Samples for Clusters Update. + */ +public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateCluster.json */ /** - * Sample code: UpdateGalleryImage. - * + * Sample code: Update cluster. + * * @param manager Entry point to AzureStackHciManager. */ - public static void updateGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - GalleryImages resource = - manager - .galleryImagesOperations() - .getByResourceGroupWithResponse("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); + public static void updateCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("test-rg", "myCluster", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withCloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com") + .withDesiredProperties( + new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.ENABLED) + .withDiagnosticLevel(DiagnosticLevel.BASIC)) + .apply(); } // Use "Map.of" if available @@ -241,465 +603,1739 @@ public final class GalleryImagesOperationUpdateSamples { } ``` -### GuestAgent_Create +### Clusters_UploadCertificate ```java -import com.azure.resourcemanager.azurestackhci.fluent.models.GuestAgentInner; -import com.azure.resourcemanager.azurestackhci.models.GuestCredential; -import com.azure.resourcemanager.azurestackhci.models.ProvisioningAction; +import com.azure.resourcemanager.azurestackhci.models.RawCertificateData; +import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; +import java.util.Arrays; -/** Samples for GuestAgent Create. */ -public final class GuestAgentCreateSamples { +/** + * Samples for Clusters UploadCertificate. + */ +public final class ClustersUploadCertificateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/CreateGuestAgent.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UploadCertificate.json */ /** - * Sample code: CreateGuestAgent. - * + * Sample code: Upload certificate. + * * @param manager Entry point to AzureStackHciManager. */ - public static void createGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .guestAgents() - .create( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new GuestAgentInner() - .withCredentials( - new GuestCredential().withUsername("tempuser").withPassword("fakeTokenPlaceholder")) - .withProvisioningAction(ProvisioningAction.INSTALL), + public static void uploadCertificate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .uploadCertificate("test-rg", "myCluster", + new UploadCertificateRequest().withProperties( + new RawCertificateData().withCertificates(Arrays.asList("base64cert", "base64cert"))), com.azure.core.util.Context.NONE); } } ``` -### GuestAgent_Delete +### DeploymentSettings_CreateOrUpdate ```java -/** Samples for GuestAgent Delete. */ -public final class GuestAgentDeleteSamples { +import com.azure.resourcemanager.azurestackhci.models.AdapterPropertyOverrides; +import com.azure.resourcemanager.azurestackhci.models.DeploymentCluster; +import com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration; +import com.azure.resourcemanager.azurestackhci.models.DeploymentData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.DeploymentSecuritySettings; +import com.azure.resourcemanager.azurestackhci.models.HostNetwork; +import com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork; +import com.azure.resourcemanager.azurestackhci.models.Intents; +import com.azure.resourcemanager.azurestackhci.models.IpPools; +import com.azure.resourcemanager.azurestackhci.models.Observability; +import com.azure.resourcemanager.azurestackhci.models.OptionalServices; +import com.azure.resourcemanager.azurestackhci.models.PhysicalNodes; +import com.azure.resourcemanager.azurestackhci.models.QosPolicyOverrides; +import com.azure.resourcemanager.azurestackhci.models.ScaleUnits; +import com.azure.resourcemanager.azurestackhci.models.Storage; +import com.azure.resourcemanager.azurestackhci.models.StorageNetworks; +import com.azure.resourcemanager.azurestackhci.models.VirtualSwitchConfigurationOverrides; +import java.util.Arrays; + +/** + * Samples for DeploymentSettings CreateOrUpdate. + */ +public final class DeploymentSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteGuestAgent.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutDeploymentSettings.json */ /** - * Sample code: DeleteGuestAgent. - * + * Sample code: Create Deployment Settings. + * * @param manager Entry point to AzureStackHciManager. */ - public static void deleteGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .guestAgents() - .delete( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void createDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings() + .define("default") + .withExistingCluster("test-rg", "myCluster") + .withArcNodeResourceIds(Arrays.asList( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2")) + .withDeploymentMode(DeploymentMode.DEPLOY) + .withDeploymentConfiguration(new DeploymentConfiguration().withVersion("string") + .withScaleUnits(Arrays.asList(new ScaleUnits().withDeploymentData(new DeploymentData() + .withSecuritySettings(new DeploymentSecuritySettings().withHvciProtection(true) + .withDrtmProtection(true) + .withDriftControlEnforced(true) + .withCredentialGuardEnforced(false) + .withSmbSigningEnforced(true) + .withSmbClusterEncryption(false) + .withSideChannelMitigationEnforced(true) + .withBitlockerBootVolume(true) + .withBitlockerDataVolumes(true) + .withWdacEnforced(true)) + .withObservability(new Observability().withStreamingDataClient(true) + .withEuLocation(false) + .withEpisodicDataUpload(true)) + .withCluster(new DeploymentCluster().withName("testHCICluster") + .withWitnessType("Cloud") + .withWitnessPath("Cloud") + .withCloudAccountName("myasestoragacct") + .withAzureServiceEndpoint("core.windows.net")) + .withStorage(new Storage().withConfigurationMode("Express")) + .withNamingPrefix("ms169") + .withDomainFqdn("ASZ1PLab8.nttest.microsoft.com") + .withInfrastructureNetwork(Arrays.asList(new InfrastructureNetwork().withSubnetMask("255.255.248.0") + .withGateway("255.255.248.0") + .withIpPools(Arrays + .asList(new IpPools().withStartingAddress("10.57.48.60").withEndingAddress("10.57.48.66"))) + .withDnsServers(Arrays.asList("10.57.50.90")))) + .withPhysicalNodes( + Arrays.asList(new PhysicalNodes().withName("ms169host").withIpv4Address("10.57.51.224"), + new PhysicalNodes().withName("ms154host").withIpv4Address("10.57.53.236"))) + .withHostNetwork(new HostNetwork() + .withIntents(Arrays.asList(new Intents().withName("Compute_Management") + .withTrafficType(Arrays.asList("Compute", "Management")) + .withAdapter(Arrays.asList("Port2")) + .withOverrideVirtualSwitchConfiguration(false) + .withVirtualSwitchConfigurationOverrides( + new VirtualSwitchConfigurationOverrides().withEnableIov("True") + .withLoadBalancingAlgorithm("HyperVPort")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("7") + .withPriorityValue8021ActionSmb("3") + .withBandwidthPercentageSmb("50")) + .withOverrideAdapterProperty(false) + .withAdapterPropertyOverrides(new AdapterPropertyOverrides().withJumboPacket("1514") + .withNetworkDirect("Enabled") + .withNetworkDirectTechnology("iWARP")))) + .withStorageNetworks(Arrays.asList(new StorageNetworks().withName("Storage1Network") + .withNetworkAdapterName("Port3") + .withVlanId("5"))) + .withStorageConnectivitySwitchless(true)) + .withAdouPath("OU=ms169,DC=ASZ1PLab8,DC=nttest,DC=microsoft,DC=com") + .withSecretsLocation("fakeTokenPlaceholder") + .withOptionalServices(new OptionalServices().withCustomLocation("customLocationName")))))) + .create(); } } ``` -### GuestAgent_Get +### DeploymentSettings_Delete ```java -/** Samples for GuestAgent Get. */ -public final class GuestAgentGetSamples { +/** + * Samples for DeploymentSettings Delete. + */ +public final class DeploymentSettingsDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetGuestAgent.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteDeploymentSettings.json */ /** - * Sample code: GetGuestAgent. - * + * Sample code: Delete Deployment Settings. + * * @param manager Entry point to AzureStackHciManager. */ - public static void getGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .guestAgents() - .getWithResponse( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void deleteDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings().delete("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); } } ``` -### GuestAgentsOperation_List +### DeploymentSettings_Get ```java -/** Samples for GuestAgentsOperation List. */ -public final class GuestAgentsOperationListSamples { +/** + * Samples for DeploymentSettings Get. + */ +public final class DeploymentSettingsGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GuestAgent_List.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetDeploymentSettings.json */ /** - * Sample code: GuestAgentListByVirtualMachineInstances. - * + * Sample code: Get Deployment Settings. + * * @param manager Entry point to AzureStackHciManager. */ - public static void guestAgentListByVirtualMachineInstances( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .guestAgentsOperations() - .list( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void getDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings() + .getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); } } ``` -### HybridIdentityMetadata_Get +### DeploymentSettings_ListByClusters ```java -/** Samples for HybridIdentityMetadata Get. */ -public final class HybridIdentityMetadataGetSamples { +/** + * Samples for DeploymentSettings ListByClusters. + */ +public final class DeploymentSettingsListByClustersSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetHybridIdentityMetadata.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListDeploymentSettingsByCluster.json */ /** - * Sample code: GetHybridIdentityMetadata. - * + * Sample code: List Deployment Settings. + * * @param manager Entry point to AzureStackHciManager. */ - public static void getHybridIdentityMetadata(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .hybridIdentityMetadatas() - .getWithResponse( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void listDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings().listByClusters("test-rg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### HybridIdentityMetadata_List +### EdgeDevices_CreateOrUpdate ```java -/** Samples for HybridIdentityMetadata List. */ -public final class HybridIdentityMetadataListSamples { +import com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.NicDetail; +import java.util.Arrays; + +/** + * Samples for EdgeDevices CreateOrUpdate. + */ +public final class EdgeDevicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/HybridIdentityMetadata_List.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutEdgeDevices.json */ /** - * Sample code: HybridIdentityMetadataListByVirtualMachineInstances. - * + * Sample code: Create Edge Device. + * * @param manager Entry point to AzureStackHciManager. */ - public static void hybridIdentityMetadataListByVirtualMachineInstances( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .hybridIdentityMetadatas() - .list( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void createEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .define("default") + .withExistingResourceUri( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1") + .withDeviceConfiguration( + new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("ethernet") + .withInterfaceDescription("NDIS 6.70 ") + .withComponentId("VMBUS{f8615163-df3e-46c5-913f-f2d2f965ed0g} ") + .withDriverVersion("10.0.20348.1547 ") + .withIp4Address("10.10.10.10") + .withSubnetMask("255.255.255.0") + .withDefaultGateway("10.10.10.1") + .withDnsServers(Arrays.asList("100.10.10.1")) + .withDefaultIsolationId("0"))).withDeviceMetadata("")) + .create(); + } +} +``` + +### EdgeDevices_Delete + +```java +/** + * Samples for EdgeDevices Delete. + */ +public final class EdgeDevicesDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteEdgeDevices.json + */ + /** + * Sample code: Delete Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .delete( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDevices_Get + +```java +/** + * Samples for EdgeDevices Get. + */ +public final class EdgeDevicesGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetEdgeDevices.json + */ + /** + * Sample code: Get Edge Device. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDevices_List + +```java +/** + * Samples for EdgeDevices List. + */ +public final class EdgeDevicesListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListEdgeDevices.json + */ + /** + * Sample code: List Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .list( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + com.azure.core.util.Context.NONE); + } +} +``` + +### EdgeDevices_Validate + +```java +import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; +import java.util.Arrays; + +/** + * Samples for EdgeDevices Validate. + */ +public final class EdgeDevicesValidateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ValidateEdgeDevices.json + */ + /** + * Sample code: Validate Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void validateEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .validate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", + new ValidateRequest().withEdgeDeviceIds(Arrays.asList( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/edgeDevices/default", + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/edgeDevices/default")) + .withAdditionalInfo("test"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Extensions_Create + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** + * Samples for Extensions Create. + */ +public final class ExtensionsCreateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutExtension.json + */ + /** + * Sample code: Create Arc Extension. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) + throws IOException { + manager.extensions() + .define("MicrosoftMonitoringAgent") + .withExistingArcSetting("test-rg", "myCluster", "default") + .withPublisher("Microsoft.Compute") + .withTypePropertiesType("MicrosoftMonitoringAgent") + .withTypeHandlerVersion("1.10") + .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withEnableAutomaticUpgrade(false) + .create(); + } +} +``` + +### Extensions_Delete + +```java +/** + * Samples for Extensions Delete. + */ +public final class ExtensionsDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteExtension.json + */ + /** + * Sample code: Delete Arc Extension. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .delete("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", com.azure.core.util.Context.NONE); + } +} +``` + +### Extensions_Get + +```java +/** + * Samples for Extensions Get. + */ +public final class ExtensionsGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetExtension.json + */ + /** + * Sample code: Get ArcSettings Extension. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getArcSettingsExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + com.azure.core.util.Context.NONE); + } +} +``` + +### Extensions_ListByArcSetting + +```java +/** + * Samples for Extensions ListByArcSetting. + */ +public final class ExtensionsListByArcSettingSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListExtensionsByArcSetting.json + */ + /** + * Sample code: List Extensions under ArcSetting resource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listExtensionsUnderArcSettingResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions().listByArcSetting("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### Extensions_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azurestackhci.models.Extension; +import com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters; +import java.io.IOException; + +/** + * Samples for Extensions Update. + */ +public final class ExtensionsUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PatchExtension.json + */ + /** + * Sample code: Update Arc Extension. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void updateArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) + throws IOException { + Extension resource = manager.extensions() + .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("1.10") + .withEnableAutomaticUpgrade(false) + .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON))) + .apply(); + } +} +``` + +### Extensions_Upgrade + +```java +import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; + +/** + * Samples for Extensions Upgrade. + */ +public final class ExtensionsUpgradeSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/Extensions_Upgrade.json + */ + /** + * Sample code: Upgrade Machine Extensions. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void upgradeMachineExtensions(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .upgrade("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + new ExtensionUpgradeParameters().withTargetVersion("1.0.18062.0"), com.azure.core.util.Context.NONE); + } +} +``` + +### GalleryImagesOperation_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; + +/** + * Samples for GalleryImagesOperation CreateOrUpdate. + */ +public final class GalleryImagesOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutGalleryImage.json + */ + /** + * Sample code: PutGalleryImage. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void putGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.galleryImagesOperations() + .define("test-gallery-image") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withContainerId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container") + .withImagePath("C:\\test.vhdx") + .withOsType(OperatingSystemTypes.LINUX) + .create(); + } +} +``` + +### GalleryImagesOperation_Delete + +```java +/** + * Samples for GalleryImagesOperation Delete. + */ +public final class GalleryImagesOperationDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteGalleryImage.json + */ + /** + * Sample code: DeleteGalleryImage. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.galleryImagesOperations().delete("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE); + } +} +``` + +### GalleryImagesOperation_GetByResourceGroup + +```java +/** + * Samples for GalleryImagesOperation GetByResourceGroup. + */ +public final class GalleryImagesOperationGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetGalleryImage.json + */ + /** + * Sample code: GetGalleryImage. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.galleryImagesOperations() + .getByResourceGroupWithResponse("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE); + } +} +``` + +### GalleryImagesOperation_List + +```java +/** + * Samples for GalleryImagesOperation List. + */ +public final class GalleryImagesOperationListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListGalleryImageBySubscription.json + */ + /** + * Sample code: ListGalleryImageBySubscription. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listGalleryImageBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.galleryImagesOperations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### GalleryImagesOperation_ListByResourceGroup + +```java +/** + * Samples for GalleryImagesOperation ListByResourceGroup. + */ +public final class GalleryImagesOperationListByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListGalleryImageByResourceGroup.json + */ + /** + * Sample code: ListGalleryImageByResourceGroup. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listGalleryImageByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.galleryImagesOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### GalleryImagesOperation_Update + +```java +import com.azure.resourcemanager.azurestackhci.models.GalleryImages; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for GalleryImagesOperation Update. + */ +public final class GalleryImagesOperationUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateGalleryImage.json + */ + /** + * Sample code: UpdateGalleryImage. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void updateGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + GalleryImages resource = manager.galleryImagesOperations() + .getByResourceGroupWithResponse("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### GuestAgent_Create + +```java +import com.azure.resourcemanager.azurestackhci.fluent.models.GuestAgentInner; +import com.azure.resourcemanager.azurestackhci.models.GuestCredential; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningAction; + +/** + * Samples for GuestAgent Create. + */ +public final class GuestAgentCreateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/CreateGuestAgent.json + */ + /** + * Sample code: CreateGuestAgent. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.guestAgents() + .create( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", + new GuestAgentInner() + .withCredentials( + new GuestCredential().withUsername("tempuser").withPassword("fakeTokenPlaceholder")) + .withProvisioningAction(ProvisioningAction.INSTALL), + com.azure.core.util.Context.NONE); + } +} +``` + +### GuestAgent_Delete + +```java +/** + * Samples for GuestAgent Delete. + */ +public final class GuestAgentDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteGuestAgent.json + */ + /** + * Sample code: DeleteGuestAgent. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.guestAgents() + .delete( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); + } +} +``` + +### GuestAgent_Get + +```java +/** + * Samples for GuestAgent Get. + */ +public final class GuestAgentGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetGuestAgent.json + */ + /** + * Sample code: GetGuestAgent. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.guestAgents() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); + } +} +``` + +### GuestAgentsOperation_List + +```java +/** + * Samples for GuestAgentsOperation List. + */ +public final class GuestAgentsOperationListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GuestAgent_List.json + */ + /** + * Sample code: GuestAgentListByVirtualMachineInstances. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + guestAgentListByVirtualMachineInstances(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.guestAgentsOperations() + .list( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); + } +} +``` + +### HybridIdentityMetadata_Get + +```java +/** + * Samples for HybridIdentityMetadata Get. + */ +public final class HybridIdentityMetadataGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetHybridIdentityMetadata.json + */ + /** + * Sample code: GetHybridIdentityMetadata. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getHybridIdentityMetadata(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.hybridIdentityMetadatas() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); + } +} +``` + +### HybridIdentityMetadata_List + +```java +/** + * Samples for HybridIdentityMetadata List. + */ +public final class HybridIdentityMetadataListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/HybridIdentityMetadata_List.json + */ + /** + * Sample code: HybridIdentityMetadataListByVirtualMachineInstances. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void hybridIdentityMetadataListByVirtualMachineInstances( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.hybridIdentityMetadatas() + .list( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); + } +} +``` + +### LogicalNetworksOperation_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; + +/** + * Samples for LogicalNetworksOperation CreateOrUpdate. + */ +public final class LogicalNetworksOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutLogicalNetwork.json + */ + /** + * Sample code: PutLogicalNetwork. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void putLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.logicalNetworksOperations() + .define("test-lnet") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .create(); + } +} +``` + +### LogicalNetworksOperation_Delete + +```java +/** + * Samples for LogicalNetworksOperation Delete. + */ +public final class LogicalNetworksOperationDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteLogicalNetwork.json + */ + /** + * Sample code: DeleteLogicalNetwork. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.logicalNetworksOperations().delete("test-rg", "test-lnet", com.azure.core.util.Context.NONE); + } +} +``` + +### LogicalNetworksOperation_GetByResourceGroup + +```java +/** + * Samples for LogicalNetworksOperation GetByResourceGroup. + */ +public final class LogicalNetworksOperationGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetLogicalNetwork.json + */ + /** + * Sample code: GetLogicalNetwork. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.logicalNetworksOperations() + .getByResourceGroupWithResponse("test-rg", "test-lnet", com.azure.core.util.Context.NONE); + } +} +``` + +### LogicalNetworksOperation_List + +```java +/** + * Samples for LogicalNetworksOperation List. + */ +public final class LogicalNetworksOperationListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListLogicalNetworkBySubscription.json + */ + /** + * Sample code: ListLogicalNetworkBySubscription. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listLogicalNetworkBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.logicalNetworksOperations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### LogicalNetworksOperation_ListByResourceGroup + +```java +/** + * Samples for LogicalNetworksOperation ListByResourceGroup. + */ +public final class LogicalNetworksOperationListByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListLogicalNetworkByResourceGroup.json + */ + /** + * Sample code: ListLogicalNetworkByResourceGroup. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listLogicalNetworkByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.logicalNetworksOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### LogicalNetworksOperation_Update + +```java +import com.azure.resourcemanager.azurestackhci.models.LogicalNetworks; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for LogicalNetworksOperation Update. + */ +public final class LogicalNetworksOperationUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateLogicalNetwork.json + */ + /** + * Sample code: UpdateLogicalNetwork. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void updateLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + LogicalNetworks resource = manager.logicalNetworksOperations() + .getByResourceGroupWithResponse("test-rg", "test-lnet", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### MarketplaceGalleryImagesOperation_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.models.CloudInitDataSource; +import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.models.GalleryImageIdentifier; +import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersion; +import com.azure.resourcemanager.azurestackhci.models.HyperVGeneration; +import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; + +/** + * Samples for MarketplaceGalleryImagesOperation CreateOrUpdate. + */ +public final class MarketplaceGalleryImagesOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutMarketplaceGalleryImage.json + */ + /** + * Sample code: PutMarketplaceGalleryImage. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + putMarketplaceGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.marketplaceGalleryImagesOperations() + .define("test-marketplace-gallery-image") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withContainerId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container") + .withOsType(OperatingSystemTypes.WINDOWS) + .withCloudInitDataSource(CloudInitDataSource.AZURE) + .withHyperVGeneration(HyperVGeneration.V1) + .withIdentifier(new GalleryImageIdentifier().withPublisher("myPublisherName") + .withOffer("myOfferName") + .withSku("mySkuName")) + .withVersion(new GalleryImageVersion().withName("1.0.0")) + .create(); + } +} +``` + +### MarketplaceGalleryImagesOperation_Delete + +```java +/** + * Samples for MarketplaceGalleryImagesOperation Delete. + */ +public final class MarketplaceGalleryImagesOperationDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteMarketplaceGalleryImage.json + */ + /** + * Sample code: DeleteMarketplaceGalleryImage. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + deleteMarketplaceGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.marketplaceGalleryImagesOperations() + .delete("test-rg", "test-marketplace-gallery-image", com.azure.core.util.Context.NONE); + } +} +``` + +### MarketplaceGalleryImagesOperation_GetByResourceGroup + +```java +/** + * Samples for MarketplaceGalleryImagesOperation GetByResourceGroup. + */ +public final class MarketplaceGalleryImagesOperationGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetMarketplaceGalleryImage.json + */ + /** + * Sample code: GetMarketplaceGalleryImage. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + getMarketplaceGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.marketplaceGalleryImagesOperations() + .getByResourceGroupWithResponse("test-rg", "test-marketplace-gallery-image", + com.azure.core.util.Context.NONE); + } +} +``` + +### MarketplaceGalleryImagesOperation_List + +```java +/** + * Samples for MarketplaceGalleryImagesOperation List. + */ +public final class MarketplaceGalleryImagesOperationListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListMarketplaceGalleryImageBySubscription.json + */ + /** + * Sample code: ListMarketplaceGalleryImageBySubscription. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listMarketplaceGalleryImageBySubscription( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.marketplaceGalleryImagesOperations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### MarketplaceGalleryImagesOperation_ListByResourceGroup + +```java +/** + * Samples for MarketplaceGalleryImagesOperation ListByResourceGroup. + */ +public final class MarketplaceGalleryImagesOperationListByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListMarketplaceGalleryImageByResourceGroup.json + */ + /** + * Sample code: ListMarketplaceGalleryImageByResourceGroup. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listMarketplaceGalleryImageByResourceGroup( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.marketplaceGalleryImagesOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### MarketplaceGalleryImagesOperation_Update + +```java +import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImages; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for MarketplaceGalleryImagesOperation Update. + */ +public final class MarketplaceGalleryImagesOperationUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateMarketplaceGalleryImage.json + */ + /** + * Sample code: UpdateMarketplaceGalleryImage. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + updateMarketplaceGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + MarketplaceGalleryImages resource = manager.marketplaceGalleryImagesOperations() + .getByResourceGroupWithResponse("test-rg", "test-marketplce-gallery-image", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### NetworkInterfacesOperation_CreateOrUpdate + +```java +import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; +import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.models.IpConfiguration; +import com.azure.resourcemanager.azurestackhci.models.IpConfigurationProperties; +import com.azure.resourcemanager.azurestackhci.models.IpConfigurationPropertiesSubnet; +import java.util.Arrays; + +/** + * Samples for NetworkInterfacesOperation CreateOrUpdate. + */ +public final class NetworkInterfacesOperationCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutNetworkInterface.json + */ + /** + * Sample code: PutNetworkInterface. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void putNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.networkInterfacesOperations() + .define("test-nic") + .withRegion("West US2") + .withExistingResourceGroup("test-rg") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withIpConfigurations(Arrays.asList(new IpConfiguration().withName("ipconfig-sample") + .withProperties(new IpConfigurationProperties() + .withSubnet(new IpConfigurationPropertiesSubnet().withId("test-lnet"))))) + .create(); + } +} +``` + +### NetworkInterfacesOperation_Delete + +```java +/** + * Samples for NetworkInterfacesOperation Delete. + */ +public final class NetworkInterfacesOperationDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteNetworkInterface.json + */ + /** + * Sample code: DeleteNetworkInterface. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.networkInterfacesOperations().delete("test-rg", "test-nic", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfacesOperation_GetByResourceGroup + +```java +/** + * Samples for NetworkInterfacesOperation GetByResourceGroup. + */ +public final class NetworkInterfacesOperationGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetNetworkInterface.json + */ + /** + * Sample code: GetNetworkInterface. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.networkInterfacesOperations() + .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfacesOperation_List + +```java +/** + * Samples for NetworkInterfacesOperation List. + */ +public final class NetworkInterfacesOperationListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListNetworkInterfaceBySubscription.json + */ + /** + * Sample code: ListNetworkInterfaceBySubscription. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listNetworkInterfaceBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.networkInterfacesOperations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfacesOperation_ListByResourceGroup + +```java +/** + * Samples for NetworkInterfacesOperation ListByResourceGroup. + */ +public final class NetworkInterfacesOperationListByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListNetworkInterfaceByResourceGroup.json + */ + /** + * Sample code: ListNetworkInterfaceByResourceGroup. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listNetworkInterfaceByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.networkInterfacesOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkInterfacesOperation_Update + +```java +import com.azure.resourcemanager.azurestackhci.models.NetworkInterfaces; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for NetworkInterfacesOperation Update. + */ +public final class NetworkInterfacesOperationUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateNetworkInterface.json + */ + /** + * Sample code: UpdateNetworkInterface. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void updateNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + NetworkInterfaces resource = manager.networkInterfacesOperations() + .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Offers_Get + +```java +/** + * Samples for Offers Get. + */ +public final class OffersGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetOffer.json + */ + /** + * Sample code: Get Offer. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getOffer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.offers() + .getWithResponse("test-rg", "myCluster", "publisher1", "offer1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Offers_ListByCluster + +```java +/** + * Samples for Offers ListByCluster. + */ +public final class OffersListByClusterSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListOffersByCluster.json + */ + /** + * Sample code: List Offer resources by HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listOfferResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.offers().listByCluster("test-rg", "myCluster", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Offers_ListByPublisher + +```java +/** + * Samples for Offers ListByPublisher. + */ +public final class OffersListByPublisherSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListOffersByPublisher.json + */ + /** + * Sample code: List Offer resources by publisher for the HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listOfferResourcesByPublisherForTheHCICluster( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.offers().listByPublisher("test-rg", "myCluster", "publisher1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListOperations.json + */ + /** + * Sample code: Create cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.operations().listWithResponse(com.azure.core.util.Context.NONE); + } +} +``` + +### Publishers_Get + +```java +/** + * Samples for Publishers Get. + */ +public final class PublishersGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetPublisher.json + */ + /** + * Sample code: Get Publisher. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getPublisher(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.publishers().getWithResponse("test-rg", "myCluster", "publisher1", com.azure.core.util.Context.NONE); + } +} +``` + +### Publishers_ListByCluster + +```java +/** + * Samples for Publishers ListByCluster. + */ +public final class PublishersListByClusterSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListPublishersByCluster.json + */ + /** + * Sample code: List Publisher resources by HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listPublisherResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.publishers().listByCluster("test-rg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### LogicalNetworksOperation_CreateOrUpdate +### SecuritySettings_CreateOrUpdate ```java -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; +import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; -/** Samples for LogicalNetworksOperation CreateOrUpdate. */ -public final class LogicalNetworksOperationCreateOrUpdateSamples { +/** + * Samples for SecuritySettings CreateOrUpdate. + */ +public final class SecuritySettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutLogicalNetwork.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutSecuritySettings.json */ /** - * Sample code: PutLogicalNetwork. - * + * Sample code: Create Security Settings. + * * @param manager Entry point to AzureStackHciManager. */ - public static void putLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .logicalNetworksOperations() - .define("test-lnet") - .withRegion("West US2") - .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + public static void createSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.securitySettings() + .define("default") + .withExistingCluster("test-rg", "myCluster") + .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) .create(); } } ``` -### LogicalNetworksOperation_Delete +### SecuritySettings_Delete ```java -/** Samples for LogicalNetworksOperation Delete. */ -public final class LogicalNetworksOperationDeleteSamples { +/** + * Samples for SecuritySettings Delete. + */ +public final class SecuritySettingsDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteLogicalNetwork.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteSecuritySettings.json */ /** - * Sample code: DeleteLogicalNetwork. - * + * Sample code: Delete Security Settings. + * * @param manager Entry point to AzureStackHciManager. */ - public static void deleteLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.logicalNetworksOperations().delete("test-rg", "test-lnet", com.azure.core.util.Context.NONE); + public static void deleteSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.securitySettings().delete("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); } } ``` -### LogicalNetworksOperation_GetByResourceGroup +### SecuritySettings_Get ```java -/** Samples for LogicalNetworksOperation GetByResourceGroup. */ -public final class LogicalNetworksOperationGetByResourceGroupSamples { +/** + * Samples for SecuritySettings Get. + */ +public final class SecuritySettingsGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetLogicalNetwork.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetSecuritySettings.json */ /** - * Sample code: GetLogicalNetwork. - * + * Sample code: Get Security Settings. + * * @param manager Entry point to AzureStackHciManager. */ - public static void getLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .logicalNetworksOperations() - .getByResourceGroupWithResponse("test-rg", "test-lnet", com.azure.core.util.Context.NONE); + public static void getSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.securitySettings().getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); } } ``` -### LogicalNetworksOperation_List +### SecuritySettings_ListByClusters ```java -/** Samples for LogicalNetworksOperation List. */ -public final class LogicalNetworksOperationListSamples { +/** + * Samples for SecuritySettings ListByClusters. + */ +public final class SecuritySettingsListByClustersSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListLogicalNetworkBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListSecuritySettingsByCluster.json */ /** - * Sample code: ListLogicalNetworkBySubscription. - * + * Sample code: List Security Settings. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listLogicalNetworkBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.logicalNetworksOperations().list(com.azure.core.util.Context.NONE); + public static void listSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.securitySettings().listByClusters("test-rg", "myCluster", com.azure.core.util.Context.NONE); } } ``` -### LogicalNetworksOperation_ListByResourceGroup +### Skus_Get ```java -/** Samples for LogicalNetworksOperation ListByResourceGroup. */ -public final class LogicalNetworksOperationListByResourceGroupSamples { +/** + * Samples for Skus Get. + */ +public final class SkusGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListLogicalNetworkByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetSku.json */ /** - * Sample code: ListLogicalNetworkByResourceGroup. - * + * Sample code: Get Sku. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listLogicalNetworkByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.logicalNetworksOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + public static void getSku(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.skus() + .getWithResponse("test-rg", "myCluster", "publisher1", "offer1", "sku1", null, + com.azure.core.util.Context.NONE); } } ``` -### LogicalNetworksOperation_Update +### Skus_ListByOffer ```java -import com.azure.resourcemanager.azurestackhci.models.LogicalNetworks; -import java.util.HashMap; -import java.util.Map; - -/** Samples for LogicalNetworksOperation Update. */ -public final class LogicalNetworksOperationUpdateSamples { +/** + * Samples for Skus ListByOffer. + */ +public final class SkusListByOfferSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateLogicalNetwork.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListSkusByOffer.json */ /** - * Sample code: UpdateLogicalNetwork. - * + * Sample code: List SKU resources by offer for the HCI Cluster. + * * @param manager Entry point to AzureStackHciManager. */ - public static void updateLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - LogicalNetworks resource = - manager - .logicalNetworksOperations() - .getByResourceGroupWithResponse("test-rg", "test-lnet", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void + listSKUResourcesByOfferForTheHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.skus() + .listByOffer("test-rg", "myCluster", "publisher1", "offer1", null, com.azure.core.util.Context.NONE); } } ``` -### MarketplaceGalleryImagesOperation_CreateOrUpdate +### StorageContainersOperation_CreateOrUpdate ```java -import com.azure.resourcemanager.azurestackhci.models.CloudInitDataSource; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageIdentifier; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersion; -import com.azure.resourcemanager.azurestackhci.models.HyperVGeneration; -import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; -/** Samples for MarketplaceGalleryImagesOperation CreateOrUpdate. */ -public final class MarketplaceGalleryImagesOperationCreateOrUpdateSamples { +/** + * Samples for StorageContainersOperation CreateOrUpdate. + */ +public final class StorageContainersOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutStorageContainer.json */ /** - * Sample code: PutMarketplaceGalleryImage. - * + * Sample code: PutStorageContainer. + * * @param manager Entry point to AzureStackHciManager. */ - public static void putMarketplaceGalleryImage( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .marketplaceGalleryImagesOperations() - .define("test-marketplace-gallery-image") + public static void putStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.storageContainersOperations() + .define("Default_Container") .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withContainerId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container") - .withOsType(OperatingSystemTypes.WINDOWS) - .withCloudInitDataSource(CloudInitDataSource.AZURE) - .withHyperVGeneration(HyperVGeneration.V1) - .withIdentifier( - new GalleryImageIdentifier() - .withPublisher("myPublisherName") - .withOffer("myOfferName") - .withSku("mySkuName")) - .withVersion(new GalleryImageVersion().withName("1.0.0")) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withPath("C:\\container_storage") .create(); } } ``` -### MarketplaceGalleryImagesOperation_Delete +### StorageContainersOperation_Delete ```java -/** Samples for MarketplaceGalleryImagesOperation Delete. */ -public final class MarketplaceGalleryImagesOperationDeleteSamples { +/** + * Samples for StorageContainersOperation Delete. + */ +public final class StorageContainersOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteStorageContainer.json */ /** - * Sample code: DeleteMarketplaceGalleryImage. - * + * Sample code: DeleteStorageContainer. + * * @param manager Entry point to AzureStackHciManager. */ - public static void deleteMarketplaceGalleryImage( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .marketplaceGalleryImagesOperations() - .delete("test-rg", "test-marketplace-gallery-image", com.azure.core.util.Context.NONE); + public static void deleteStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.storageContainersOperations().delete("test-rg", "Default_Container", com.azure.core.util.Context.NONE); } } ``` -### MarketplaceGalleryImagesOperation_GetByResourceGroup +### StorageContainersOperation_GetByResourceGroup ```java -/** Samples for MarketplaceGalleryImagesOperation GetByResourceGroup. */ -public final class MarketplaceGalleryImagesOperationGetByResourceGroupSamples { +/** + * Samples for StorageContainersOperation GetByResourceGroup. + */ +public final class StorageContainersOperationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetStorageContainer.json */ /** - * Sample code: GetMarketplaceGalleryImage. - * + * Sample code: GetStorageContainer. + * * @param manager Entry point to AzureStackHciManager. */ - public static void getMarketplaceGalleryImage( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .marketplaceGalleryImagesOperations() - .getByResourceGroupWithResponse( - "test-rg", "test-marketplace-gallery-image", com.azure.core.util.Context.NONE); + public static void getStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.storageContainersOperations() + .getByResourceGroupWithResponse("test-rg", "Default_Container", com.azure.core.util.Context.NONE); } } ``` -### MarketplaceGalleryImagesOperation_List +### StorageContainersOperation_List ```java -/** Samples for MarketplaceGalleryImagesOperation List. */ -public final class MarketplaceGalleryImagesOperationListSamples { +/** + * Samples for StorageContainersOperation List. + */ +public final class StorageContainersOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListMarketplaceGalleryImageBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListStorageContainerBySubscription.json */ /** - * Sample code: ListMarketplaceGalleryImageBySubscription. - * + * Sample code: ListStorageContainerBySubscription. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listMarketplaceGalleryImageBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.marketplaceGalleryImagesOperations().list(com.azure.core.util.Context.NONE); + public static void + listStorageContainerBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.storageContainersOperations().list(com.azure.core.util.Context.NONE); } } ``` -### MarketplaceGalleryImagesOperation_ListByResourceGroup +### StorageContainersOperation_ListByResourceGroup ```java -/** Samples for MarketplaceGalleryImagesOperation ListByResourceGroup. */ -public final class MarketplaceGalleryImagesOperationListByResourceGroupSamples { +/** + * Samples for StorageContainersOperation ListByResourceGroup. + */ +public final class StorageContainersOperationListByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListMarketplaceGalleryImageByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListStorageContainerByResourceGroup.json */ /** - * Sample code: ListMarketplaceGalleryImageByResourceGroup. - * + * Sample code: ListStorageContainerByResourceGroup. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listMarketplaceGalleryImageByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.marketplaceGalleryImagesOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + public static void + listStorageContainerByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.storageContainersOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } ``` -### MarketplaceGalleryImagesOperation_Update +### StorageContainersOperation_Update ```java -import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImages; +import com.azure.resourcemanager.azurestackhci.models.StorageContainers; import java.util.HashMap; import java.util.Map; -/** Samples for MarketplaceGalleryImagesOperation Update. */ -public final class MarketplaceGalleryImagesOperationUpdateSamples { +/** + * Samples for StorageContainersOperation Update. + */ +public final class StorageContainersOperationUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateStorageContainer.json */ /** - * Sample code: UpdateMarketplaceGalleryImage. - * + * Sample code: UpdateStorageContainer. + * * @param manager Entry point to AzureStackHciManager. */ - public static void updateMarketplaceGalleryImage( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - MarketplaceGalleryImages resource = - manager - .marketplaceGalleryImagesOperations() - .getByResourceGroupWithResponse( - "test-rg", "test-marketplce-gallery-image", com.azure.core.util.Context.NONE) - .getValue(); + public static void updateStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + StorageContainers resource = manager.storageContainersOperations() + .getByResourceGroupWithResponse("test-rg", "Default_Container", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); } @@ -717,338 +2353,351 @@ public final class MarketplaceGalleryImagesOperationUpdateSamples { } ``` -### NetworkInterfacesOperation_CreateOrUpdate +### UpdateRuns_Delete ```java -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; -import com.azure.resourcemanager.azurestackhci.models.IpConfiguration; -import com.azure.resourcemanager.azurestackhci.models.IpConfigurationProperties; -import com.azure.resourcemanager.azurestackhci.models.IpConfigurationPropertiesSubnet; -import java.util.Arrays; - -/** Samples for NetworkInterfacesOperation CreateOrUpdate. */ -public final class NetworkInterfacesOperationCreateOrUpdateSamples { +/** + * Samples for UpdateRuns Delete. + */ +public final class UpdateRunsDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutNetworkInterface.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteUpdateRuns.json */ /** - * Sample code: PutNetworkInterface. - * + * Sample code: Delete an Update. + * * @param manager Entry point to AzureStackHciManager. */ - public static void putNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .networkInterfacesOperations() - .define("test-nic") - .withRegion("West US2") - .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIpConfigurations( - Arrays - .asList( - new IpConfiguration() - .withName("ipconfig-sample") - .withProperties( - new IpConfigurationProperties() - .withSubnet(new IpConfigurationPropertiesSubnet().withId("test-lnet"))))) - .create(); + public static void deleteAnUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateRuns() + .delete("testrg", "testcluster", "Microsoft4.2203.2.32", "23b779ba-0d52-4a80-8571-45ca74664ec3", + com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfacesOperation_Delete +### UpdateRuns_Get ```java -/** Samples for NetworkInterfacesOperation Delete. */ -public final class NetworkInterfacesOperationDeleteSamples { +/** + * Samples for UpdateRuns Get. + */ +public final class UpdateRunsGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteNetworkInterface.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetUpdateRuns.json */ /** - * Sample code: DeleteNetworkInterface. - * + * Sample code: Get Update runs under cluster resource. + * * @param manager Entry point to AzureStackHciManager. */ - public static void deleteNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.networkInterfacesOperations().delete("test-rg", "test-nic", com.azure.core.util.Context.NONE); + public static void + getUpdateRunsUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateRuns() + .getWithResponse("testrg", "testcluster", "Microsoft4.2203.2.32", "23b779ba-0d52-4a80-8571-45ca74664ec3", + com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfacesOperation_GetByResourceGroup +### UpdateRuns_List ```java -/** Samples for NetworkInterfacesOperation GetByResourceGroup. */ -public final class NetworkInterfacesOperationGetByResourceGroupSamples { +/** + * Samples for UpdateRuns List. + */ +public final class UpdateRunsListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetNetworkInterface.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListUpdateRuns.json */ /** - * Sample code: GetNetworkInterface. - * + * Sample code: List Update runs under cluster resource. + * * @param manager Entry point to AzureStackHciManager. */ - public static void getNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .networkInterfacesOperations() - .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE); + public static void + listUpdateRunsUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateRuns().list("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfacesOperation_List +### UpdateRuns_Put ```java -/** Samples for NetworkInterfacesOperation List. */ -public final class NetworkInterfacesOperationListSamples { +import com.azure.resourcemanager.azurestackhci.fluent.models.Step; +import com.azure.resourcemanager.azurestackhci.models.UpdateRun; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** + * Samples for UpdateRuns Put. + */ +public final class UpdateRunsPutSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListNetworkInterfaceBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutUpdateRuns.json */ /** - * Sample code: ListNetworkInterfaceBySubscription. - * + * Sample code: Get Update runs under cluster resource. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listNetworkInterfaceBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.networkInterfacesOperations().list(com.azure.core.util.Context.NONE); + public static void + getUpdateRunsUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + UpdateRun resource = manager.updateRuns() + .getWithResponse("testrg", "testcluster", "Microsoft4.2203.2.32", "23b779ba-0d52-4a80-8571-45ca74664ec3", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withNamePropertiesName("Unnamed step") + .withDescription("Update Azure Stack.") + .withErrorMessage("") + .withStatus("Success") + .withStartTimeUtc(OffsetDateTime.parse("2022-04-06T01:36:33.3876751+00:00")) + .withEndTimeUtc(OffsetDateTime.parse("2022-04-06T13:58:42.969006+00:00")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2022-04-06T13:58:42.969006+00:00")) + .withSteps(Arrays.asList(new Step().withName("PreUpdate Cloud") + .withDescription("Prepare for SSU update") + .withErrorMessage("") + .withStatus("Success") + .withStartTimeUtc(OffsetDateTime.parse("2022-04-06T01:36:33.3876751+00:00")) + .withEndTimeUtc(OffsetDateTime.parse("2022-04-06T01:37:16.8728314+00:00")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2022-04-06T01:37:16.8728314+00:00")) + .withSteps(Arrays.asList()))) + .apply(); } } ``` -### NetworkInterfacesOperation_ListByResourceGroup +### UpdateSummariesOperation_Delete ```java -/** Samples for NetworkInterfacesOperation ListByResourceGroup. */ -public final class NetworkInterfacesOperationListByResourceGroupSamples { +/** + * Samples for UpdateSummariesOperation Delete. + */ +public final class UpdateSummariesOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListNetworkInterfaceByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteUpdateSummaries.json */ /** - * Sample code: ListNetworkInterfaceByResourceGroup. - * + * Sample code: Delete an Update. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listNetworkInterfaceByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.networkInterfacesOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + public static void deleteAnUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateSummariesOperations().delete("testrg", "testcluster", com.azure.core.util.Context.NONE); } } ``` -### NetworkInterfacesOperation_Update +### UpdateSummariesOperation_Get ```java -import com.azure.resourcemanager.azurestackhci.models.NetworkInterfaces; -import java.util.HashMap; -import java.util.Map; - -/** Samples for NetworkInterfacesOperation Update. */ -public final class NetworkInterfacesOperationUpdateSamples { +/** + * Samples for UpdateSummariesOperation Get. + */ +public final class UpdateSummariesOperationGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateNetworkInterface.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetUpdateSummaries.json */ /** - * Sample code: UpdateNetworkInterface. - * + * Sample code: Get Update summaries under cluster resource. + * * @param manager Entry point to AzureStackHciManager. */ - public static void updateNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - NetworkInterfaces resource = - manager - .networkInterfacesOperations() - .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void + getUpdateSummariesUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateSummariesOperations().getWithResponse("testrg", "testcluster", com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### UpdateSummariesOperation_List ```java -/** Samples for Operations List. */ -public final class OperationsListSamples { +/** + * Samples for UpdateSummariesOperation List. + */ +public final class UpdateSummariesOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListOperations.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListUpdateSummaries.json */ /** - * Sample code: ListOperations. - * + * Sample code: Get Update summaries under cluster resource. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listOperations(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void + getUpdateSummariesUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateSummariesOperations().list("testrg", "testcluster", com.azure.core.util.Context.NONE); } } ``` -### StorageContainersOperation_CreateOrUpdate +### UpdateSummariesOperation_Put ```java -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; - -/** Samples for StorageContainersOperation CreateOrUpdate. */ -public final class StorageContainersOperationCreateOrUpdateSamples { +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState; +import java.time.OffsetDateTime; + +/** + * Samples for UpdateSummariesOperation Put. + */ +public final class UpdateSummariesOperationPutSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutStorageContainer.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutUpdateSummaries.json */ /** - * Sample code: PutStorageContainer. - * + * Sample code: Put Update summaries under cluster resource. + * * @param manager Entry point to AzureStackHciManager. */ - public static void putStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .storageContainersOperations() - .define("Default_Container") - .withRegion("West US2") - .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withPath("C:\\container_storage") - .create(); + public static void + putUpdateSummariesUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateSummariesOperations() + .putWithResponse("testrg", "testcluster", + new UpdateSummariesInner().withOemFamily("DellEMC") + .withHardwareModel("PowerEdge R730xd") + .withCurrentVersion("4.2203.2.32") + .withLastUpdated(OffsetDateTime.parse("2022-04-06T14:08:18.254Z")) + .withLastChecked(OffsetDateTime.parse("2022-04-07T18:04:07Z")) + .withState(UpdateSummariesPropertiesState.APPLIED_SUCCESSFULLY), + com.azure.core.util.Context.NONE); } } ``` -### StorageContainersOperation_Delete +### Updates_Delete ```java -/** Samples for StorageContainersOperation Delete. */ -public final class StorageContainersOperationDeleteSamples { +/** + * Samples for Updates Delete. + */ +public final class UpdatesDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteStorageContainer.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteUpdates.json */ /** - * Sample code: DeleteStorageContainer. - * + * Sample code: Delete an Update. + * * @param manager Entry point to AzureStackHciManager. */ - public static void deleteStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.storageContainersOperations().delete("test-rg", "Default_Container", com.azure.core.util.Context.NONE); + public static void deleteAnUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updates().delete("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE); } } ``` -### StorageContainersOperation_GetByResourceGroup +### Updates_Get ```java -/** Samples for StorageContainersOperation GetByResourceGroup. */ -public final class StorageContainersOperationGetByResourceGroupSamples { +/** + * Samples for Updates Get. + */ +public final class UpdatesGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetStorageContainer.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetUpdates.json */ /** - * Sample code: GetStorageContainer. - * + * Sample code: Get a specific update. + * * @param manager Entry point to AzureStackHciManager. */ - public static void getStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .storageContainersOperations() - .getByResourceGroupWithResponse("test-rg", "Default_Container", com.azure.core.util.Context.NONE); + public static void getASpecificUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updates() + .getWithResponse("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE); } } ``` -### StorageContainersOperation_List +### Updates_List ```java -/** Samples for StorageContainersOperation List. */ -public final class StorageContainersOperationListSamples { +/** + * Samples for Updates List. + */ +public final class UpdatesListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListStorageContainerBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListUpdates.json */ /** - * Sample code: ListStorageContainerBySubscription. - * + * Sample code: List available updates. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listStorageContainerBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.storageContainersOperations().list(com.azure.core.util.Context.NONE); + public static void listAvailableUpdates(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updates().list("testrg", "testcluster", com.azure.core.util.Context.NONE); } } ``` -### StorageContainersOperation_ListByResourceGroup +### Updates_Post ```java -/** Samples for StorageContainersOperation ListByResourceGroup. */ -public final class StorageContainersOperationListByResourceGroupSamples { +/** + * Samples for Updates Post. + */ +public final class UpdatesPostSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListStorageContainerByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PostUpdates.json */ /** - * Sample code: ListStorageContainerByResourceGroup. - * + * Sample code: List available updates. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listStorageContainerByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.storageContainersOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + public static void listAvailableUpdates(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updates().post("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE); } } ``` -### StorageContainersOperation_Update +### Updates_Put ```java -import com.azure.resourcemanager.azurestackhci.models.StorageContainers; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.azurestackhci.models.AvailabilityType; +import com.azure.resourcemanager.azurestackhci.models.HciUpdate; +import com.azure.resourcemanager.azurestackhci.models.State; +import com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite; +import java.time.OffsetDateTime; +import java.util.Arrays; -/** Samples for StorageContainersOperation Update. */ -public final class StorageContainersOperationUpdateSamples { +/** + * Samples for Updates Put. + */ +public final class UpdatesPutSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateStorageContainer.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutUpdates.json */ /** - * Sample code: UpdateStorageContainer. - * + * Sample code: Put a specific update. + * * @param manager Entry point to AzureStackHciManager. */ - public static void updateStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - StorageContainers resource = - manager - .storageContainersOperations() - .getByResourceGroupWithResponse("test-rg", "Default_Container", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void putASpecificUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + HciUpdate resource = manager.updates() + .getWithResponse("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withInstalledDate(OffsetDateTime.parse("2022-04-06T14:08:18.254Z")) + .withDescription("AzS Update 4.2203.2.32") + .withState(State.INSTALLED) + .withPrerequisites(Arrays.asList(new UpdatePrerequisite().withUpdateType("update type") + .withVersion("prerequisite version") + .withPackageName("update package name"))) + .withPackagePath("\\\\SU1FileServer\\SU1_Infrastructure_2\\Updates\\Packages\\Microsoft4.2203.2.32") + .withPackageSizeInMb(18858.0F) + .withDisplayName("AzS Update - 4.2203.2.32") + .withVersion("4.2203.2.32") + .withPublisher("Microsoft") + .withReleaseLink("https://docs.microsoft.com/azure-stack/operator/release-notes?view=azs-2203") + .withAvailabilityType(AvailabilityType.LOCAL) + .withPackageType("Infrastructure") + .withAdditionalProperties("additional properties") + .withProgressPercentage(0.0F) + .withNotifyMessage("Brief message with instructions for updates of AvailabilityType Notify") + .apply(); } } ``` @@ -1059,27 +2708,26 @@ public final class StorageContainersOperationUpdateSamples { import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; -/** Samples for VirtualHardDisksOperation CreateOrUpdate. */ +/** + * Samples for VirtualHardDisksOperation CreateOrUpdate. + */ public final class VirtualHardDisksOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualHardDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualHardDisk.json */ /** * Sample code: PutVirtualHardDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualHardDisksOperations() + manager.virtualHardDisksOperations() .define("test-vhd") .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withDiskSizeGB(32L) .create(); } @@ -1089,14 +2737,16 @@ public final class VirtualHardDisksOperationCreateOrUpdateSamples { ### VirtualHardDisksOperation_Delete ```java -/** Samples for VirtualHardDisksOperation Delete. */ +/** + * Samples for VirtualHardDisksOperation Delete. + */ public final class VirtualHardDisksOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteVirtualHardDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteVirtualHardDisk.json */ /** * Sample code: DeleteVirtualHardDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { @@ -1108,19 +2758,20 @@ public final class VirtualHardDisksOperationDeleteSamples { ### VirtualHardDisksOperation_GetByResourceGroup ```java -/** Samples for VirtualHardDisksOperation GetByResourceGroup. */ +/** + * Samples for VirtualHardDisksOperation GetByResourceGroup. + */ public final class VirtualHardDisksOperationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetVirtualHardDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetVirtualHardDisk.json */ /** * Sample code: GetVirtualHardDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualHardDisksOperations() + manager.virtualHardDisksOperations() .getByResourceGroupWithResponse("test-rg", "test-vhd", com.azure.core.util.Context.NONE); } } @@ -1129,18 +2780,20 @@ public final class VirtualHardDisksOperationGetByResourceGroupSamples { ### VirtualHardDisksOperation_List ```java -/** Samples for VirtualHardDisksOperation List. */ +/** + * Samples for VirtualHardDisksOperation List. + */ public final class VirtualHardDisksOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualHardDiskBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListVirtualHardDiskBySubscription.json */ /** * Sample code: ListVirtualHardDiskBySubscription. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listVirtualHardDiskBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listVirtualHardDiskBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.virtualHardDisksOperations().list(com.azure.core.util.Context.NONE); } } @@ -1149,18 +2802,20 @@ public final class VirtualHardDisksOperationListSamples { ### VirtualHardDisksOperation_ListByResourceGroup ```java -/** Samples for VirtualHardDisksOperation ListByResourceGroup. */ +/** + * Samples for VirtualHardDisksOperation ListByResourceGroup. + */ public final class VirtualHardDisksOperationListByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualHardDiskByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListVirtualHardDiskByResourceGroup.json */ /** * Sample code: ListVirtualHardDiskByResourceGroup. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listVirtualHardDiskByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listVirtualHardDiskByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.virtualHardDisksOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } @@ -1173,22 +2828,22 @@ import com.azure.resourcemanager.azurestackhci.models.VirtualHardDisks; import java.util.HashMap; import java.util.Map; -/** Samples for VirtualHardDisksOperation Update. */ +/** + * Samples for VirtualHardDisksOperation Update. + */ public final class VirtualHardDisksOperationUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateVirtualHardDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateVirtualHardDisk.json */ /** * Sample code: UpdateVirtualHardDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void updateVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - VirtualHardDisks resource = - manager - .virtualHardDisksOperations() - .getByResourceGroupWithResponse("test-rg", "test-vhd", com.azure.core.util.Context.NONE) - .getValue(); + VirtualHardDisks resource = manager.virtualHardDisksOperations() + .getByResourceGroupWithResponse("test-rg", "test-vhd", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); } @@ -1225,207 +2880,149 @@ import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceProp import com.azure.resourcemanager.azurestackhci.models.VmSizeEnum; import java.util.Arrays; -/** Samples for VirtualMachineInstances CreateOrUpdate. */ +/** + * Samples for VirtualMachineInstances CreateOrUpdate. + */ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualMachineInstanceWithGalleryImage.json */ /** * Sample code: PutVirtualMachineInstanceWithGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putVirtualMachineInstanceWithGalleryImage( com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .createOrUpdate( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner() - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withHardwareProfile( new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.DEFAULT)) - .withNetworkProfile( - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("test-nic")))) + .withNetworkProfile(new VirtualMachineInstancePropertiesNetworkProfile().withNetworkInterfaces( + Arrays.asList(new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() + .withId("test-nic")))) .withOsProfile( - new VirtualMachineInstancePropertiesOsProfile() - .withAdminPassword("fakeTokenPlaceholder") + new VirtualMachineInstancePropertiesOsProfile().withAdminPassword("fakeTokenPlaceholder") .withAdminUsername("localadmin") .withComputerName("luamaster")) - .withSecurityProfile( - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() - .withSecureBootEnabled(true))) - .withStorageProfile( - new VirtualMachineInstancePropertiesStorageProfile() - .withImageReference( - new VirtualMachineInstancePropertiesStorageProfileImageReference() - .withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")) - .withVmConfigStoragePathId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), + .withSecurityProfile(new VirtualMachineInstancePropertiesSecurityProfile().withEnableTpm(true) + .withUefiSettings(new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() + .withSecureBootEnabled(true))) + .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() + .withImageReference(new VirtualMachineInstancePropertiesStorageProfileImageReference().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")) + .withVmConfigStoragePathId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithOsDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualMachineInstanceWithOsDisk.json */ /** * Sample code: PutVirtualMachineInstanceWithOsDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void putVirtualMachineInstanceWithOsDisk( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + public static void + putVirtualMachineInstanceWithOsDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.virtualMachineInstances() .createOrUpdate( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner() - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withHardwareProfile( new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.DEFAULT)) - .withNetworkProfile( - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("test-nic")))) - .withSecurityProfile( - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() - .withSecureBootEnabled(true))) - .withStorageProfile( - new VirtualMachineInstancePropertiesStorageProfile() - .withOsDisk( - new VirtualMachineInstancePropertiesStorageProfileOsDisk() - .withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd")) - .withVmConfigStoragePathId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), + .withNetworkProfile(new VirtualMachineInstancePropertiesNetworkProfile().withNetworkInterfaces( + Arrays.asList(new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() + .withId("test-nic")))) + .withSecurityProfile(new VirtualMachineInstancePropertiesSecurityProfile().withEnableTpm(true) + .withUefiSettings(new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() + .withSecureBootEnabled(true))) + .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() + .withOsDisk(new VirtualMachineInstancePropertiesStorageProfileOsDisk().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd")) + .withVmConfigStoragePathId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualMachineInstanceWithMarketplaceGalleryImage.json */ /** * Sample code: PutVirtualMachineInstanceWithMarketplaceGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putVirtualMachineInstanceWithMarketplaceGalleryImage( com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .createOrUpdate( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner() - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withHardwareProfile( new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.DEFAULT)) - .withNetworkProfile( - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("test-nic")))) + .withNetworkProfile(new VirtualMachineInstancePropertiesNetworkProfile().withNetworkInterfaces( + Arrays.asList(new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() + .withId("test-nic")))) .withOsProfile( - new VirtualMachineInstancePropertiesOsProfile() - .withAdminPassword("fakeTokenPlaceholder") + new VirtualMachineInstancePropertiesOsProfile().withAdminPassword("fakeTokenPlaceholder") .withAdminUsername("localadmin") .withComputerName("luamaster")) - .withSecurityProfile( - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() - .withSecureBootEnabled(true))) - .withStorageProfile( - new VirtualMachineInstancePropertiesStorageProfile() - .withImageReference( - new VirtualMachineInstancePropertiesStorageProfileImageReference() - .withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image")) - .withVmConfigStoragePathId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), + .withSecurityProfile(new VirtualMachineInstancePropertiesSecurityProfile().withEnableTpm(true) + .withUefiSettings(new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() + .withSecureBootEnabled(true))) + .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() + .withImageReference(new VirtualMachineInstancePropertiesStorageProfileImageReference().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image")) + .withVmConfigStoragePathId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithVMConfigAgent.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualMachineInstanceWithVMConfigAgent.json */ /** * Sample code: PutVirtualMachineInstanceWithVMConfigAgent. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putVirtualMachineInstanceWithVMConfigAgent( com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .createOrUpdate( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner() - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withHardwareProfile( new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.DEFAULT)) - .withNetworkProfile( - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("test-nic")))) - .withOsProfile( - new VirtualMachineInstancePropertiesOsProfile() - .withAdminPassword("fakeTokenPlaceholder") - .withAdminUsername("localadmin") - .withComputerName("luamaster") - .withWindowsConfiguration( - new VirtualMachineInstancePropertiesOsProfileWindowsConfiguration() - .withProvisionVMConfigAgent(true))) - .withSecurityProfile( - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() - .withSecureBootEnabled(true))) - .withStorageProfile( - new VirtualMachineInstancePropertiesStorageProfile() - .withImageReference( - new VirtualMachineInstancePropertiesStorageProfileImageReference() - .withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")) - .withVmConfigStoragePathId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), + .withNetworkProfile(new VirtualMachineInstancePropertiesNetworkProfile().withNetworkInterfaces( + Arrays.asList(new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() + .withId("test-nic")))) + .withOsProfile(new VirtualMachineInstancePropertiesOsProfile() + .withAdminPassword("fakeTokenPlaceholder") + .withAdminUsername("localadmin") + .withComputerName("luamaster") + .withWindowsConfiguration(new VirtualMachineInstancePropertiesOsProfileWindowsConfiguration() + .withProvisionVMConfigAgent(true))) + .withSecurityProfile(new VirtualMachineInstancePropertiesSecurityProfile().withEnableTpm(true) + .withUefiSettings(new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() + .withSecureBootEnabled(true))) + .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() + .withImageReference(new VirtualMachineInstancePropertiesStorageProfileImageReference().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")) + .withVmConfigStoragePathId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), com.azure.core.util.Context.NONE); } } @@ -1434,19 +3031,20 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { ### VirtualMachineInstances_Delete ```java -/** Samples for VirtualMachineInstances Delete. */ +/** + * Samples for VirtualMachineInstances Delete. + */ public final class VirtualMachineInstancesDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteVirtualMachineInstance.json */ /** * Sample code: DeleteVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .delete( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); @@ -1457,19 +3055,20 @@ public final class VirtualMachineInstancesDeleteSamples { ### VirtualMachineInstances_Get ```java -/** Samples for VirtualMachineInstances Get. */ +/** + * Samples for VirtualMachineInstances Get. + */ public final class VirtualMachineInstancesGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetVirtualMachineInstance.json */ /** * Sample code: GetVirtualMachineInstance. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getVirtualMachineInstance(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .getWithResponse( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); @@ -1480,20 +3079,21 @@ public final class VirtualMachineInstancesGetSamples { ### VirtualMachineInstances_List ```java -/** Samples for VirtualMachineInstances List. */ +/** + * Samples for VirtualMachineInstances List. + */ public final class VirtualMachineInstancesListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualMachineInstances.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListVirtualMachineInstances.json */ /** * Sample code: ListVirtualMachineInstances. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listVirtualMachineInstances( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + public static void + listVirtualMachineInstances(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.virtualMachineInstances() .list( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); @@ -1504,19 +3104,20 @@ public final class VirtualMachineInstancesListSamples { ### VirtualMachineInstances_Restart ```java -/** Samples for VirtualMachineInstances Restart. */ +/** + * Samples for VirtualMachineInstances Restart. + */ public final class VirtualMachineInstancesRestartSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/RestartVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/RestartVirtualMachineInstance.json */ /** * Sample code: RestartVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void restartVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .restart( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", com.azure.core.util.Context.NONE); @@ -1527,19 +3128,20 @@ public final class VirtualMachineInstancesRestartSamples { ### VirtualMachineInstances_Start ```java -/** Samples for VirtualMachineInstances Start. */ +/** + * Samples for VirtualMachineInstances Start. + */ public final class VirtualMachineInstancesStartSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/StartVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/StartVirtualMachineInstance.json */ /** * Sample code: StartVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void startVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .start( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", com.azure.core.util.Context.NONE); @@ -1550,19 +3152,20 @@ public final class VirtualMachineInstancesStartSamples { ### VirtualMachineInstances_Stop ```java -/** Samples for VirtualMachineInstances Stop. */ +/** + * Samples for VirtualMachineInstances Stop. + */ public final class VirtualMachineInstancesStopSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/StopVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/StopVirtualMachineInstance.json */ /** * Sample code: StopVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void stopVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .stop( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", com.azure.core.util.Context.NONE); @@ -1579,32 +3182,26 @@ import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpda import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpdateRequest; import java.util.Arrays; -/** Samples for VirtualMachineInstances Update. */ +/** + * Samples for VirtualMachineInstances Update. + */ public final class VirtualMachineInstancesUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateVirtualMachineInstance.json */ /** * Sample code: UpdateVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void updateVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .update( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceUpdateRequest() - .withProperties( - new VirtualMachineInstanceUpdateProperties() - .withStorageProfile( - new StorageProfileUpdate() - .withDataDisks( - Arrays - .asList( - new StorageProfileUpdateDataDisksItem() - .withId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"))))), + new VirtualMachineInstanceUpdateRequest().withProperties( + new VirtualMachineInstanceUpdateProperties().withStorageProfile(new StorageProfileUpdate() + .withDataDisks(Arrays.asList(new StorageProfileUpdateDataDisksItem().withId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"))))), com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml index d6c69116c358c..f313b13188228 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for AzureStackHci Management - This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-preview-2023-09. + This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-2024-01. https://github.com/Azure/azure-sdk-for-java @@ -61,7 +61,7 @@ com.azure azure-core-test - 1.26.0-beta.1 + 1.25.0 test @@ -88,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java index f1af2d977eb2e..1fade63d28d5f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/AzureStackHciManager.java @@ -11,8 +11,8 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -24,7 +24,12 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient; +import com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsImpl; import com.azure.resourcemanager.azurestackhci.implementation.AzureStackHciClientBuilder; +import com.azure.resourcemanager.azurestackhci.implementation.ClustersImpl; +import com.azure.resourcemanager.azurestackhci.implementation.DeploymentSettingsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.EdgeDevicesImpl; +import com.azure.resourcemanager.azurestackhci.implementation.ExtensionsImpl; import com.azure.resourcemanager.azurestackhci.implementation.GalleryImagesOperationsImpl; import com.azure.resourcemanager.azurestackhci.implementation.GuestAgentsImpl; import com.azure.resourcemanager.azurestackhci.implementation.GuestAgentsOperationsImpl; @@ -32,10 +37,22 @@ import com.azure.resourcemanager.azurestackhci.implementation.LogicalNetworksOperationsImpl; import com.azure.resourcemanager.azurestackhci.implementation.MarketplaceGalleryImagesOperationsImpl; import com.azure.resourcemanager.azurestackhci.implementation.NetworkInterfacesOperationsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.OffersImpl; import com.azure.resourcemanager.azurestackhci.implementation.OperationsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.PublishersImpl; +import com.azure.resourcemanager.azurestackhci.implementation.SecuritySettingsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.SkusImpl; import com.azure.resourcemanager.azurestackhci.implementation.StorageContainersOperationsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.UpdateRunsImpl; +import com.azure.resourcemanager.azurestackhci.implementation.UpdatesImpl; +import com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationsImpl; import com.azure.resourcemanager.azurestackhci.implementation.VirtualHardDisksOperationsImpl; import com.azure.resourcemanager.azurestackhci.implementation.VirtualMachineInstancesImpl; +import com.azure.resourcemanager.azurestackhci.models.ArcSettings; +import com.azure.resourcemanager.azurestackhci.models.Clusters; +import com.azure.resourcemanager.azurestackhci.models.DeploymentSettings; +import com.azure.resourcemanager.azurestackhci.models.EdgeDevices; +import com.azure.resourcemanager.azurestackhci.models.Extensions; import com.azure.resourcemanager.azurestackhci.models.GalleryImagesOperations; import com.azure.resourcemanager.azurestackhci.models.GuestAgents; import com.azure.resourcemanager.azurestackhci.models.GuestAgentsOperations; @@ -43,8 +60,15 @@ import com.azure.resourcemanager.azurestackhci.models.LogicalNetworksOperations; import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImagesOperations; import com.azure.resourcemanager.azurestackhci.models.NetworkInterfacesOperations; +import com.azure.resourcemanager.azurestackhci.models.Offers; import com.azure.resourcemanager.azurestackhci.models.Operations; +import com.azure.resourcemanager.azurestackhci.models.Publishers; +import com.azure.resourcemanager.azurestackhci.models.SecuritySettings; +import com.azure.resourcemanager.azurestackhci.models.Skus; import com.azure.resourcemanager.azurestackhci.models.StorageContainersOperations; +import com.azure.resourcemanager.azurestackhci.models.UpdateRuns; +import com.azure.resourcemanager.azurestackhci.models.Updates; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesOperations; import com.azure.resourcemanager.azurestackhci.models.VirtualHardDisksOperations; import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstances; import java.time.Duration; @@ -54,11 +78,22 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to AzureStackHciManager. Azure Stack HCI management service. */ +/** + * Entry point to AzureStackHciManager. + * Azure Stack HCI management service. + */ public final class AzureStackHciManager { - private GalleryImagesOperations galleryImagesOperations; + private ArcSettings arcSettings; - private Operations operations; + private Clusters clusters; + + private DeploymentSettings deploymentSettings; + + private EdgeDevices edgeDevices; + + private Extensions extensions; + + private GalleryImagesOperations galleryImagesOperations; private LogicalNetworksOperations logicalNetworksOperations; @@ -66,8 +101,24 @@ public final class AzureStackHciManager { private NetworkInterfacesOperations networkInterfacesOperations; + private Offers offers; + + private Operations operations; + + private Publishers publishers; + + private SecuritySettings securitySettings; + + private Skus skus; + private StorageContainersOperations storageContainersOperations; + private UpdateRuns updateRuns; + + private UpdateSummariesOperations updateSummariesOperations; + + private Updates updates; + private VirtualHardDisksOperations virtualHardDisksOperations; private VirtualMachineInstances virtualMachineInstances; @@ -83,18 +134,16 @@ public final class AzureStackHciManager { private AzureStackHciManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new AzureStackHciClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new AzureStackHciClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** * Creates an instance of AzureStackHci service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the AzureStackHci service API instance. @@ -107,7 +156,7 @@ public static AzureStackHciManager authenticate(TokenCredential credential, Azur /** * Creates an instance of AzureStackHci service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the AzureStackHci service API instance. @@ -120,14 +169,16 @@ public static AzureStackHciManager authenticate(HttpPipeline httpPipeline, Azure /** * Gets a Configurable instance that can be used to create AzureStackHciManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new AzureStackHciManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -199,8 +250,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -217,8 +268,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -238,15 +289,13 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") + userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.azurestackhci") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") + userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ") .append(Configuration.getGlobalConfiguration().get("os.name")) @@ -271,154 +320,289 @@ public AzureStackHciManager authenticate(TokenCredential credential, AzureProfil policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); return new AzureStackHciManager(httpPipeline, profile, defaultPollInterval); } } /** - * Gets the resource collection API of GalleryImagesOperations. It manages GalleryImages. - * - * @return Resource collection API of GalleryImagesOperations. + * Gets the resource collection API of ArcSettings. It manages ArcSetting. + * + * @return Resource collection API of ArcSettings. */ - public GalleryImagesOperations galleryImagesOperations() { - if (this.galleryImagesOperations == null) { - this.galleryImagesOperations = - new GalleryImagesOperationsImpl(clientObject.getGalleryImagesOperations(), this); + public ArcSettings arcSettings() { + if (this.arcSettings == null) { + this.arcSettings = new ArcSettingsImpl(clientObject.getArcSettings(), this); } - return galleryImagesOperations; + return arcSettings; } /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. + * Gets the resource collection API of Clusters. It manages Cluster. + * + * @return Resource collection API of Clusters. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); + public Clusters clusters() { + if (this.clusters == null) { + this.clusters = new ClustersImpl(clientObject.getClusters(), this); } - return operations; + return clusters; + } + + /** + * Gets the resource collection API of DeploymentSettings. It manages DeploymentSetting. + * + * @return Resource collection API of DeploymentSettings. + */ + public DeploymentSettings deploymentSettings() { + if (this.deploymentSettings == null) { + this.deploymentSettings = new DeploymentSettingsImpl(clientObject.getDeploymentSettings(), this); + } + return deploymentSettings; + } + + /** + * Gets the resource collection API of EdgeDevices. It manages EdgeDevice. + * + * @return Resource collection API of EdgeDevices. + */ + public EdgeDevices edgeDevices() { + if (this.edgeDevices == null) { + this.edgeDevices = new EdgeDevicesImpl(clientObject.getEdgeDevices(), this); + } + return edgeDevices; + } + + /** + * Gets the resource collection API of Extensions. It manages Extension. + * + * @return Resource collection API of Extensions. + */ + public Extensions extensions() { + if (this.extensions == null) { + this.extensions = new ExtensionsImpl(clientObject.getExtensions(), this); + } + return extensions; + } + + /** + * Gets the resource collection API of GalleryImagesOperations. It manages GalleryImages. + * + * @return Resource collection API of GalleryImagesOperations. + */ + public GalleryImagesOperations galleryImagesOperations() { + if (this.galleryImagesOperations == null) { + this.galleryImagesOperations + = new GalleryImagesOperationsImpl(clientObject.getGalleryImagesOperations(), this); + } + return galleryImagesOperations; } /** * Gets the resource collection API of LogicalNetworksOperations. It manages LogicalNetworks. - * + * * @return Resource collection API of LogicalNetworksOperations. */ public LogicalNetworksOperations logicalNetworksOperations() { if (this.logicalNetworksOperations == null) { - this.logicalNetworksOperations = - new LogicalNetworksOperationsImpl(clientObject.getLogicalNetworksOperations(), this); + this.logicalNetworksOperations + = new LogicalNetworksOperationsImpl(clientObject.getLogicalNetworksOperations(), this); } return logicalNetworksOperations; } /** * Gets the resource collection API of MarketplaceGalleryImagesOperations. It manages MarketplaceGalleryImages. - * + * * @return Resource collection API of MarketplaceGalleryImagesOperations. */ public MarketplaceGalleryImagesOperations marketplaceGalleryImagesOperations() { if (this.marketplaceGalleryImagesOperations == null) { - this.marketplaceGalleryImagesOperations = - new MarketplaceGalleryImagesOperationsImpl(clientObject.getMarketplaceGalleryImagesOperations(), this); + this.marketplaceGalleryImagesOperations = new MarketplaceGalleryImagesOperationsImpl( + clientObject.getMarketplaceGalleryImagesOperations(), this); } return marketplaceGalleryImagesOperations; } /** * Gets the resource collection API of NetworkInterfacesOperations. It manages NetworkInterfaces. - * + * * @return Resource collection API of NetworkInterfacesOperations. */ public NetworkInterfacesOperations networkInterfacesOperations() { if (this.networkInterfacesOperations == null) { - this.networkInterfacesOperations = - new NetworkInterfacesOperationsImpl(clientObject.getNetworkInterfacesOperations(), this); + this.networkInterfacesOperations + = new NetworkInterfacesOperationsImpl(clientObject.getNetworkInterfacesOperations(), this); } return networkInterfacesOperations; } + /** + * Gets the resource collection API of Offers. + * + * @return Resource collection API of Offers. + */ + public Offers offers() { + if (this.offers == null) { + this.offers = new OffersImpl(clientObject.getOffers(), this); + } + return offers; + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of Publishers. + * + * @return Resource collection API of Publishers. + */ + public Publishers publishers() { + if (this.publishers == null) { + this.publishers = new PublishersImpl(clientObject.getPublishers(), this); + } + return publishers; + } + + /** + * Gets the resource collection API of SecuritySettings. It manages SecuritySetting. + * + * @return Resource collection API of SecuritySettings. + */ + public SecuritySettings securitySettings() { + if (this.securitySettings == null) { + this.securitySettings = new SecuritySettingsImpl(clientObject.getSecuritySettings(), this); + } + return securitySettings; + } + + /** + * Gets the resource collection API of Skus. + * + * @return Resource collection API of Skus. + */ + public Skus skus() { + if (this.skus == null) { + this.skus = new SkusImpl(clientObject.getSkus(), this); + } + return skus; + } + /** * Gets the resource collection API of StorageContainersOperations. It manages StorageContainers. - * + * * @return Resource collection API of StorageContainersOperations. */ public StorageContainersOperations storageContainersOperations() { if (this.storageContainersOperations == null) { - this.storageContainersOperations = - new StorageContainersOperationsImpl(clientObject.getStorageContainersOperations(), this); + this.storageContainersOperations + = new StorageContainersOperationsImpl(clientObject.getStorageContainersOperations(), this); } return storageContainersOperations; } + /** + * Gets the resource collection API of UpdateRuns. It manages UpdateRun. + * + * @return Resource collection API of UpdateRuns. + */ + public UpdateRuns updateRuns() { + if (this.updateRuns == null) { + this.updateRuns = new UpdateRunsImpl(clientObject.getUpdateRuns(), this); + } + return updateRuns; + } + + /** + * Gets the resource collection API of UpdateSummariesOperations. + * + * @return Resource collection API of UpdateSummariesOperations. + */ + public UpdateSummariesOperations updateSummariesOperations() { + if (this.updateSummariesOperations == null) { + this.updateSummariesOperations + = new UpdateSummariesOperationsImpl(clientObject.getUpdateSummariesOperations(), this); + } + return updateSummariesOperations; + } + + /** + * Gets the resource collection API of Updates. It manages HciUpdate. + * + * @return Resource collection API of Updates. + */ + public Updates updates() { + if (this.updates == null) { + this.updates = new UpdatesImpl(clientObject.getUpdates(), this); + } + return updates; + } + /** * Gets the resource collection API of VirtualHardDisksOperations. It manages VirtualHardDisks. - * + * * @return Resource collection API of VirtualHardDisksOperations. */ public VirtualHardDisksOperations virtualHardDisksOperations() { if (this.virtualHardDisksOperations == null) { - this.virtualHardDisksOperations = - new VirtualHardDisksOperationsImpl(clientObject.getVirtualHardDisksOperations(), this); + this.virtualHardDisksOperations + = new VirtualHardDisksOperationsImpl(clientObject.getVirtualHardDisksOperations(), this); } return virtualHardDisksOperations; } /** * Gets the resource collection API of VirtualMachineInstances. - * + * * @return Resource collection API of VirtualMachineInstances. */ public VirtualMachineInstances virtualMachineInstances() { if (this.virtualMachineInstances == null) { - this.virtualMachineInstances = - new VirtualMachineInstancesImpl(clientObject.getVirtualMachineInstances(), this); + this.virtualMachineInstances + = new VirtualMachineInstancesImpl(clientObject.getVirtualMachineInstances(), this); } return virtualMachineInstances; } /** * Gets the resource collection API of HybridIdentityMetadatas. - * + * * @return Resource collection API of HybridIdentityMetadatas. */ public HybridIdentityMetadatas hybridIdentityMetadatas() { if (this.hybridIdentityMetadatas == null) { - this.hybridIdentityMetadatas = - new HybridIdentityMetadatasImpl(clientObject.getHybridIdentityMetadatas(), this); + this.hybridIdentityMetadatas + = new HybridIdentityMetadatasImpl(clientObject.getHybridIdentityMetadatas(), this); } return hybridIdentityMetadatas; } /** * Gets the resource collection API of GuestAgents. - * + * * @return Resource collection API of GuestAgents. */ public GuestAgents guestAgents() { @@ -430,7 +614,7 @@ public GuestAgents guestAgents() { /** * Gets the resource collection API of GuestAgentsOperations. - * + * * @return Resource collection API of GuestAgentsOperations. */ public GuestAgentsOperations guestAgentsOperations() { @@ -443,7 +627,7 @@ public GuestAgentsOperations guestAgentsOperations() { /** * Gets wrapped service client AzureStackHciClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. - * + * * @return Wrapped service client AzureStackHciClient. */ public AzureStackHciClient serviceClient() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java new file mode 100644 index 0000000000000..b1ea2a3c20a38 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ArcSettingsClient.java @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner; +import com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch; + +/** + * An instance of this class provides access to all the operations defined in ArcSettingsClient. + */ +public interface ArcSettingsClient { + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcSetting resource details of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + Context context); + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcSetting resource details of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArcSettingInner get(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Create ArcSetting for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. + * @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 arcSetting details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + ArcSettingInner arcSetting, Context context); + + /** + * Create ArcSetting for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. + * @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 arcSetting details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArcSettingInner create(String resourceGroupName, String clusterName, String arcSettingName, + ArcSettingInner arcSetting); + + /** + * Update ArcSettings for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting ArcSettings parameters that needs to be updated. + * @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 arcSetting details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + ArcSettingsPatch arcSetting, Context context); + + /** + * Update ArcSettings for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting ArcSettings parameters that needs to be updated. + * @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 arcSetting details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArcSettingInner update(String resourceGroupName, String clusterName, String arcSettingName, + ArcSettingsPatch arcSetting); + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName, + Context context); + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context); + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generatePasswordWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, Context context); + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PasswordCredentialInner generatePassword(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 {@link SyncPoller} for polling of arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArcIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 {@link SyncPoller} for polling of arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ArcIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName, String arcSettingName, Context context); + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, String arcSettingName, + Context context); + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcSetting details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response consentAndInstallDefaultExtensionsWithResponse(String resourceGroupName, + String clusterName, String arcSettingName, Context context); + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcSetting details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ArcSettingInner consentAndInstallDefaultExtensions(String resourceGroupName, String clusterName, + String arcSettingName); + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginInitializeDisableProcess(String resourceGroupName, String clusterName, + String arcSettingName); + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginInitializeDisableProcess(String resourceGroupName, String clusterName, + String arcSettingName, Context context); + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java index 33641ac014989..cbc3ac09a81ac 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/AzureStackHciClient.java @@ -7,116 +7,202 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for AzureStackHciClient class. */ +/** + * The interface for AzureStackHciClient class. + */ public interface AzureStackHciClient { /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** - * Gets the GalleryImagesOperationsClient object to access its operations. - * - * @return the GalleryImagesOperationsClient object. + * Gets the ArcSettingsClient object to access its operations. + * + * @return the ArcSettingsClient object. */ - GalleryImagesOperationsClient getGalleryImagesOperations(); + ArcSettingsClient getArcSettings(); /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. + * Gets the ClustersClient object to access its operations. + * + * @return the ClustersClient object. */ - OperationsClient getOperations(); + ClustersClient getClusters(); + + /** + * Gets the DeploymentSettingsClient object to access its operations. + * + * @return the DeploymentSettingsClient object. + */ + DeploymentSettingsClient getDeploymentSettings(); + + /** + * Gets the EdgeDevicesClient object to access its operations. + * + * @return the EdgeDevicesClient object. + */ + EdgeDevicesClient getEdgeDevices(); + + /** + * Gets the ExtensionsClient object to access its operations. + * + * @return the ExtensionsClient object. + */ + ExtensionsClient getExtensions(); + + /** + * Gets the GalleryImagesOperationsClient object to access its operations. + * + * @return the GalleryImagesOperationsClient object. + */ + GalleryImagesOperationsClient getGalleryImagesOperations(); /** * Gets the LogicalNetworksOperationsClient object to access its operations. - * + * * @return the LogicalNetworksOperationsClient object. */ LogicalNetworksOperationsClient getLogicalNetworksOperations(); /** * Gets the MarketplaceGalleryImagesOperationsClient object to access its operations. - * + * * @return the MarketplaceGalleryImagesOperationsClient object. */ MarketplaceGalleryImagesOperationsClient getMarketplaceGalleryImagesOperations(); /** * Gets the NetworkInterfacesOperationsClient object to access its operations. - * + * * @return the NetworkInterfacesOperationsClient object. */ NetworkInterfacesOperationsClient getNetworkInterfacesOperations(); + /** + * Gets the OffersClient object to access its operations. + * + * @return the OffersClient object. + */ + OffersClient getOffers(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the PublishersClient object to access its operations. + * + * @return the PublishersClient object. + */ + PublishersClient getPublishers(); + + /** + * Gets the SecuritySettingsClient object to access its operations. + * + * @return the SecuritySettingsClient object. + */ + SecuritySettingsClient getSecuritySettings(); + + /** + * Gets the SkusClient object to access its operations. + * + * @return the SkusClient object. + */ + SkusClient getSkus(); + /** * Gets the StorageContainersOperationsClient object to access its operations. - * + * * @return the StorageContainersOperationsClient object. */ StorageContainersOperationsClient getStorageContainersOperations(); + /** + * Gets the UpdateRunsClient object to access its operations. + * + * @return the UpdateRunsClient object. + */ + UpdateRunsClient getUpdateRuns(); + + /** + * Gets the UpdateSummariesOperationsClient object to access its operations. + * + * @return the UpdateSummariesOperationsClient object. + */ + UpdateSummariesOperationsClient getUpdateSummariesOperations(); + + /** + * Gets the UpdatesClient object to access its operations. + * + * @return the UpdatesClient object. + */ + UpdatesClient getUpdates(); + /** * Gets the VirtualHardDisksOperationsClient object to access its operations. - * + * * @return the VirtualHardDisksOperationsClient object. */ VirtualHardDisksOperationsClient getVirtualHardDisksOperations(); /** * Gets the VirtualMachineInstancesClient object to access its operations. - * + * * @return the VirtualMachineInstancesClient object. */ VirtualMachineInstancesClient getVirtualMachineInstances(); /** * Gets the HybridIdentityMetadatasClient object to access its operations. - * + * * @return the HybridIdentityMetadatasClient object. */ HybridIdentityMetadatasClient getHybridIdentityMetadatas(); /** * Gets the GuestAgentsClient object to access its operations. - * + * * @return the GuestAgentsClient object. */ GuestAgentsClient getGuestAgents(); /** * Gets the GuestAgentsOperationsClient object to access its operations. - * + * * @return the GuestAgentsOperationsClient object. */ GuestAgentsOperationsClient getGuestAgentsOperations(); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java new file mode 100644 index 0000000000000..98a1661602d89 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ClustersClient.java @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; +import com.azure.resourcemanager.azurestackhci.models.ClusterPatch; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; +import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; + +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ +public interface ClustersClient { + /** + * List all HCI clusters in a subscription. + * + * @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 list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all HCI clusters in a subscription. + * + * @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 list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 hCI cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context); + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 hCI cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Create an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @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 cluster details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse(String resourceGroupName, String clusterName, ClusterInner cluster, + Context context); + + /** + * Create an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @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 cluster details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner create(String resourceGroupName, String clusterName, ClusterInner cluster); + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @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 cluster details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String clusterName, ClusterPatch cluster, + Context context); + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @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 cluster details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch cluster); + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName); + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context); + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName); + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, Context context); + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest); + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context); + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest); + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context); + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 {@link SyncPoller} for polling of cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName); + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 {@link SyncPoller} for polling of cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName, Context context); + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName); + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, Context context); + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @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 {@link SyncPoller} for polling of cluster details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit(String resourceGroupName, + String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest); + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @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 {@link SyncPoller} for polling of cluster details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit(String resourceGroupName, + String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context); + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @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 cluster details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest); + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @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 cluster details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java new file mode 100644 index 0000000000000..3ab4e14034eb6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/DeploymentSettingsClient.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner; + +/** + * An instance of this class provides access to all the operations defined in DeploymentSettingsClient. + */ +public interface DeploymentSettingsClient { + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByClusters(String resourceGroupName, String clusterName); + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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 a DeploymentSetting along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context); + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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 a DeploymentSetting. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentSettingInner get(String resourceGroupName, String clusterName, String deploymentSettingsName); + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @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 {@link SyncPoller} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentSettingInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String deploymentSettingsName, DeploymentSettingInner resource); + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @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 {@link SyncPoller} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DeploymentSettingInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String deploymentSettingsName, DeploymentSettingInner resource, Context context); + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @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 edge device resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentSettingInner createOrUpdate(String resourceGroupName, String clusterName, String deploymentSettingsName, + DeploymentSettingInner resource); + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @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 edge device resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentSettingInner createOrUpdate(String resourceGroupName, String clusterName, String deploymentSettingsName, + DeploymentSettingInner resource, Context context); + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String deploymentSettingsName); + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context); + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String deploymentSettingsName); + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java new file mode 100644 index 0000000000000..f7d9780db850f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/EdgeDevicesClient.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner; +import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; + +/** + * An instance of this class provides access to all the operations defined in EdgeDevicesClient. + */ +public interface EdgeDevicesClient { + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceUri); + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceUri, Context context); + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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 a EdgeDevice along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceUri, String edgeDeviceName, Context context); + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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 a EdgeDevice. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeDeviceInner get(String resourceUri, String edgeDeviceName); + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @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 {@link SyncPoller} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeDeviceInner> beginCreateOrUpdate(String resourceUri, + String edgeDeviceName, EdgeDeviceInner resource); + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @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 {@link SyncPoller} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EdgeDeviceInner> beginCreateOrUpdate(String resourceUri, + String edgeDeviceName, EdgeDeviceInner resource, Context context); + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @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 edge device resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource); + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @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 edge device resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource, + Context context); + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceUri, String edgeDeviceName); + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceUri, String edgeDeviceName, Context context); + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceUri, String edgeDeviceName); + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceUri, String edgeDeviceName, Context context); + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @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 {@link SyncPoller} for polling of an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateResponseInner> beginValidate(String resourceUri, + String edgeDeviceName, ValidateRequest validateRequest); + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @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 {@link SyncPoller} for polling of an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ValidateResponseInner> beginValidate(String resourceUri, + String edgeDeviceName, ValidateRequest validateRequest, Context context); + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @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 an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateResponseInner validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest); + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @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 an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateResponseInner validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest, + Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java new file mode 100644 index 0000000000000..9c174e73450b2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/ExtensionsClient.java @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner; +import com.azure.resourcemanager.azurestackhci.models.ExtensionPatch; +import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; + +/** + * An instance of this class provides access to all the operations defined in ExtensionsClient. + */ +public interface ExtensionsClient { + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName, + Context context); + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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 particular Arc Extension of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, Context context); + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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 particular Arc Extension of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionInner get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName); + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @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 {@link SyncPoller} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExtensionInner> beginCreate(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionInner extension); + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @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 {@link SyncPoller} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExtensionInner> beginCreate(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionInner extension, Context context); + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @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 details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionInner create(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionInner extension); + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @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 details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionInner create(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionInner extension, Context context); + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @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 {@link SyncPoller} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExtensionInner> beginUpdate(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionPatch extension); + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @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 {@link SyncPoller} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExtensionInner> beginUpdate(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionPatch extension, Context context); + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @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 details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionInner update(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionPatch extension); + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @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 details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionInner update(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionPatch extension, Context context); + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName); + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, Context context); + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName); + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + Context context); + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpgrade(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters); + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginUpgrade(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, Context context); + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionUpgradeParameters extensionUpgradeParameters); + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionUpgradeParameters extensionUpgradeParameters, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GalleryImagesOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GalleryImagesOperationsClient.java index 8ac30aa17d8ce..9740484b9ad5a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GalleryImagesOperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GalleryImagesOperationsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.GalleryImagesInner; import com.azure.resourcemanager.azurestackhci.models.GalleryImagesUpdateRequest; -/** An instance of this class provides access to all the operations defined in GalleryImagesOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in GalleryImagesOperationsClient. + */ public interface GalleryImagesOperationsClient { /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -28,12 +30,12 @@ public interface GalleryImagesOperationsClient { * @return a gallery image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String galleryImageName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String galleryImageName, + Context context); /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +49,7 @@ Response getByResourceGroupWithResponse( /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -57,13 +59,13 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GalleryImagesInner> beginCreateOrUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages); + SyncPoller, GalleryImagesInner> beginCreateOrUpdate(String resourceGroupName, + String galleryImageName, GalleryImagesInner galleryImages); /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -74,13 +76,13 @@ SyncPoller, GalleryImagesInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GalleryImagesInner> beginCreateOrUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages, Context context); + SyncPoller, GalleryImagesInner> beginCreateOrUpdate(String resourceGroupName, + String galleryImageName, GalleryImagesInner galleryImages, Context context); /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -90,13 +92,13 @@ SyncPoller, GalleryImagesInner> beginCreateOrUpda * @return the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - GalleryImagesInner createOrUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages); + GalleryImagesInner createOrUpdate(String resourceGroupName, String galleryImageName, + GalleryImagesInner galleryImages); /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -107,12 +109,12 @@ GalleryImagesInner createOrUpdate( * @return the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - GalleryImagesInner createOrUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages, Context context); + GalleryImagesInner createOrUpdate(String resourceGroupName, String galleryImageName, + GalleryImagesInner galleryImages, Context context); /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,7 +127,7 @@ GalleryImagesInner createOrUpdate( /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -139,7 +141,7 @@ GalleryImagesInner createOrUpdate( /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,7 +153,7 @@ GalleryImagesInner createOrUpdate( /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -164,7 +166,7 @@ GalleryImagesInner createOrUpdate( /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -174,12 +176,12 @@ GalleryImagesInner createOrUpdate( * @return the {@link SyncPoller} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GalleryImagesInner> beginUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages); + SyncPoller, GalleryImagesInner> beginUpdate(String resourceGroupName, + String galleryImageName, GalleryImagesUpdateRequest galleryImages); /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -190,12 +192,12 @@ SyncPoller, GalleryImagesInner> beginUpdate( * @return the {@link SyncPoller} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GalleryImagesInner> beginUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context); + SyncPoller, GalleryImagesInner> beginUpdate(String resourceGroupName, + String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context); /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -205,12 +207,12 @@ SyncPoller, GalleryImagesInner> beginUpdate( * @return the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - GalleryImagesInner update( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages); + GalleryImagesInner update(String resourceGroupName, String galleryImageName, + GalleryImagesUpdateRequest galleryImages); /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -221,13 +223,13 @@ GalleryImagesInner update( * @return the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - GalleryImagesInner update( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context); + GalleryImagesInner update(String resourceGroupName, String galleryImageName, + GalleryImagesUpdateRequest galleryImages, Context context); /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -240,7 +242,7 @@ GalleryImagesInner update( /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,7 +256,7 @@ GalleryImagesInner update( /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @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 list of gallery images as paginated response with {@link PagedIterable}. @@ -265,7 +267,7 @@ GalleryImagesInner update( /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GuestAgentsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GuestAgentsClient.java index 22aeedc79f55d..71fff973f7316 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GuestAgentsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GuestAgentsClient.java @@ -12,15 +12,17 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.azurestackhci.fluent.models.GuestAgentInner; -/** An instance of this class provides access to all the operations defined in GuestAgentsClient. */ +/** + * An instance of this class provides access to all the operations defined in GuestAgentsClient. + */ public interface GuestAgentsClient { /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -31,11 +33,11 @@ public interface GuestAgentsClient { /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -44,16 +46,16 @@ public interface GuestAgentsClient { * @return the {@link SyncPoller} for polling of defines the GuestAgent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, GuestAgentInner> beginCreate( - String resourceUri, GuestAgentInner body, Context context); + SyncPoller, GuestAgentInner> beginCreate(String resourceUri, GuestAgentInner body, + Context context); /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -64,11 +66,11 @@ SyncPoller, GuestAgentInner> beginCreate( /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,11 +83,11 @@ SyncPoller, GuestAgentInner> beginCreate( /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -97,11 +99,11 @@ SyncPoller, GuestAgentInner> beginCreate( /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -112,11 +114,11 @@ SyncPoller, GuestAgentInner> beginCreate( /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -127,11 +129,11 @@ SyncPoller, GuestAgentInner> beginCreate( /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -143,11 +145,11 @@ SyncPoller, GuestAgentInner> beginCreate( /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -157,11 +159,11 @@ SyncPoller, GuestAgentInner> beginCreate( /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GuestAgentsOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GuestAgentsOperationsClient.java index 6bda752073d44..85e748c6c412b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GuestAgentsOperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/GuestAgentsOperationsClient.java @@ -10,15 +10,17 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.azurestackhci.fluent.models.GuestAgentInner; -/** An instance of this class provides access to all the operations defined in GuestAgentsOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in GuestAgentsOperationsClient. + */ public interface GuestAgentsOperationsClient { /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -29,11 +31,11 @@ public interface GuestAgentsOperationsClient { /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/HybridIdentityMetadatasClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/HybridIdentityMetadatasClient.java index 8082f894a4d09..4ed15fa023b9f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/HybridIdentityMetadatasClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/HybridIdentityMetadatasClient.java @@ -11,15 +11,17 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.azurestackhci.fluent.models.HybridIdentityMetadataInner; -/** An instance of this class provides access to all the operations defined in HybridIdentityMetadatasClient. */ +/** + * An instance of this class provides access to all the operations defined in HybridIdentityMetadatasClient. + */ public interface HybridIdentityMetadatasClient { /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -31,11 +33,11 @@ public interface HybridIdentityMetadatasClient { /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -46,11 +48,11 @@ public interface HybridIdentityMetadatasClient { /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -61,11 +63,11 @@ public interface HybridIdentityMetadatasClient { /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/LogicalNetworksOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/LogicalNetworksOperationsClient.java index 5766077dab834..c7245e32d8613 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/LogicalNetworksOperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/LogicalNetworksOperationsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.LogicalNetworksInner; import com.azure.resourcemanager.azurestackhci.models.LogicalNetworksUpdateRequest; -/** An instance of this class provides access to all the operations defined in LogicalNetworksOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LogicalNetworksOperationsClient. + */ public interface LogicalNetworksOperationsClient { /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -28,12 +30,12 @@ public interface LogicalNetworksOperationsClient { * @return the logical network resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String logicalNetworkName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String logicalNetworkName, + Context context); /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +49,7 @@ Response getByResourceGroupWithResponse( /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -57,13 +59,13 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of the logical network resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogicalNetworksInner> beginCreateOrUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks); + SyncPoller, LogicalNetworksInner> beginCreateOrUpdate(String resourceGroupName, + String logicalNetworkName, LogicalNetworksInner logicalNetworks); /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -74,13 +76,13 @@ SyncPoller, LogicalNetworksInner> beginCreateOr * @return the {@link SyncPoller} for polling of the logical network resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogicalNetworksInner> beginCreateOrUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context); + SyncPoller, LogicalNetworksInner> beginCreateOrUpdate(String resourceGroupName, + String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context); /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -90,13 +92,13 @@ SyncPoller, LogicalNetworksInner> beginCreateOr * @return the logical network resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogicalNetworksInner createOrUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks); + LogicalNetworksInner createOrUpdate(String resourceGroupName, String logicalNetworkName, + LogicalNetworksInner logicalNetworks); /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -107,12 +109,12 @@ LogicalNetworksInner createOrUpdate( * @return the logical network resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogicalNetworksInner createOrUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context); + LogicalNetworksInner createOrUpdate(String resourceGroupName, String logicalNetworkName, + LogicalNetworksInner logicalNetworks, Context context); /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,7 +127,7 @@ LogicalNetworksInner createOrUpdate( /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -135,12 +137,12 @@ LogicalNetworksInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String logicalNetworkName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String logicalNetworkName, + Context context); /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +154,7 @@ SyncPoller, Void> beginDelete( /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -165,7 +167,7 @@ SyncPoller, Void> beginDelete( /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -175,12 +177,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of the logical network resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogicalNetworksInner> beginUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks); + SyncPoller, LogicalNetworksInner> beginUpdate(String resourceGroupName, + String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks); /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -191,15 +193,12 @@ SyncPoller, LogicalNetworksInner> beginUpdate( * @return the {@link SyncPoller} for polling of the logical network resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogicalNetworksInner> beginUpdate( - String resourceGroupName, - String logicalNetworkName, - LogicalNetworksUpdateRequest logicalNetworks, - Context context); + SyncPoller, LogicalNetworksInner> beginUpdate(String resourceGroupName, + String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks, Context context); /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -209,12 +208,12 @@ SyncPoller, LogicalNetworksInner> beginUpdate( * @return the logical network resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogicalNetworksInner update( - String resourceGroupName, String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks); + LogicalNetworksInner update(String resourceGroupName, String logicalNetworkName, + LogicalNetworksUpdateRequest logicalNetworks); /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -225,16 +224,13 @@ LogicalNetworksInner update( * @return the logical network resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogicalNetworksInner update( - String resourceGroupName, - String logicalNetworkName, - LogicalNetworksUpdateRequest logicalNetworks, - Context context); + LogicalNetworksInner update(String resourceGroupName, String logicalNetworkName, + LogicalNetworksUpdateRequest logicalNetworks, Context context); /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -247,7 +243,7 @@ LogicalNetworksInner update( /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,7 +257,7 @@ LogicalNetworksInner update( /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @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 paginated response with {@link PagedIterable}. @@ -272,7 +268,7 @@ LogicalNetworksInner update( /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/MarketplaceGalleryImagesOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/MarketplaceGalleryImagesOperationsClient.java index b082967a0ae2c..1a3a1264cc5af 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/MarketplaceGalleryImagesOperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/MarketplaceGalleryImagesOperationsClient.java @@ -20,7 +20,7 @@ public interface MarketplaceGalleryImagesOperationsClient { /** * Gets a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -30,12 +30,12 @@ public interface MarketplaceGalleryImagesOperationsClient { * @return a marketplace gallery image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String marketplaceGalleryImageName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String marketplaceGalleryImageName, Context context); /** * Gets a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +49,7 @@ Response getByResourceGroupWithResponse( /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -60,14 +60,13 @@ Response getByResourceGroupWithResponse( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MarketplaceGalleryImagesInner> beginCreateOrUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, + String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages); /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -79,15 +78,13 @@ SyncPoller, MarketplaceGalleryImagesIn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MarketplaceGalleryImagesInner> beginCreateOrUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages, - Context context); + String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesInner marketplaceGalleryImages, Context context); /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -97,15 +94,13 @@ SyncPoller, MarketplaceGalleryImagesIn * @return the marketplace gallery image resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceGalleryImagesInner createOrUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, + MarketplaceGalleryImagesInner createOrUpdate(String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages); /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -116,15 +111,12 @@ MarketplaceGalleryImagesInner createOrUpdate( * @return the marketplace gallery image resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceGalleryImagesInner createOrUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages, - Context context); + MarketplaceGalleryImagesInner createOrUpdate(String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesInner marketplaceGalleryImages, Context context); /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +129,7 @@ MarketplaceGalleryImagesInner createOrUpdate( /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -147,12 +139,12 @@ MarketplaceGalleryImagesInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String marketplaceGalleryImageName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String marketplaceGalleryImageName, + Context context); /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,7 +156,7 @@ SyncPoller, Void> beginDelete( /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -177,7 +169,7 @@ SyncPoller, Void> beginDelete( /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -188,13 +180,12 @@ SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MarketplaceGalleryImagesInner> beginUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, + String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages); /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -206,14 +197,12 @@ SyncPoller, MarketplaceGalleryImagesIn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, MarketplaceGalleryImagesInner> beginUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, - Context context); + String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, Context context); /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -223,14 +212,12 @@ SyncPoller, MarketplaceGalleryImagesIn * @return the marketplace gallery image resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceGalleryImagesInner update( - String resourceGroupName, - String marketplaceGalleryImageName, + MarketplaceGalleryImagesInner update(String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages); /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -241,16 +228,13 @@ MarketplaceGalleryImagesInner update( * @return the marketplace gallery image resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceGalleryImagesInner update( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, - Context context); + MarketplaceGalleryImagesInner update(String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, Context context); /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -263,7 +247,7 @@ MarketplaceGalleryImagesInner update( /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,7 +261,7 @@ MarketplaceGalleryImagesInner update( /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @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 paginated response with {@link PagedIterable}. @@ -288,7 +272,7 @@ MarketplaceGalleryImagesInner update( /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/NetworkInterfacesOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/NetworkInterfacesOperationsClient.java index e090bed11e54e..8ef593999b644 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/NetworkInterfacesOperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/NetworkInterfacesOperationsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.NetworkInterfacesInner; import com.azure.resourcemanager.azurestackhci.models.NetworkInterfacesUpdateRequest; -/** An instance of this class provides access to all the operations defined in NetworkInterfacesOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in NetworkInterfacesOperationsClient. + */ public interface NetworkInterfacesOperationsClient { /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -28,12 +30,12 @@ public interface NetworkInterfacesOperationsClient { * @return a network interface along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String networkInterfaceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String networkInterfaceName, Context context); /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +49,7 @@ Response getByResourceGroupWithResponse( /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -57,13 +59,13 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of the network interface resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkInterfacesInner> beginCreateOrUpdate( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces); + SyncPoller, NetworkInterfacesInner> beginCreateOrUpdate(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesInner networkInterfaces); /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -74,16 +76,13 @@ SyncPoller, NetworkInterfacesInner> beginCrea * @return the {@link SyncPoller} for polling of the network interface resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkInterfacesInner> beginCreateOrUpdate( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesInner networkInterfaces, - Context context); + SyncPoller, NetworkInterfacesInner> beginCreateOrUpdate(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesInner networkInterfaces, Context context); /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -93,13 +92,13 @@ SyncPoller, NetworkInterfacesInner> beginCrea * @return the network interface resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfacesInner createOrUpdate( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces); + NetworkInterfacesInner createOrUpdate(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesInner networkInterfaces); /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -110,15 +109,12 @@ NetworkInterfacesInner createOrUpdate( * @return the network interface resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfacesInner createOrUpdate( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesInner networkInterfaces, - Context context); + NetworkInterfacesInner createOrUpdate(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesInner networkInterfaces, Context context); /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +127,7 @@ NetworkInterfacesInner createOrUpdate( /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -141,12 +137,12 @@ NetworkInterfacesInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String networkInterfaceName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String networkInterfaceName, + Context context); /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,7 +154,7 @@ SyncPoller, Void> beginDelete( /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -171,7 +167,7 @@ SyncPoller, Void> beginDelete( /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -181,12 +177,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of the network interface resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkInterfacesInner> beginUpdate( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces); + SyncPoller, NetworkInterfacesInner> beginUpdate(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces); /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -197,15 +193,12 @@ SyncPoller, NetworkInterfacesInner> beginUpda * @return the {@link SyncPoller} for polling of the network interface resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NetworkInterfacesInner> beginUpdate( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesUpdateRequest networkInterfaces, - Context context); + SyncPoller, NetworkInterfacesInner> beginUpdate(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces, Context context); /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -215,12 +208,12 @@ SyncPoller, NetworkInterfacesInner> beginUpda * @return the network interface resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfacesInner update( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces); + NetworkInterfacesInner update(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesUpdateRequest networkInterfaces); /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -231,16 +224,13 @@ NetworkInterfacesInner update( * @return the network interface resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - NetworkInterfacesInner update( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesUpdateRequest networkInterfaces, - Context context); + NetworkInterfacesInner update(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesUpdateRequest networkInterfaces, Context context); /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -253,7 +243,7 @@ NetworkInterfacesInner update( /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,7 +257,7 @@ NetworkInterfacesInner update( /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @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 paginated response with {@link PagedIterable}. @@ -278,7 +268,7 @@ NetworkInterfacesInner update( /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java new file mode 100644 index 0000000000000..9e145741b219b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OffersClient.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner; + +/** + * An instance of this class provides access to all the operations defined in OffersClient. + */ +public interface OffersClient { + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @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 list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName); + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, + String expand, Context context); + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, + Context context); + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 offer resource details within a publisher of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context); + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @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 offer resource details within a publisher of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OfferInner get(String resourceGroupName, String clusterName, String publisherName, String offerName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java index fbbf0196b3ed7..6feec3a3c889f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/OperationsClient.java @@ -6,33 +6,33 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** - * List all the supported operations. - * + * List all available Microsoft.AzureStackHCI provider operations. + * + * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(Context context); /** - * List all the supported operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List all available Microsoft.AzureStackHCI provider operations. + * * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + OperationListResultInner list(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PublishersClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PublishersClient.java new file mode 100644 index 0000000000000..fc00e8192d2e0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/PublishersClient.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; + +/** + * An instance of this class provides access to all the operations defined in PublishersClient. + */ +public interface PublishersClient { + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @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 publisher resource details of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + Context context); + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @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 publisher resource details of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublisherInner get(String resourceGroupName, String clusterName, String publisherName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java new file mode 100644 index 0000000000000..4892d4ba3fe35 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SecuritySettingsClient.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; + +/** + * An instance of this class provides access to all the operations defined in SecuritySettingsClient. + */ +public interface SecuritySettingsClient { + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByClusters(String resourceGroupName, String clusterName); + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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 a SecuritySetting along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, + String securitySettingsName, Context context); + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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 a SecuritySetting. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SecuritySettingInner get(String resourceGroupName, String clusterName, String securitySettingsName); + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @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 {@link SyncPoller} for polling of security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SecuritySettingInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String securitySettingsName, SecuritySettingInner resource); + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @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 {@link SyncPoller} for polling of security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SecuritySettingInner> beginCreateOrUpdate(String resourceGroupName, + String clusterName, String securitySettingsName, SecuritySettingInner resource, Context context); + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @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 security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SecuritySettingInner createOrUpdate(String resourceGroupName, String clusterName, String securitySettingsName, + SecuritySettingInner resource); + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @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 security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SecuritySettingInner createOrUpdate(String resourceGroupName, String clusterName, String securitySettingsName, + SecuritySettingInner resource, Context context); + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String securitySettingsName); + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String securitySettingsName, Context context); + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String securitySettingsName); + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java new file mode 100644 index 0000000000000..7cf73f5cbfe91 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/SkusClient.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner; + +/** + * An instance of this class provides access to all the operations defined in SkusClient. + */ +public interface SkusClient { + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @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 list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName); + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context); + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 sKU resource details within a offer of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String skuName, String expand, Context context); + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @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 sKU resource details within a offer of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SkuInner get(String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/StorageContainersOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/StorageContainersOperationsClient.java index 3f85568128571..a3b7b0ba2f3cd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/StorageContainersOperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/StorageContainersOperationsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.StorageContainersInner; import com.azure.resourcemanager.azurestackhci.models.StorageContainersUpdateRequest; -/** An instance of this class provides access to all the operations defined in StorageContainersOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in StorageContainersOperationsClient. + */ public interface StorageContainersOperationsClient { /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -28,12 +30,12 @@ public interface StorageContainersOperationsClient { * @return a storage container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String storageContainerName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String storageContainerName, Context context); /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +49,7 @@ Response getByResourceGroupWithResponse( /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -57,13 +59,13 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of the storage container resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, StorageContainersInner> beginCreateOrUpdate( - String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers); + SyncPoller, StorageContainersInner> beginCreateOrUpdate(String resourceGroupName, + String storageContainerName, StorageContainersInner storageContainers); /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -74,16 +76,13 @@ SyncPoller, StorageContainersInner> beginCrea * @return the {@link SyncPoller} for polling of the storage container resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, StorageContainersInner> beginCreateOrUpdate( - String resourceGroupName, - String storageContainerName, - StorageContainersInner storageContainers, - Context context); + SyncPoller, StorageContainersInner> beginCreateOrUpdate(String resourceGroupName, + String storageContainerName, StorageContainersInner storageContainers, Context context); /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -93,13 +92,13 @@ SyncPoller, StorageContainersInner> beginCrea * @return the storage container resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageContainersInner createOrUpdate( - String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers); + StorageContainersInner createOrUpdate(String resourceGroupName, String storageContainerName, + StorageContainersInner storageContainers); /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -110,15 +109,12 @@ StorageContainersInner createOrUpdate( * @return the storage container resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageContainersInner createOrUpdate( - String resourceGroupName, - String storageContainerName, - StorageContainersInner storageContainers, - Context context); + StorageContainersInner createOrUpdate(String resourceGroupName, String storageContainerName, + StorageContainersInner storageContainers, Context context); /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +127,7 @@ StorageContainersInner createOrUpdate( /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -141,12 +137,12 @@ StorageContainersInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String storageContainerName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String storageContainerName, + Context context); /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,7 +154,7 @@ SyncPoller, Void> beginDelete( /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -171,7 +167,7 @@ SyncPoller, Void> beginDelete( /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -181,12 +177,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of the storage container resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, StorageContainersInner> beginUpdate( - String resourceGroupName, String storageContainerName, StorageContainersUpdateRequest storageContainers); + SyncPoller, StorageContainersInner> beginUpdate(String resourceGroupName, + String storageContainerName, StorageContainersUpdateRequest storageContainers); /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -197,15 +193,12 @@ SyncPoller, StorageContainersInner> beginUpda * @return the {@link SyncPoller} for polling of the storage container resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, StorageContainersInner> beginUpdate( - String resourceGroupName, - String storageContainerName, - StorageContainersUpdateRequest storageContainers, - Context context); + SyncPoller, StorageContainersInner> beginUpdate(String resourceGroupName, + String storageContainerName, StorageContainersUpdateRequest storageContainers, Context context); /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -215,12 +208,12 @@ SyncPoller, StorageContainersInner> beginUpda * @return the storage container resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageContainersInner update( - String resourceGroupName, String storageContainerName, StorageContainersUpdateRequest storageContainers); + StorageContainersInner update(String resourceGroupName, String storageContainerName, + StorageContainersUpdateRequest storageContainers); /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -231,16 +224,13 @@ StorageContainersInner update( * @return the storage container resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageContainersInner update( - String resourceGroupName, - String storageContainerName, - StorageContainersUpdateRequest storageContainers, - Context context); + StorageContainersInner update(String resourceGroupName, String storageContainerName, + StorageContainersUpdateRequest storageContainers, Context context); /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -253,7 +243,7 @@ StorageContainersInner update( /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,7 +257,7 @@ StorageContainersInner update( /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @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 paginated response with {@link PagedIterable}. @@ -278,7 +268,7 @@ StorageContainersInner update( /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java new file mode 100644 index 0000000000000..c5f5fb016c722 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateRunsClient.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner; + +/** + * An instance of this class provides access to all the operations defined in UpdateRunsClient. + */ +public interface UpdateRunsClient { + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 list of Update runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, String updateName); + + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 list of Update runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, String updateName, + Context context); + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, + String updateRunName); + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context); + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName); + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, Context context); + + /** + * Put Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @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 details of an Update run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response putWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, UpdateRunInner updateRunsProperties, Context context); + + /** + * Put Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @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 details of an Update run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateRunInner put(String resourceGroupName, String clusterName, String updateName, String updateRunName, + UpdateRunInner updateRunsProperties); + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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 Update run for a specified update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context); + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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 Update run for a specified update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateRunInner get(String resourceGroupName, String clusterName, String updateName, String updateRunName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java new file mode 100644 index 0000000000000..665da18561028 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdateSummariesOperationsClient.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; + +/** + * An instance of this class provides access to all the operations defined in UpdateSummariesOperationsClient. + */ +public interface UpdateSummariesOperationsClient { + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Update Summaries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Update Summaries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName); + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context); + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName); + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, Context context); + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @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 get the update summaries for the cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response putWithResponse(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context); + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @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 get the update summaries for the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateSummariesInner put(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties); + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 all Update summaries under the HCI cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, Context context); + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 all Update summaries under the HCI cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UpdateSummariesInner get(String resourceGroupName, String clusterName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java new file mode 100644 index 0000000000000..abb24622a230f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/UpdatesClient.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner; + +/** + * An instance of this class provides access to all the operations defined in UpdatesClient. + */ +public interface UpdatesClient { + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName); + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName, + Context context); + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void post(String resourceGroupName, String clusterName, String updateName); + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void post(String resourceGroupName, String clusterName, String updateName, Context context); + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Updates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Updates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName); + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String updateName, + Context context); + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String updateName); + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String clusterName, String updateName, Context context); + + /** + * Put specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. + * @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 update details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response putWithResponse(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties, Context context); + + /** + * Put specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. + * @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 update details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HciUpdateInner put(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties); + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 specified Update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context); + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 specified Update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HciUpdateInner get(String resourceGroupName, String clusterName, String updateName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualHardDisksOperationsClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualHardDisksOperationsClient.java index 3cdddaffc2def..5ea7b5e2fa388 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualHardDisksOperationsClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualHardDisksOperationsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.VirtualHardDisksInner; import com.azure.resourcemanager.azurestackhci.models.VirtualHardDisksUpdateRequest; -/** An instance of this class provides access to all the operations defined in VirtualHardDisksOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualHardDisksOperationsClient. + */ public interface VirtualHardDisksOperationsClient { /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -28,12 +30,12 @@ public interface VirtualHardDisksOperationsClient { * @return a virtual hard disk along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String virtualHardDiskName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String virtualHardDiskName, + Context context); /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +49,7 @@ Response getByResourceGroupWithResponse( /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -57,13 +59,13 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualHardDisksInner> beginCreateOrUpdate( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks); + SyncPoller, VirtualHardDisksInner> beginCreateOrUpdate(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks); /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -74,13 +76,13 @@ SyncPoller, VirtualHardDisksInner> beginCreate * @return the {@link SyncPoller} for polling of the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualHardDisksInner> beginCreateOrUpdate( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context); + SyncPoller, VirtualHardDisksInner> beginCreateOrUpdate(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context); /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -90,13 +92,13 @@ SyncPoller, VirtualHardDisksInner> beginCreate * @return the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualHardDisksInner createOrUpdate( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks); + VirtualHardDisksInner createOrUpdate(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksInner virtualHardDisks); /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -107,12 +109,12 @@ VirtualHardDisksInner createOrUpdate( * @return the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualHardDisksInner createOrUpdate( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context); + VirtualHardDisksInner createOrUpdate(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksInner virtualHardDisks, Context context); /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,7 +127,7 @@ VirtualHardDisksInner createOrUpdate( /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -135,12 +137,12 @@ VirtualHardDisksInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String virtualHardDiskName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String virtualHardDiskName, + Context context); /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +154,7 @@ SyncPoller, Void> beginDelete( /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -165,7 +167,7 @@ SyncPoller, Void> beginDelete( /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -175,12 +177,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualHardDisksInner> beginUpdate( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks); + SyncPoller, VirtualHardDisksInner> beginUpdate(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks); /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -191,15 +193,12 @@ SyncPoller, VirtualHardDisksInner> beginUpdate * @return the {@link SyncPoller} for polling of the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualHardDisksInner> beginUpdate( - String resourceGroupName, - String virtualHardDiskName, - VirtualHardDisksUpdateRequest virtualHardDisks, - Context context); + SyncPoller, VirtualHardDisksInner> beginUpdate(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks, Context context); /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -209,12 +208,12 @@ SyncPoller, VirtualHardDisksInner> beginUpdate * @return the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualHardDisksInner update( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks); + VirtualHardDisksInner update(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksUpdateRequest virtualHardDisks); /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -225,16 +224,13 @@ VirtualHardDisksInner update( * @return the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualHardDisksInner update( - String resourceGroupName, - String virtualHardDiskName, - VirtualHardDisksUpdateRequest virtualHardDisks, - Context context); + VirtualHardDisksInner update(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksUpdateRequest virtualHardDisks, Context context); /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -247,7 +243,7 @@ VirtualHardDisksInner update( /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,7 +257,7 @@ VirtualHardDisksInner update( /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @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 paginated response with {@link PagedIterable}. @@ -272,7 +268,7 @@ VirtualHardDisksInner update( /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualMachineInstancesClient.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualMachineInstancesClient.java index 76dba84e1664a..447cdb8290b08 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualMachineInstancesClient.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/VirtualMachineInstancesClient.java @@ -14,13 +14,15 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.VirtualMachineInstanceInner; import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpdateRequest; -/** An instance of this class provides access to all the operations defined in VirtualMachineInstancesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualMachineInstancesClient. + */ public interface VirtualMachineInstancesClient { /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -32,9 +34,9 @@ public interface VirtualMachineInstancesClient { /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -46,9 +48,9 @@ public interface VirtualMachineInstancesClient { /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -56,15 +58,15 @@ public interface VirtualMachineInstancesClient { * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInstanceInner> beginCreateOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance); + SyncPoller, VirtualMachineInstanceInner> + beginCreateOrUpdate(String resourceUri, VirtualMachineInstanceInner virtualMachineInstance); /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,15 +75,15 @@ SyncPoller, VirtualMachineInstanceInner> * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInstanceInner> beginCreateOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context); + SyncPoller, VirtualMachineInstanceInner> + beginCreateOrUpdate(String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context); /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -94,9 +96,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -105,14 +107,14 @@ SyncPoller, VirtualMachineInstanceInner> * @return the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineInstanceInner createOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context); + VirtualMachineInstanceInner createOrUpdate(String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, + Context context); /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -123,9 +125,9 @@ VirtualMachineInstanceInner createOrUpdate( /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -137,9 +139,9 @@ VirtualMachineInstanceInner createOrUpdate( /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -149,9 +151,9 @@ VirtualMachineInstanceInner createOrUpdate( /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -162,9 +164,9 @@ VirtualMachineInstanceInner createOrUpdate( /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -172,14 +174,14 @@ VirtualMachineInstanceInner createOrUpdate( * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInstanceInner> beginUpdate( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance); + SyncPoller, VirtualMachineInstanceInner> beginUpdate(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance); /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -188,14 +190,14 @@ SyncPoller, VirtualMachineInstanceInner> * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInstanceInner> beginUpdate( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context); + SyncPoller, VirtualMachineInstanceInner> beginUpdate(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context); /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -207,9 +209,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -218,14 +220,14 @@ SyncPoller, VirtualMachineInstanceInner> * @return the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineInstanceInner update( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context); + VirtualMachineInstanceInner update(String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, + Context context); /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -236,9 +238,9 @@ VirtualMachineInstanceInner update( /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -246,14 +248,14 @@ VirtualMachineInstanceInner update( * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInstanceInner> beginStart( - String resourceUri, Context context); + SyncPoller, VirtualMachineInstanceInner> beginStart(String resourceUri, + Context context); /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -264,9 +266,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -278,9 +280,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -291,9 +293,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -301,14 +303,14 @@ SyncPoller, VirtualMachineInstanceInner> * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInstanceInner> beginStop( - String resourceUri, Context context); + SyncPoller, VirtualMachineInstanceInner> beginStop(String resourceUri, + Context context); /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -319,9 +321,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -333,9 +335,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -346,9 +348,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -356,14 +358,14 @@ SyncPoller, VirtualMachineInstanceInner> * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VirtualMachineInstanceInner> beginRestart( - String resourceUri, Context context); + SyncPoller, VirtualMachineInstanceInner> beginRestart(String resourceUri, + Context context); /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -374,9 +376,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -388,9 +390,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -401,9 +403,9 @@ SyncPoller, VirtualMachineInstanceInner> /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java new file mode 100644 index 0000000000000..6e4cb06b29ccc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseInner.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ArcIdentity details. + */ +@Immutable +public final class ArcIdentityResponseInner { + /* + * ArcIdentity properties. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private ArcIdentityResponseProperties innerProperties; + + /** + * Creates an instance of ArcIdentityResponseInner class. + */ + public ArcIdentityResponseInner() { + } + + /** + * Get the innerProperties property: ArcIdentity properties. + * + * @return the innerProperties value. + */ + private ArcIdentityResponseProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the arcApplicationClientId property: The arcApplicationClientId property. + * + * @return the arcApplicationClientId value. + */ + public String arcApplicationClientId() { + return this.innerProperties() == null ? null : this.innerProperties().arcApplicationClientId(); + } + + /** + * Set the arcApplicationClientId property: The arcApplicationClientId property. + * + * @param arcApplicationClientId the arcApplicationClientId value to set. + * @return the ArcIdentityResponseInner object itself. + */ + public ArcIdentityResponseInner withArcApplicationClientId(String arcApplicationClientId) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcIdentityResponseProperties(); + } + this.innerProperties().withArcApplicationClientId(arcApplicationClientId); + return this; + } + + /** + * Get the arcApplicationTenantId property: The arcApplicationTenantId property. + * + * @return the arcApplicationTenantId value. + */ + public String arcApplicationTenantId() { + return this.innerProperties() == null ? null : this.innerProperties().arcApplicationTenantId(); + } + + /** + * Set the arcApplicationTenantId property: The arcApplicationTenantId property. + * + * @param arcApplicationTenantId the arcApplicationTenantId value to set. + * @return the ArcIdentityResponseInner object itself. + */ + public ArcIdentityResponseInner withArcApplicationTenantId(String arcApplicationTenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcIdentityResponseProperties(); + } + this.innerProperties().withArcApplicationTenantId(arcApplicationTenantId); + return this; + } + + /** + * Get the arcServicePrincipalObjectId property: The arcServicePrincipalObjectId property. + * + * @return the arcServicePrincipalObjectId value. + */ + public String arcServicePrincipalObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().arcServicePrincipalObjectId(); + } + + /** + * Set the arcServicePrincipalObjectId property: The arcServicePrincipalObjectId property. + * + * @param arcServicePrincipalObjectId the arcServicePrincipalObjectId value to set. + * @return the ArcIdentityResponseInner object itself. + */ + public ArcIdentityResponseInner withArcServicePrincipalObjectId(String arcServicePrincipalObjectId) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcIdentityResponseProperties(); + } + this.innerProperties().withArcServicePrincipalObjectId(arcServicePrincipalObjectId); + return this; + } + + /** + * Get the arcApplicationObjectId property: The arcApplicationObjectId property. + * + * @return the arcApplicationObjectId value. + */ + public String arcApplicationObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().arcApplicationObjectId(); + } + + /** + * Set the arcApplicationObjectId property: The arcApplicationObjectId property. + * + * @param arcApplicationObjectId the arcApplicationObjectId value to set. + * @return the ArcIdentityResponseInner object itself. + */ + public ArcIdentityResponseInner withArcApplicationObjectId(String arcApplicationObjectId) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcIdentityResponseProperties(); + } + this.innerProperties().withArcApplicationObjectId(arcApplicationObjectId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseProperties.java new file mode 100644 index 0000000000000..eb7be2163c144 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcIdentityResponseProperties.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ArcIdentityResponseProperties model. + */ +@Fluent +public final class ArcIdentityResponseProperties { + /* + * The arcApplicationClientId property. + */ + @JsonProperty(value = "arcApplicationClientId") + private String arcApplicationClientId; + + /* + * The arcApplicationTenantId property. + */ + @JsonProperty(value = "arcApplicationTenantId") + private String arcApplicationTenantId; + + /* + * The arcServicePrincipalObjectId property. + */ + @JsonProperty(value = "arcServicePrincipalObjectId") + private String arcServicePrincipalObjectId; + + /* + * The arcApplicationObjectId property. + */ + @JsonProperty(value = "arcApplicationObjectId") + private String arcApplicationObjectId; + + /** + * Creates an instance of ArcIdentityResponseProperties class. + */ + public ArcIdentityResponseProperties() { + } + + /** + * Get the arcApplicationClientId property: The arcApplicationClientId property. + * + * @return the arcApplicationClientId value. + */ + public String arcApplicationClientId() { + return this.arcApplicationClientId; + } + + /** + * Set the arcApplicationClientId property: The arcApplicationClientId property. + * + * @param arcApplicationClientId the arcApplicationClientId value to set. + * @return the ArcIdentityResponseProperties object itself. + */ + public ArcIdentityResponseProperties withArcApplicationClientId(String arcApplicationClientId) { + this.arcApplicationClientId = arcApplicationClientId; + return this; + } + + /** + * Get the arcApplicationTenantId property: The arcApplicationTenantId property. + * + * @return the arcApplicationTenantId value. + */ + public String arcApplicationTenantId() { + return this.arcApplicationTenantId; + } + + /** + * Set the arcApplicationTenantId property: The arcApplicationTenantId property. + * + * @param arcApplicationTenantId the arcApplicationTenantId value to set. + * @return the ArcIdentityResponseProperties object itself. + */ + public ArcIdentityResponseProperties withArcApplicationTenantId(String arcApplicationTenantId) { + this.arcApplicationTenantId = arcApplicationTenantId; + return this; + } + + /** + * Get the arcServicePrincipalObjectId property: The arcServicePrincipalObjectId property. + * + * @return the arcServicePrincipalObjectId value. + */ + public String arcServicePrincipalObjectId() { + return this.arcServicePrincipalObjectId; + } + + /** + * Set the arcServicePrincipalObjectId property: The arcServicePrincipalObjectId property. + * + * @param arcServicePrincipalObjectId the arcServicePrincipalObjectId value to set. + * @return the ArcIdentityResponseProperties object itself. + */ + public ArcIdentityResponseProperties withArcServicePrincipalObjectId(String arcServicePrincipalObjectId) { + this.arcServicePrincipalObjectId = arcServicePrincipalObjectId; + return this; + } + + /** + * Get the arcApplicationObjectId property: The arcApplicationObjectId property. + * + * @return the arcApplicationObjectId value. + */ + public String arcApplicationObjectId() { + return this.arcApplicationObjectId; + } + + /** + * Set the arcApplicationObjectId property: The arcApplicationObjectId property. + * + * @param arcApplicationObjectId the arcApplicationObjectId value to set. + * @return the ArcIdentityResponseProperties object itself. + */ + public ArcIdentityResponseProperties withArcApplicationObjectId(String arcApplicationObjectId) { + this.arcApplicationObjectId = arcApplicationObjectId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.java new file mode 100644 index 0000000000000..c3e6eaad531f1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState; +import com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails; +import com.azure.resourcemanager.azurestackhci.models.PerNodeState; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * ArcSetting details. + */ +@Fluent +public final class ArcSettingInner extends ProxyResource { + /* + * ArcSetting properties. + */ + @JsonProperty(value = "properties") + private ArcSettingProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ArcSettingInner class. + */ + public ArcSettingInner() { + } + + /** + * Get the innerProperties property: ArcSetting properties. + * + * @return the innerProperties value. + */ + private ArcSettingProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning state of the ArcSetting proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute + * Machine resources. + * + * @return the arcInstanceResourceGroup value. + */ + public String arcInstanceResourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().arcInstanceResourceGroup(); + } + + /** + * Set the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute + * Machine resources. + * + * @param arcInstanceResourceGroup the arcInstanceResourceGroup value to set. + * @return the ArcSettingInner object itself. + */ + public ArcSettingInner withArcInstanceResourceGroup(String arcInstanceResourceGroup) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcSettingProperties(); + } + this.innerProperties().withArcInstanceResourceGroup(arcInstanceResourceGroup); + return this; + } + + /** + * Get the arcApplicationClientId property: App id of arc AAD identity. + * + * @return the arcApplicationClientId value. + */ + public String arcApplicationClientId() { + return this.innerProperties() == null ? null : this.innerProperties().arcApplicationClientId(); + } + + /** + * Set the arcApplicationClientId property: App id of arc AAD identity. + * + * @param arcApplicationClientId the arcApplicationClientId value to set. + * @return the ArcSettingInner object itself. + */ + public ArcSettingInner withArcApplicationClientId(String arcApplicationClientId) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcSettingProperties(); + } + this.innerProperties().withArcApplicationClientId(arcApplicationClientId); + return this; + } + + /** + * Get the arcApplicationTenantId property: Tenant id of arc AAD identity. + * + * @return the arcApplicationTenantId value. + */ + public String arcApplicationTenantId() { + return this.innerProperties() == null ? null : this.innerProperties().arcApplicationTenantId(); + } + + /** + * Set the arcApplicationTenantId property: Tenant id of arc AAD identity. + * + * @param arcApplicationTenantId the arcApplicationTenantId value to set. + * @return the ArcSettingInner object itself. + */ + public ArcSettingInner withArcApplicationTenantId(String arcApplicationTenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcSettingProperties(); + } + this.innerProperties().withArcApplicationTenantId(arcApplicationTenantId); + return this; + } + + /** + * Get the arcServicePrincipalObjectId property: Object id of arc AAD service principal. + * + * @return the arcServicePrincipalObjectId value. + */ + public String arcServicePrincipalObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().arcServicePrincipalObjectId(); + } + + /** + * Set the arcServicePrincipalObjectId property: Object id of arc AAD service principal. + * + * @param arcServicePrincipalObjectId the arcServicePrincipalObjectId value to set. + * @return the ArcSettingInner object itself. + */ + public ArcSettingInner withArcServicePrincipalObjectId(String arcServicePrincipalObjectId) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcSettingProperties(); + } + this.innerProperties().withArcServicePrincipalObjectId(arcServicePrincipalObjectId); + return this; + } + + /** + * Get the arcApplicationObjectId property: Object id of arc AAD identity. + * + * @return the arcApplicationObjectId value. + */ + public String arcApplicationObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().arcApplicationObjectId(); + } + + /** + * Set the arcApplicationObjectId property: Object id of arc AAD identity. + * + * @param arcApplicationObjectId the arcApplicationObjectId value to set. + * @return the ArcSettingInner object itself. + */ + public ArcSettingInner withArcApplicationObjectId(String arcApplicationObjectId) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcSettingProperties(); + } + this.innerProperties().withArcApplicationObjectId(arcApplicationObjectId); + return this; + } + + /** + * Get the aggregateState property: Aggregate state of Arc agent across the nodes in this HCI cluster. + * + * @return the aggregateState value. + */ + public ArcSettingAggregateState aggregateState() { + return this.innerProperties() == null ? null : this.innerProperties().aggregateState(); + } + + /** + * Get the perNodeDetails property: State of Arc agent in each of the nodes. + * + * @return the perNodeDetails value. + */ + public List perNodeDetails() { + return this.innerProperties() == null ? null : this.innerProperties().perNodeDetails(); + } + + /** + * Get the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @return the connectivityProperties value. + */ + public Object connectivityProperties() { + return this.innerProperties() == null ? null : this.innerProperties().connectivityProperties(); + } + + /** + * Set the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @param connectivityProperties the connectivityProperties value to set. + * @return the ArcSettingInner object itself. + */ + public ArcSettingInner withConnectivityProperties(Object connectivityProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcSettingProperties(); + } + this.innerProperties().withConnectivityProperties(connectivityProperties); + return this; + } + + /** + * Get the defaultExtensions property: Properties for each of the default extensions category. + * + * @return the defaultExtensions value. + */ + public List defaultExtensions() { + return this.innerProperties() == null ? null : this.innerProperties().defaultExtensions(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java new file mode 100644 index 0000000000000..c7da118c82c2f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingProperties.java @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState; +import com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails; +import com.azure.resourcemanager.azurestackhci.models.PerNodeState; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * ArcSetting properties. + */ +@Fluent +public final class ArcSettingProperties { + /* + * Provisioning state of the ArcSetting proxy resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The resource group that hosts the Arc agents, ie. Hybrid Compute Machine resources. + */ + @JsonProperty(value = "arcInstanceResourceGroup") + private String arcInstanceResourceGroup; + + /* + * App id of arc AAD identity. + */ + @JsonProperty(value = "arcApplicationClientId") + private String arcApplicationClientId; + + /* + * Tenant id of arc AAD identity. + */ + @JsonProperty(value = "arcApplicationTenantId") + private String arcApplicationTenantId; + + /* + * Object id of arc AAD service principal. + */ + @JsonProperty(value = "arcServicePrincipalObjectId") + private String arcServicePrincipalObjectId; + + /* + * Object id of arc AAD identity. + */ + @JsonProperty(value = "arcApplicationObjectId") + private String arcApplicationObjectId; + + /* + * Aggregate state of Arc agent across the nodes in this HCI cluster. + */ + @JsonProperty(value = "aggregateState", access = JsonProperty.Access.WRITE_ONLY) + private ArcSettingAggregateState aggregateState; + + /* + * State of Arc agent in each of the nodes. + */ + @JsonProperty(value = "perNodeDetails", access = JsonProperty.Access.WRITE_ONLY) + private List perNodeDetails; + + /* + * contains connectivity related configuration for ARC resources + */ + @JsonProperty(value = "connectivityProperties") + private Object connectivityProperties; + + /* + * Properties for each of the default extensions category + */ + @JsonProperty(value = "defaultExtensions", access = JsonProperty.Access.WRITE_ONLY) + private List defaultExtensions; + + /** + * Creates an instance of ArcSettingProperties class. + */ + public ArcSettingProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the ArcSetting proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute + * Machine resources. + * + * @return the arcInstanceResourceGroup value. + */ + public String arcInstanceResourceGroup() { + return this.arcInstanceResourceGroup; + } + + /** + * Set the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute + * Machine resources. + * + * @param arcInstanceResourceGroup the arcInstanceResourceGroup value to set. + * @return the ArcSettingProperties object itself. + */ + public ArcSettingProperties withArcInstanceResourceGroup(String arcInstanceResourceGroup) { + this.arcInstanceResourceGroup = arcInstanceResourceGroup; + return this; + } + + /** + * Get the arcApplicationClientId property: App id of arc AAD identity. + * + * @return the arcApplicationClientId value. + */ + public String arcApplicationClientId() { + return this.arcApplicationClientId; + } + + /** + * Set the arcApplicationClientId property: App id of arc AAD identity. + * + * @param arcApplicationClientId the arcApplicationClientId value to set. + * @return the ArcSettingProperties object itself. + */ + public ArcSettingProperties withArcApplicationClientId(String arcApplicationClientId) { + this.arcApplicationClientId = arcApplicationClientId; + return this; + } + + /** + * Get the arcApplicationTenantId property: Tenant id of arc AAD identity. + * + * @return the arcApplicationTenantId value. + */ + public String arcApplicationTenantId() { + return this.arcApplicationTenantId; + } + + /** + * Set the arcApplicationTenantId property: Tenant id of arc AAD identity. + * + * @param arcApplicationTenantId the arcApplicationTenantId value to set. + * @return the ArcSettingProperties object itself. + */ + public ArcSettingProperties withArcApplicationTenantId(String arcApplicationTenantId) { + this.arcApplicationTenantId = arcApplicationTenantId; + return this; + } + + /** + * Get the arcServicePrincipalObjectId property: Object id of arc AAD service principal. + * + * @return the arcServicePrincipalObjectId value. + */ + public String arcServicePrincipalObjectId() { + return this.arcServicePrincipalObjectId; + } + + /** + * Set the arcServicePrincipalObjectId property: Object id of arc AAD service principal. + * + * @param arcServicePrincipalObjectId the arcServicePrincipalObjectId value to set. + * @return the ArcSettingProperties object itself. + */ + public ArcSettingProperties withArcServicePrincipalObjectId(String arcServicePrincipalObjectId) { + this.arcServicePrincipalObjectId = arcServicePrincipalObjectId; + return this; + } + + /** + * Get the arcApplicationObjectId property: Object id of arc AAD identity. + * + * @return the arcApplicationObjectId value. + */ + public String arcApplicationObjectId() { + return this.arcApplicationObjectId; + } + + /** + * Set the arcApplicationObjectId property: Object id of arc AAD identity. + * + * @param arcApplicationObjectId the arcApplicationObjectId value to set. + * @return the ArcSettingProperties object itself. + */ + public ArcSettingProperties withArcApplicationObjectId(String arcApplicationObjectId) { + this.arcApplicationObjectId = arcApplicationObjectId; + return this; + } + + /** + * Get the aggregateState property: Aggregate state of Arc agent across the nodes in this HCI cluster. + * + * @return the aggregateState value. + */ + public ArcSettingAggregateState aggregateState() { + return this.aggregateState; + } + + /** + * Get the perNodeDetails property: State of Arc agent in each of the nodes. + * + * @return the perNodeDetails value. + */ + public List perNodeDetails() { + return this.perNodeDetails; + } + + /** + * Get the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @return the connectivityProperties value. + */ + public Object connectivityProperties() { + return this.connectivityProperties; + } + + /** + * Set the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @param connectivityProperties the connectivityProperties value to set. + * @return the ArcSettingProperties object itself. + */ + public ArcSettingProperties withConnectivityProperties(Object connectivityProperties) { + this.connectivityProperties = connectivityProperties; + return this; + } + + /** + * Get the defaultExtensions property: Properties for each of the default extensions category. + * + * @return the defaultExtensions value. + */ + public List defaultExtensions() { + return this.defaultExtensions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (perNodeDetails() != null) { + perNodeDetails().forEach(e -> e.validate()); + } + if (defaultExtensions() != null) { + defaultExtensions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java new file mode 100644 index 0000000000000..5f809222027d9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ArcSettingsPatchProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ArcSettings properties. + */ +@Fluent +public final class ArcSettingsPatchProperties { + /* + * contains connectivity related configuration for ARC resources + */ + @JsonProperty(value = "connectivityProperties") + private Object connectivityProperties; + + /** + * Creates an instance of ArcSettingsPatchProperties class. + */ + public ArcSettingsPatchProperties() { + } + + /** + * Get the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @return the connectivityProperties value. + */ + public Object connectivityProperties() { + return this.connectivityProperties; + } + + /** + * Set the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @param connectivityProperties the connectivityProperties value to set. + * @return the ArcSettingsPatchProperties object itself. + */ + public ArcSettingsPatchProperties withConnectivityProperties(Object connectivityProperties) { + this.connectivityProperties = connectivityProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseInner.java new file mode 100644 index 0000000000000..33c89ca06669f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseInner.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cluster Identity details. + */ +@Immutable +public final class ClusterIdentityResponseInner { + /* + * Cluster identity properties. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private ClusterIdentityResponseProperties innerProperties; + + /** + * Creates an instance of ClusterIdentityResponseInner class. + */ + public ClusterIdentityResponseInner() { + } + + /** + * Get the innerProperties property: Cluster identity properties. + * + * @return the innerProperties value. + */ + private ClusterIdentityResponseProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the aadClientId property: The aadClientId property. + * + * @return the aadClientId value. + */ + public String aadClientId() { + return this.innerProperties() == null ? null : this.innerProperties().aadClientId(); + } + + /** + * Set the aadClientId property: The aadClientId property. + * + * @param aadClientId the aadClientId value to set. + * @return the ClusterIdentityResponseInner object itself. + */ + public ClusterIdentityResponseInner withAadClientId(String aadClientId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterIdentityResponseProperties(); + } + this.innerProperties().withAadClientId(aadClientId); + return this; + } + + /** + * Get the aadTenantId property: The aadTenantId property. + * + * @return the aadTenantId value. + */ + public String aadTenantId() { + return this.innerProperties() == null ? null : this.innerProperties().aadTenantId(); + } + + /** + * Set the aadTenantId property: The aadTenantId property. + * + * @param aadTenantId the aadTenantId value to set. + * @return the ClusterIdentityResponseInner object itself. + */ + public ClusterIdentityResponseInner withAadTenantId(String aadTenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterIdentityResponseProperties(); + } + this.innerProperties().withAadTenantId(aadTenantId); + return this; + } + + /** + * Get the aadServicePrincipalObjectId property: The aadServicePrincipalObjectId property. + * + * @return the aadServicePrincipalObjectId value. + */ + public String aadServicePrincipalObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().aadServicePrincipalObjectId(); + } + + /** + * Set the aadServicePrincipalObjectId property: The aadServicePrincipalObjectId property. + * + * @param aadServicePrincipalObjectId the aadServicePrincipalObjectId value to set. + * @return the ClusterIdentityResponseInner object itself. + */ + public ClusterIdentityResponseInner withAadServicePrincipalObjectId(String aadServicePrincipalObjectId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterIdentityResponseProperties(); + } + this.innerProperties().withAadServicePrincipalObjectId(aadServicePrincipalObjectId); + return this; + } + + /** + * Get the aadApplicationObjectId property: The aadApplicationObjectId property. + * + * @return the aadApplicationObjectId value. + */ + public String aadApplicationObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().aadApplicationObjectId(); + } + + /** + * Set the aadApplicationObjectId property: The aadApplicationObjectId property. + * + * @param aadApplicationObjectId the aadApplicationObjectId value to set. + * @return the ClusterIdentityResponseInner object itself. + */ + public ClusterIdentityResponseInner withAadApplicationObjectId(String aadApplicationObjectId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterIdentityResponseProperties(); + } + this.innerProperties().withAadApplicationObjectId(aadApplicationObjectId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseProperties.java new file mode 100644 index 0000000000000..b4d99d24572f1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterIdentityResponseProperties.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ClusterIdentityResponseProperties model. + */ +@Fluent +public final class ClusterIdentityResponseProperties { + /* + * The aadClientId property. + */ + @JsonProperty(value = "aadClientId") + private String aadClientId; + + /* + * The aadTenantId property. + */ + @JsonProperty(value = "aadTenantId") + private String aadTenantId; + + /* + * The aadServicePrincipalObjectId property. + */ + @JsonProperty(value = "aadServicePrincipalObjectId") + private String aadServicePrincipalObjectId; + + /* + * The aadApplicationObjectId property. + */ + @JsonProperty(value = "aadApplicationObjectId") + private String aadApplicationObjectId; + + /** + * Creates an instance of ClusterIdentityResponseProperties class. + */ + public ClusterIdentityResponseProperties() { + } + + /** + * Get the aadClientId property: The aadClientId property. + * + * @return the aadClientId value. + */ + public String aadClientId() { + return this.aadClientId; + } + + /** + * Set the aadClientId property: The aadClientId property. + * + * @param aadClientId the aadClientId value to set. + * @return the ClusterIdentityResponseProperties object itself. + */ + public ClusterIdentityResponseProperties withAadClientId(String aadClientId) { + this.aadClientId = aadClientId; + return this; + } + + /** + * Get the aadTenantId property: The aadTenantId property. + * + * @return the aadTenantId value. + */ + public String aadTenantId() { + return this.aadTenantId; + } + + /** + * Set the aadTenantId property: The aadTenantId property. + * + * @param aadTenantId the aadTenantId value to set. + * @return the ClusterIdentityResponseProperties object itself. + */ + public ClusterIdentityResponseProperties withAadTenantId(String aadTenantId) { + this.aadTenantId = aadTenantId; + return this; + } + + /** + * Get the aadServicePrincipalObjectId property: The aadServicePrincipalObjectId property. + * + * @return the aadServicePrincipalObjectId value. + */ + public String aadServicePrincipalObjectId() { + return this.aadServicePrincipalObjectId; + } + + /** + * Set the aadServicePrincipalObjectId property: The aadServicePrincipalObjectId property. + * + * @param aadServicePrincipalObjectId the aadServicePrincipalObjectId value to set. + * @return the ClusterIdentityResponseProperties object itself. + */ + public ClusterIdentityResponseProperties withAadServicePrincipalObjectId(String aadServicePrincipalObjectId) { + this.aadServicePrincipalObjectId = aadServicePrincipalObjectId; + return this; + } + + /** + * Get the aadApplicationObjectId property: The aadApplicationObjectId property. + * + * @return the aadApplicationObjectId value. + */ + public String aadApplicationObjectId() { + return this.aadApplicationObjectId; + } + + /** + * Set the aadApplicationObjectId property: The aadApplicationObjectId property. + * + * @param aadApplicationObjectId the aadApplicationObjectId value to set. + * @return the ClusterIdentityResponseProperties object itself. + */ + public ClusterIdentityResponseProperties withAadApplicationObjectId(String aadApplicationObjectId) { + this.aadApplicationObjectId = aadApplicationObjectId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java new file mode 100644 index 0000000000000..ad0f1f97850c1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterInner.java @@ -0,0 +1,464 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; +import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; +import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; +import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties; +import com.azure.resourcemanager.azurestackhci.models.Status; +import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; +import java.util.UUID; + +/** + * Cluster details. + */ +@Fluent +public final class ClusterInner extends Resource { + /* + * Identity of Cluster resource + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity innerIdentity; + + /* + * Cluster properties. + */ + @JsonProperty(value = "properties") + private ClusterProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ClusterInner class. + */ + public ClusterInner() { + } + + /** + * Get the innerIdentity property: Identity of Cluster resource. + * + * @return the innerIdentity value. + */ + private ManagedServiceIdentity innerIdentity() { + return this.innerIdentity; + } + + /** + * Get the innerProperties property: Cluster properties. + * + * @return the innerProperties value. + */ + private ClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ + @Override + public ClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ClusterInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.innerIdentity() == null ? null : this.innerIdentity().principalId(); + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.innerIdentity() == null ? null : this.innerIdentity().tenantId(); + } + + /** + * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @return the type value. + */ + public ManagedServiceIdentityType typeIdentityType() { + return this.innerIdentity() == null ? null : this.innerIdentity().type(); + } + + /** + * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @param type the type value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withTypeIdentityType(ManagedServiceIdentityType type) { + if (this.innerIdentity() == null) { + this.innerIdentity = new ManagedServiceIdentity(); + } + this.innerIdentity().withType(type); + return this; + } + + /** + * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.innerIdentity() == null ? null : this.innerIdentity().userAssignedIdentities(); + } + + /** + * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withUserAssignedIdentities(Map userAssignedIdentities) { + if (this.innerIdentity() == null) { + this.innerIdentity = new ManagedServiceIdentity(); + } + this.innerIdentity().withUserAssignedIdentities(userAssignedIdentities); + return this; + } + + /** + * Get the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: Status of the cluster agent. + * + * @return the status value. + */ + public Status status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the connectivityStatus property: Overall connectivity status for the cluster resource. + * + * @return the connectivityStatus value. + */ + public ConnectivityStatus connectivityStatus() { + return this.innerProperties() == null ? null : this.innerProperties().connectivityStatus(); + } + + /** + * Get the cloudId property: Unique, immutable resource id. + * + * @return the cloudId value. + */ + public String cloudId() { + return this.innerProperties() == null ? null : this.innerProperties().cloudId(); + } + + /** + * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @return the cloudManagementEndpoint value. + */ + public String cloudManagementEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().cloudManagementEndpoint(); + } + + /** + * Set the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @param cloudManagementEndpoint the cloudManagementEndpoint value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withCloudManagementEndpoint(String cloudManagementEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withCloudManagementEndpoint(cloudManagementEndpoint); + return this; + } + + /** + * Get the aadClientId property: App id of cluster AAD identity. + * + * @return the aadClientId value. + */ + public String aadClientId() { + return this.innerProperties() == null ? null : this.innerProperties().aadClientId(); + } + + /** + * Set the aadClientId property: App id of cluster AAD identity. + * + * @param aadClientId the aadClientId value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withAadClientId(String aadClientId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withAadClientId(aadClientId); + return this; + } + + /** + * Get the aadTenantId property: Tenant id of cluster AAD identity. + * + * @return the aadTenantId value. + */ + public String aadTenantId() { + return this.innerProperties() == null ? null : this.innerProperties().aadTenantId(); + } + + /** + * Set the aadTenantId property: Tenant id of cluster AAD identity. + * + * @param aadTenantId the aadTenantId value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withAadTenantId(String aadTenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withAadTenantId(aadTenantId); + return this; + } + + /** + * Get the aadApplicationObjectId property: Object id of cluster AAD identity. + * + * @return the aadApplicationObjectId value. + */ + public String aadApplicationObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().aadApplicationObjectId(); + } + + /** + * Set the aadApplicationObjectId property: Object id of cluster AAD identity. + * + * @param aadApplicationObjectId the aadApplicationObjectId value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withAadApplicationObjectId(String aadApplicationObjectId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withAadApplicationObjectId(aadApplicationObjectId); + return this; + } + + /** + * Get the aadServicePrincipalObjectId property: Id of cluster identity service principal. + * + * @return the aadServicePrincipalObjectId value. + */ + public String aadServicePrincipalObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().aadServicePrincipalObjectId(); + } + + /** + * Set the aadServicePrincipalObjectId property: Id of cluster identity service principal. + * + * @param aadServicePrincipalObjectId the aadServicePrincipalObjectId value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withAadServicePrincipalObjectId(String aadServicePrincipalObjectId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withAadServicePrincipalObjectId(aadServicePrincipalObjectId); + return this; + } + + /** + * Get the softwareAssuranceProperties property: Software Assurance properties of the cluster. + * + * @return the softwareAssuranceProperties value. + */ + public SoftwareAssuranceProperties softwareAssuranceProperties() { + return this.innerProperties() == null ? null : this.innerProperties().softwareAssuranceProperties(); + } + + /** + * Set the softwareAssuranceProperties property: Software Assurance properties of the cluster. + * + * @param softwareAssuranceProperties the softwareAssuranceProperties value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withSoftwareAssuranceProperties(SoftwareAssuranceProperties softwareAssuranceProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withSoftwareAssuranceProperties(softwareAssuranceProperties); + return this; + } + + /** + * Get the desiredProperties property: Desired properties of the cluster. + * + * @return the desiredProperties value. + */ + public ClusterDesiredProperties desiredProperties() { + return this.innerProperties() == null ? null : this.innerProperties().desiredProperties(); + } + + /** + * Set the desiredProperties property: Desired properties of the cluster. + * + * @param desiredProperties the desiredProperties value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withDesiredProperties(ClusterDesiredProperties desiredProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withDesiredProperties(desiredProperties); + return this; + } + + /** + * Get the reportedProperties property: Properties reported by cluster agent. + * + * @return the reportedProperties value. + */ + public ClusterReportedProperties reportedProperties() { + return this.innerProperties() == null ? null : this.innerProperties().reportedProperties(); + } + + /** + * Get the isolatedVmAttestationConfiguration property: Attestation configurations for isolated VM (e.g. TVM, CVM) + * of the cluster. + * + * @return the isolatedVmAttestationConfiguration value. + */ + public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().isolatedVmAttestationConfiguration(); + } + + /** + * Get the trialDaysRemaining property: Number of days remaining in the trial period. + * + * @return the trialDaysRemaining value. + */ + public Float trialDaysRemaining() { + return this.innerProperties() == null ? null : this.innerProperties().trialDaysRemaining(); + } + + /** + * Get the billingModel property: Type of billing applied to the resource. + * + * @return the billingModel value. + */ + public String billingModel() { + return this.innerProperties() == null ? null : this.innerProperties().billingModel(); + } + + /** + * Get the registrationTimestamp property: First cluster sync timestamp. + * + * @return the registrationTimestamp value. + */ + public OffsetDateTime registrationTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().registrationTimestamp(); + } + + /** + * Get the lastSyncTimestamp property: Most recent cluster sync timestamp. + * + * @return the lastSyncTimestamp value. + */ + public OffsetDateTime lastSyncTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().lastSyncTimestamp(); + } + + /** + * Get the lastBillingTimestamp property: Most recent billing meter timestamp. + * + * @return the lastBillingTimestamp value. + */ + public OffsetDateTime lastBillingTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().lastBillingTimestamp(); + } + + /** + * Get the serviceEndpoint property: Region specific DataPath Endpoint of the cluster. + * + * @return the serviceEndpoint value. + */ + public String serviceEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().serviceEndpoint(); + } + + /** + * Get the resourceProviderObjectId property: Object id of RP Service Principal. + * + * @return the resourceProviderObjectId value. + */ + public String resourceProviderObjectId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceProviderObjectId(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerIdentity() != null) { + innerIdentity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java new file mode 100644 index 0000000000000..2ae0c7367bd28 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterPatchProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cluster properties. + */ +@Fluent +public final class ClusterPatchProperties { + /* + * Endpoint configured for management from the Azure portal + */ + @JsonProperty(value = "cloudManagementEndpoint") + private String cloudManagementEndpoint; + + /* + * App id of cluster AAD identity. + */ + @JsonProperty(value = "aadClientId") + private String aadClientId; + + /* + * Tenant id of cluster AAD identity. + */ + @JsonProperty(value = "aadTenantId") + private String aadTenantId; + + /* + * Desired properties of the cluster. + */ + @JsonProperty(value = "desiredProperties") + private ClusterDesiredProperties desiredProperties; + + /** + * Creates an instance of ClusterPatchProperties class. + */ + public ClusterPatchProperties() { + } + + /** + * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @return the cloudManagementEndpoint value. + */ + public String cloudManagementEndpoint() { + return this.cloudManagementEndpoint; + } + + /** + * Set the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @param cloudManagementEndpoint the cloudManagementEndpoint value to set. + * @return the ClusterPatchProperties object itself. + */ + public ClusterPatchProperties withCloudManagementEndpoint(String cloudManagementEndpoint) { + this.cloudManagementEndpoint = cloudManagementEndpoint; + return this; + } + + /** + * Get the aadClientId property: App id of cluster AAD identity. + * + * @return the aadClientId value. + */ + public String aadClientId() { + return this.aadClientId; + } + + /** + * Set the aadClientId property: App id of cluster AAD identity. + * + * @param aadClientId the aadClientId value to set. + * @return the ClusterPatchProperties object itself. + */ + public ClusterPatchProperties withAadClientId(String aadClientId) { + this.aadClientId = aadClientId; + return this; + } + + /** + * Get the aadTenantId property: Tenant id of cluster AAD identity. + * + * @return the aadTenantId value. + */ + public String aadTenantId() { + return this.aadTenantId; + } + + /** + * Set the aadTenantId property: Tenant id of cluster AAD identity. + * + * @param aadTenantId the aadTenantId value to set. + * @return the ClusterPatchProperties object itself. + */ + public ClusterPatchProperties withAadTenantId(String aadTenantId) { + this.aadTenantId = aadTenantId; + return this; + } + + /** + * Get the desiredProperties property: Desired properties of the cluster. + * + * @return the desiredProperties value. + */ + public ClusterDesiredProperties desiredProperties() { + return this.desiredProperties; + } + + /** + * Set the desiredProperties property: Desired properties of the cluster. + * + * @param desiredProperties the desiredProperties value to set. + * @return the ClusterPatchProperties object itself. + */ + public ClusterPatchProperties withDesiredProperties(ClusterDesiredProperties desiredProperties) { + this.desiredProperties = desiredProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (desiredProperties() != null) { + desiredProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java new file mode 100644 index 0000000000000..4f228be30de4a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ClusterProperties.java @@ -0,0 +1,426 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; +import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; +import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; +import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties; +import com.azure.resourcemanager.azurestackhci.models.Status; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Cluster properties. + */ +@Fluent +public final class ClusterProperties { + /* + * Provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Status of the cluster agent. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private Status status; + + /* + * Overall connectivity status for the cluster resource. + */ + @JsonProperty(value = "connectivityStatus", access = JsonProperty.Access.WRITE_ONLY) + private ConnectivityStatus connectivityStatus; + + /* + * Unique, immutable resource id. + */ + @JsonProperty(value = "cloudId", access = JsonProperty.Access.WRITE_ONLY) + private String cloudId; + + /* + * Endpoint configured for management from the Azure portal. + */ + @JsonProperty(value = "cloudManagementEndpoint") + private String cloudManagementEndpoint; + + /* + * App id of cluster AAD identity. + */ + @JsonProperty(value = "aadClientId") + private String aadClientId; + + /* + * Tenant id of cluster AAD identity. + */ + @JsonProperty(value = "aadTenantId") + private String aadTenantId; + + /* + * Object id of cluster AAD identity. + */ + @JsonProperty(value = "aadApplicationObjectId") + private String aadApplicationObjectId; + + /* + * Id of cluster identity service principal. + */ + @JsonProperty(value = "aadServicePrincipalObjectId") + private String aadServicePrincipalObjectId; + + /* + * Software Assurance properties of the cluster. + */ + @JsonProperty(value = "softwareAssuranceProperties") + private SoftwareAssuranceProperties softwareAssuranceProperties; + + /* + * Desired properties of the cluster. + */ + @JsonProperty(value = "desiredProperties") + private ClusterDesiredProperties desiredProperties; + + /* + * Properties reported by cluster agent. + */ + @JsonProperty(value = "reportedProperties", access = JsonProperty.Access.WRITE_ONLY) + private ClusterReportedProperties reportedProperties; + + /* + * Attestation configurations for isolated VM (e.g. TVM, CVM) of the cluster. + */ + @JsonProperty(value = "isolatedVmAttestationConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration; + + /* + * Number of days remaining in the trial period. + */ + @JsonProperty(value = "trialDaysRemaining", access = JsonProperty.Access.WRITE_ONLY) + private Float trialDaysRemaining; + + /* + * Type of billing applied to the resource. + */ + @JsonProperty(value = "billingModel", access = JsonProperty.Access.WRITE_ONLY) + private String billingModel; + + /* + * First cluster sync timestamp. + */ + @JsonProperty(value = "registrationTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime registrationTimestamp; + + /* + * Most recent cluster sync timestamp. + */ + @JsonProperty(value = "lastSyncTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastSyncTimestamp; + + /* + * Most recent billing meter timestamp. + */ + @JsonProperty(value = "lastBillingTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastBillingTimestamp; + + /* + * Region specific DataPath Endpoint of the cluster. + */ + @JsonProperty(value = "serviceEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String serviceEndpoint; + + /* + * Object id of RP Service Principal + */ + @JsonProperty(value = "resourceProviderObjectId", access = JsonProperty.Access.WRITE_ONLY) + private String resourceProviderObjectId; + + /** + * Creates an instance of ClusterProperties class. + */ + public ClusterProperties() { + } + + /** + * Get the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: Status of the cluster agent. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Get the connectivityStatus property: Overall connectivity status for the cluster resource. + * + * @return the connectivityStatus value. + */ + public ConnectivityStatus connectivityStatus() { + return this.connectivityStatus; + } + + /** + * Get the cloudId property: Unique, immutable resource id. + * + * @return the cloudId value. + */ + public String cloudId() { + return this.cloudId; + } + + /** + * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @return the cloudManagementEndpoint value. + */ + public String cloudManagementEndpoint() { + return this.cloudManagementEndpoint; + } + + /** + * Set the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @param cloudManagementEndpoint the cloudManagementEndpoint value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withCloudManagementEndpoint(String cloudManagementEndpoint) { + this.cloudManagementEndpoint = cloudManagementEndpoint; + return this; + } + + /** + * Get the aadClientId property: App id of cluster AAD identity. + * + * @return the aadClientId value. + */ + public String aadClientId() { + return this.aadClientId; + } + + /** + * Set the aadClientId property: App id of cluster AAD identity. + * + * @param aadClientId the aadClientId value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withAadClientId(String aadClientId) { + this.aadClientId = aadClientId; + return this; + } + + /** + * Get the aadTenantId property: Tenant id of cluster AAD identity. + * + * @return the aadTenantId value. + */ + public String aadTenantId() { + return this.aadTenantId; + } + + /** + * Set the aadTenantId property: Tenant id of cluster AAD identity. + * + * @param aadTenantId the aadTenantId value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withAadTenantId(String aadTenantId) { + this.aadTenantId = aadTenantId; + return this; + } + + /** + * Get the aadApplicationObjectId property: Object id of cluster AAD identity. + * + * @return the aadApplicationObjectId value. + */ + public String aadApplicationObjectId() { + return this.aadApplicationObjectId; + } + + /** + * Set the aadApplicationObjectId property: Object id of cluster AAD identity. + * + * @param aadApplicationObjectId the aadApplicationObjectId value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withAadApplicationObjectId(String aadApplicationObjectId) { + this.aadApplicationObjectId = aadApplicationObjectId; + return this; + } + + /** + * Get the aadServicePrincipalObjectId property: Id of cluster identity service principal. + * + * @return the aadServicePrincipalObjectId value. + */ + public String aadServicePrincipalObjectId() { + return this.aadServicePrincipalObjectId; + } + + /** + * Set the aadServicePrincipalObjectId property: Id of cluster identity service principal. + * + * @param aadServicePrincipalObjectId the aadServicePrincipalObjectId value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withAadServicePrincipalObjectId(String aadServicePrincipalObjectId) { + this.aadServicePrincipalObjectId = aadServicePrincipalObjectId; + return this; + } + + /** + * Get the softwareAssuranceProperties property: Software Assurance properties of the cluster. + * + * @return the softwareAssuranceProperties value. + */ + public SoftwareAssuranceProperties softwareAssuranceProperties() { + return this.softwareAssuranceProperties; + } + + /** + * Set the softwareAssuranceProperties property: Software Assurance properties of the cluster. + * + * @param softwareAssuranceProperties the softwareAssuranceProperties value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withSoftwareAssuranceProperties(SoftwareAssuranceProperties softwareAssuranceProperties) { + this.softwareAssuranceProperties = softwareAssuranceProperties; + return this; + } + + /** + * Get the desiredProperties property: Desired properties of the cluster. + * + * @return the desiredProperties value. + */ + public ClusterDesiredProperties desiredProperties() { + return this.desiredProperties; + } + + /** + * Set the desiredProperties property: Desired properties of the cluster. + * + * @param desiredProperties the desiredProperties value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withDesiredProperties(ClusterDesiredProperties desiredProperties) { + this.desiredProperties = desiredProperties; + return this; + } + + /** + * Get the reportedProperties property: Properties reported by cluster agent. + * + * @return the reportedProperties value. + */ + public ClusterReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * Get the isolatedVmAttestationConfiguration property: Attestation configurations for isolated VM (e.g. TVM, CVM) + * of the cluster. + * + * @return the isolatedVmAttestationConfiguration value. + */ + public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { + return this.isolatedVmAttestationConfiguration; + } + + /** + * Get the trialDaysRemaining property: Number of days remaining in the trial period. + * + * @return the trialDaysRemaining value. + */ + public Float trialDaysRemaining() { + return this.trialDaysRemaining; + } + + /** + * Get the billingModel property: Type of billing applied to the resource. + * + * @return the billingModel value. + */ + public String billingModel() { + return this.billingModel; + } + + /** + * Get the registrationTimestamp property: First cluster sync timestamp. + * + * @return the registrationTimestamp value. + */ + public OffsetDateTime registrationTimestamp() { + return this.registrationTimestamp; + } + + /** + * Get the lastSyncTimestamp property: Most recent cluster sync timestamp. + * + * @return the lastSyncTimestamp value. + */ + public OffsetDateTime lastSyncTimestamp() { + return this.lastSyncTimestamp; + } + + /** + * Get the lastBillingTimestamp property: Most recent billing meter timestamp. + * + * @return the lastBillingTimestamp value. + */ + public OffsetDateTime lastBillingTimestamp() { + return this.lastBillingTimestamp; + } + + /** + * Get the serviceEndpoint property: Region specific DataPath Endpoint of the cluster. + * + * @return the serviceEndpoint value. + */ + public String serviceEndpoint() { + return this.serviceEndpoint; + } + + /** + * Get the resourceProviderObjectId property: Object id of RP Service Principal. + * + * @return the resourceProviderObjectId value. + */ + public String resourceProviderObjectId() { + return this.resourceProviderObjectId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (softwareAssuranceProperties() != null) { + softwareAssuranceProperties().validate(); + } + if (desiredProperties() != null) { + desiredProperties().validate(); + } + if (reportedProperties() != null) { + reportedProperties().validate(); + } + if (isolatedVmAttestationConfiguration() != null) { + isolatedVmAttestationConfiguration().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java new file mode 100644 index 0000000000000..90f82d4520e14 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingInner.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.ReportedProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Edge device resource. + */ +@Fluent +public final class DeploymentSettingInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DeploymentSettingsProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DeploymentSettingInner class. + */ + public DeploymentSettingInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private DeploymentSettingsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: DeploymentSetting provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Set the provisioningState property: DeploymentSetting provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the DeploymentSettingInner object itself. + */ + public DeploymentSettingInner withProvisioningState(ProvisioningState provisioningState) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentSettingsProperties(); + } + this.innerProperties().withProvisioningState(provisioningState); + return this; + } + + /** + * Get the arcNodeResourceIds property: Azure resource ids of Arc machines to be part of cluster. + * + * @return the arcNodeResourceIds value. + */ + public List arcNodeResourceIds() { + return this.innerProperties() == null ? null : this.innerProperties().arcNodeResourceIds(); + } + + /** + * Set the arcNodeResourceIds property: Azure resource ids of Arc machines to be part of cluster. + * + * @param arcNodeResourceIds the arcNodeResourceIds value to set. + * @return the DeploymentSettingInner object itself. + */ + public DeploymentSettingInner withArcNodeResourceIds(List arcNodeResourceIds) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentSettingsProperties(); + } + this.innerProperties().withArcNodeResourceIds(arcNodeResourceIds); + return this; + } + + /** + * Get the deploymentMode property: The deployment mode for cluster deployment. + * + * @return the deploymentMode value. + */ + public DeploymentMode deploymentMode() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentMode(); + } + + /** + * Set the deploymentMode property: The deployment mode for cluster deployment. + * + * @param deploymentMode the deploymentMode value to set. + * @return the DeploymentSettingInner object itself. + */ + public DeploymentSettingInner withDeploymentMode(DeploymentMode deploymentMode) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentSettingsProperties(); + } + this.innerProperties().withDeploymentMode(deploymentMode); + return this; + } + + /** + * Get the deploymentConfiguration property: Scale units will contains list of deployment data. + * + * @return the deploymentConfiguration value. + */ + public DeploymentConfiguration deploymentConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentConfiguration(); + } + + /** + * Set the deploymentConfiguration property: Scale units will contains list of deployment data. + * + * @param deploymentConfiguration the deploymentConfiguration value to set. + * @return the DeploymentSettingInner object itself. + */ + public DeploymentSettingInner withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentSettingsProperties(); + } + this.innerProperties().withDeploymentConfiguration(deploymentConfiguration); + return this; + } + + /** + * Get the reportedProperties property: Deployment Status reported from cluster. + * + * @return the reportedProperties value. + */ + public ReportedProperties reportedProperties() { + return this.innerProperties() == null ? null : this.innerProperties().reportedProperties(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java new file mode 100644 index 0000000000000..8e340d82b15ca --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/DeploymentSettingsProperties.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.ReportedProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * DeploymentSetting properties. + */ +@Fluent +public final class DeploymentSettingsProperties { + /* + * DeploymentSetting provisioning state + */ + @JsonProperty(value = "provisioningState") + private ProvisioningState provisioningState; + + /* + * Azure resource ids of Arc machines to be part of cluster. + */ + @JsonProperty(value = "arcNodeResourceIds", required = true) + private List arcNodeResourceIds; + + /* + * The deployment mode for cluster deployment. + */ + @JsonProperty(value = "deploymentMode", required = true) + private DeploymentMode deploymentMode; + + /* + * Scale units will contains list of deployment data + */ + @JsonProperty(value = "deploymentConfiguration", required = true) + private DeploymentConfiguration deploymentConfiguration; + + /* + * Deployment Status reported from cluster. + */ + @JsonProperty(value = "reportedProperties", access = JsonProperty.Access.WRITE_ONLY) + private ReportedProperties reportedProperties; + + /** + * Creates an instance of DeploymentSettingsProperties class. + */ + public DeploymentSettingsProperties() { + } + + /** + * Get the provisioningState property: DeploymentSetting provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: DeploymentSetting provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the DeploymentSettingsProperties object itself. + */ + public DeploymentSettingsProperties withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the arcNodeResourceIds property: Azure resource ids of Arc machines to be part of cluster. + * + * @return the arcNodeResourceIds value. + */ + public List arcNodeResourceIds() { + return this.arcNodeResourceIds; + } + + /** + * Set the arcNodeResourceIds property: Azure resource ids of Arc machines to be part of cluster. + * + * @param arcNodeResourceIds the arcNodeResourceIds value to set. + * @return the DeploymentSettingsProperties object itself. + */ + public DeploymentSettingsProperties withArcNodeResourceIds(List arcNodeResourceIds) { + this.arcNodeResourceIds = arcNodeResourceIds; + return this; + } + + /** + * Get the deploymentMode property: The deployment mode for cluster deployment. + * + * @return the deploymentMode value. + */ + public DeploymentMode deploymentMode() { + return this.deploymentMode; + } + + /** + * Set the deploymentMode property: The deployment mode for cluster deployment. + * + * @param deploymentMode the deploymentMode value to set. + * @return the DeploymentSettingsProperties object itself. + */ + public DeploymentSettingsProperties withDeploymentMode(DeploymentMode deploymentMode) { + this.deploymentMode = deploymentMode; + return this; + } + + /** + * Get the deploymentConfiguration property: Scale units will contains list of deployment data. + * + * @return the deploymentConfiguration value. + */ + public DeploymentConfiguration deploymentConfiguration() { + return this.deploymentConfiguration; + } + + /** + * Set the deploymentConfiguration property: Scale units will contains list of deployment data. + * + * @param deploymentConfiguration the deploymentConfiguration value to set. + * @return the DeploymentSettingsProperties object itself. + */ + public DeploymentSettingsProperties withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration) { + this.deploymentConfiguration = deploymentConfiguration; + return this; + } + + /** + * Get the reportedProperties property: Deployment Status reported from cluster. + * + * @return the reportedProperties value. + */ + public ReportedProperties reportedProperties() { + return this.reportedProperties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (arcNodeResourceIds() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property arcNodeResourceIds in model DeploymentSettingsProperties")); + } + if (deploymentMode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property deploymentMode in model DeploymentSettingsProperties")); + } + if (deploymentConfiguration() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property deploymentConfiguration in model DeploymentSettingsProperties")); + } else { + deploymentConfiguration().validate(); + } + if (reportedProperties() != null) { + reportedProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DeploymentSettingsProperties.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java new file mode 100644 index 0000000000000..5b377f2d1b77d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceInner.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Edge device resource. + */ +@Fluent +public final class EdgeDeviceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private EdgeDeviceProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of EdgeDeviceInner class. + */ + public EdgeDeviceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private EdgeDeviceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the deviceConfiguration property: Device Configuration. + * + * @return the deviceConfiguration value. + */ + public DeviceConfiguration deviceConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().deviceConfiguration(); + } + + /** + * Set the deviceConfiguration property: Device Configuration. + * + * @param deviceConfiguration the deviceConfiguration value to set. + * @return the EdgeDeviceInner object itself. + */ + public EdgeDeviceInner withDeviceConfiguration(DeviceConfiguration deviceConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new EdgeDeviceProperties(); + } + this.innerProperties().withDeviceConfiguration(deviceConfiguration); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of edgeDevice resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Set the provisioningState property: Provisioning state of edgeDevice resource. + * + * @param provisioningState the provisioningState value to set. + * @return the EdgeDeviceInner object itself. + */ + public EdgeDeviceInner withProvisioningState(ProvisioningState provisioningState) { + if (this.innerProperties() == null) { + this.innerProperties = new EdgeDeviceProperties(); + } + this.innerProperties().withProvisioningState(provisioningState); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceProperties.java new file mode 100644 index 0000000000000..542b4aebdcb9b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/EdgeDeviceProperties.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Edge Device properties. + */ +@Fluent +public final class EdgeDeviceProperties { + /* + * Device Configuration + */ + @JsonProperty(value = "deviceConfiguration") + private DeviceConfiguration deviceConfiguration; + + /* + * Provisioning state of edgeDevice resource + */ + @JsonProperty(value = "provisioningState") + private ProvisioningState provisioningState; + + /** + * Creates an instance of EdgeDeviceProperties class. + */ + public EdgeDeviceProperties() { + } + + /** + * Get the deviceConfiguration property: Device Configuration. + * + * @return the deviceConfiguration value. + */ + public DeviceConfiguration deviceConfiguration() { + return this.deviceConfiguration; + } + + /** + * Set the deviceConfiguration property: Device Configuration. + * + * @param deviceConfiguration the deviceConfiguration value to set. + * @return the EdgeDeviceProperties object itself. + */ + public EdgeDeviceProperties withDeviceConfiguration(DeviceConfiguration deviceConfiguration) { + this.deviceConfiguration = deviceConfiguration; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of edgeDevice resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: Provisioning state of edgeDevice resource. + * + * @param provisioningState the provisioningState value to set. + * @return the EdgeDeviceProperties object itself. + */ + public EdgeDeviceProperties withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deviceConfiguration() != null) { + deviceConfiguration().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java new file mode 100644 index 0000000000000..a3a0bf0ea3730 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionInner.java @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState; +import com.azure.resourcemanager.azurestackhci.models.ExtensionManagedBy; +import com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Details of a particular extension in HCI Cluster. + */ +@Fluent +public final class ExtensionInner extends ProxyResource { + /* + * Describes Machine Extension Properties. + */ + @JsonProperty(value = "properties") + private ExtensionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ExtensionInner class. + */ + public ExtensionInner() { + } + + /** + * Get the innerProperties property: Describes Machine Extension Properties. + * + * @return the innerProperties value. + */ + private ExtensionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning state of the Extension proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. + * + * @return the aggregateState value. + */ + public ExtensionAggregateState aggregateState() { + return this.innerProperties() == null ? null : this.innerProperties().aggregateState(); + } + + /** + * Get the perNodeExtensionDetails property: State of Arc Extension in each of the nodes. + * + * @return the perNodeExtensionDetails value. + */ + public List perNodeExtensionDetails() { + return this.innerProperties() == null ? null : this.innerProperties().perNodeExtensionDetails(); + } + + /** + * Get the managedBy property: Indicates if the extension is managed by azure or the user. + * + * @return the managedBy value. + */ + public ExtensionManagedBy managedBy() { + return this.innerProperties() == null ? null : this.innerProperties().managedBy(); + } + + /** + * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @return the forceUpdateTag value. + */ + public String forceUpdateTag() { + return this.innerProperties() == null ? null : this.innerProperties().forceUpdateTag(); + } + + /** + * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withForceUpdateTag(String forceUpdateTag) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionProperties(); + } + this.innerProperties().withForceUpdateTag(forceUpdateTag); + return this; + } + + /** + * Get the publisher property: The name of the extension handler publisher. + * + * @return the publisher value. + */ + public String publisher() { + return this.innerProperties() == null ? null : this.innerProperties().publisher(); + } + + /** + * Set the publisher property: The name of the extension handler publisher. + * + * @param publisher the publisher value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withPublisher(String publisher) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionProperties(); + } + this.innerProperties().withPublisher(publisher); + return this; + } + + /** + * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the type value. + */ + public String typePropertiesType() { + return this.innerProperties() == null ? null : this.innerProperties().type(); + } + + /** + * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param type the type value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withTypePropertiesType(String type) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionProperties(); + } + this.innerProperties().withType(type); + return this; + } + + /** + * Get the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used if + * not specified. + * + * @return the typeHandlerVersion value. + */ + public String typeHandlerVersion() { + return this.innerProperties() == null ? null : this.innerProperties().typeHandlerVersion(); + } + + /** + * Set the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used if + * not specified. + * + * @param typeHandlerVersion the typeHandlerVersion value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withTypeHandlerVersion(String typeHandlerVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionProperties(); + } + this.innerProperties().withTypeHandlerVersion(typeHandlerVersion); + return this; + } + + /** + * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value. + */ + public Boolean autoUpgradeMinorVersion() { + return this.innerProperties() == null ? null : this.innerProperties().autoUpgradeMinorVersion(); + } + + /** + * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionProperties(); + } + this.innerProperties().withAutoUpgradeMinorVersion(autoUpgradeMinorVersion); + return this; + } + + /** + * Get the settings property: Json formatted public settings for the extension. + * + * @return the settings value. + */ + public Object settings() { + return this.innerProperties() == null ? null : this.innerProperties().settings(); + } + + /** + * Set the settings property: Json formatted public settings for the extension. + * + * @param settings the settings value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withSettings(Object settings) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionProperties(); + } + this.innerProperties().withSettings(settings); + return this; + } + + /** + * Get the protectedSettings property: Protected settings (may contain secrets). + * + * @return the protectedSettings value. + */ + public Object protectedSettings() { + return this.innerProperties() == null ? null : this.innerProperties().protectedSettings(); + } + + /** + * Set the protectedSettings property: Protected settings (may contain secrets). + * + * @param protectedSettings the protectedSettings value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withProtectedSettings(Object protectedSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionProperties(); + } + this.innerProperties().withProtectedSettings(protectedSettings); + return this; + } + + /** + * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.innerProperties() == null ? null : this.innerProperties().enableAutomaticUpgrade(); + } + + /** + * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionProperties(); + } + this.innerProperties().withEnableAutomaticUpgrade(enableAutomaticUpgrade); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java new file mode 100644 index 0000000000000..9f0f075c13bc8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionParameters.java @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a Machine Extension. This object mirrors the definition in HybridCompute. + */ +@Fluent +public final class ExtensionParameters { + /* + * How the extension handler should be forced to update even if the extension configuration has not changed. + */ + @JsonProperty(value = "forceUpdateTag") + private String forceUpdateTag; + + /* + * The name of the extension handler publisher. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /* + * Specifies the type of the extension; an example is "CustomScriptExtension". + */ + @JsonProperty(value = "type") + private String type; + + /* + * Specifies the version of the script handler. Latest version would be used if not specified. + */ + @JsonProperty(value = "typeHandlerVersion") + private String typeHandlerVersion; + + /* + * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + */ + @JsonProperty(value = "autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /* + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "settings") + private Object settings; + + /* + * Protected settings (may contain secrets). + */ + @JsonProperty(value = "protectedSettings") + private Object protectedSettings; + + /* + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. + */ + @JsonProperty(value = "enableAutomaticUpgrade") + private Boolean enableAutomaticUpgrade; + + /** + * Creates an instance of ExtensionParameters class. + */ + public ExtensionParameters() { + } + + /** + * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @return the forceUpdateTag value. + */ + public String forceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set. + * @return the ExtensionParameters object itself. + */ + public ExtensionParameters withForceUpdateTag(String forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + return this; + } + + /** + * Get the publisher property: The name of the extension handler publisher. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The name of the extension handler publisher. + * + * @param publisher the publisher value to set. + * @return the ExtensionParameters object itself. + */ + public ExtensionParameters withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param type the type value to set. + * @return the ExtensionParameters object itself. + */ + public ExtensionParameters withType(String type) { + this.type = type; + return this; + } + + /** + * Get the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used if + * not specified. + * + * @return the typeHandlerVersion value. + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used if + * not specified. + * + * @param typeHandlerVersion the typeHandlerVersion value to set. + * @return the ExtensionParameters object itself. + */ + public ExtensionParameters withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value. + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. + * @return the ExtensionParameters object itself. + */ + public ExtensionParameters withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get the settings property: Json formatted public settings for the extension. + * + * @return the settings value. + */ + public Object settings() { + return this.settings; + } + + /** + * Set the settings property: Json formatted public settings for the extension. + * + * @param settings the settings value to set. + * @return the ExtensionParameters object itself. + */ + public ExtensionParameters withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the protectedSettings property: Protected settings (may contain secrets). + * + * @return the protectedSettings value. + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the protectedSettings property: Protected settings (may contain secrets). + * + * @param protectedSettings the protectedSettings value to set. + * @return the ExtensionParameters object itself. + */ + public ExtensionParameters withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + + /** + * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.enableAutomaticUpgrade; + } + + /** + * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. + * @return the ExtensionParameters object itself. + */ + public ExtensionParameters withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + this.enableAutomaticUpgrade = enableAutomaticUpgrade; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java new file mode 100644 index 0000000000000..bcc542dfc1b8e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionPatchProperties.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes Machine Extension Properties that can be updated. + */ +@Fluent +public final class ExtensionPatchProperties { + /* + * Describes the properties of a Machine Extension that can be updated. + */ + @JsonProperty(value = "extensionParameters") + private ExtensionPatchParameters extensionParameters; + + /** + * Creates an instance of ExtensionPatchProperties class. + */ + public ExtensionPatchProperties() { + } + + /** + * Get the extensionParameters property: Describes the properties of a Machine Extension that can be updated. + * + * @return the extensionParameters value. + */ + public ExtensionPatchParameters extensionParameters() { + return this.extensionParameters; + } + + /** + * Set the extensionParameters property: Describes the properties of a Machine Extension that can be updated. + * + * @param extensionParameters the extensionParameters value to set. + * @return the ExtensionPatchProperties object itself. + */ + public ExtensionPatchProperties withExtensionParameters(ExtensionPatchParameters extensionParameters) { + this.extensionParameters = extensionParameters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (extensionParameters() != null) { + extensionParameters().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java new file mode 100644 index 0000000000000..eb605db4f4cd1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ExtensionProperties.java @@ -0,0 +1,312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState; +import com.azure.resourcemanager.azurestackhci.models.ExtensionManagedBy; +import com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Status of Arc Extension for a particular node in HCI Cluster. + */ +@Fluent +public final class ExtensionProperties { + /* + * Provisioning state of the Extension proxy resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Parameters specific to this extension type. + */ + @JsonProperty(value = "extensionParameters") + private ExtensionParameters innerExtensionParameters; + + /* + * Aggregate state of Arc Extensions across the nodes in this HCI cluster. + */ + @JsonProperty(value = "aggregateState", access = JsonProperty.Access.WRITE_ONLY) + private ExtensionAggregateState aggregateState; + + /* + * State of Arc Extension in each of the nodes. + */ + @JsonProperty(value = "perNodeExtensionDetails", access = JsonProperty.Access.WRITE_ONLY) + private List perNodeExtensionDetails; + + /* + * Indicates if the extension is managed by azure or the user. + */ + @JsonProperty(value = "managedBy", access = JsonProperty.Access.WRITE_ONLY) + private ExtensionManagedBy managedBy; + + /** + * Creates an instance of ExtensionProperties class. + */ + public ExtensionProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the Extension proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the innerExtensionParameters property: Parameters specific to this extension type. + * + * @return the innerExtensionParameters value. + */ + private ExtensionParameters innerExtensionParameters() { + return this.innerExtensionParameters; + } + + /** + * Get the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. + * + * @return the aggregateState value. + */ + public ExtensionAggregateState aggregateState() { + return this.aggregateState; + } + + /** + * Get the perNodeExtensionDetails property: State of Arc Extension in each of the nodes. + * + * @return the perNodeExtensionDetails value. + */ + public List perNodeExtensionDetails() { + return this.perNodeExtensionDetails; + } + + /** + * Get the managedBy property: Indicates if the extension is managed by azure or the user. + * + * @return the managedBy value. + */ + public ExtensionManagedBy managedBy() { + return this.managedBy; + } + + /** + * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @return the forceUpdateTag value. + */ + public String forceUpdateTag() { + return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().forceUpdateTag(); + } + + /** + * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @param forceUpdateTag the forceUpdateTag value to set. + * @return the ExtensionProperties object itself. + */ + public ExtensionProperties withForceUpdateTag(String forceUpdateTag) { + if (this.innerExtensionParameters() == null) { + this.innerExtensionParameters = new ExtensionParameters(); + } + this.innerExtensionParameters().withForceUpdateTag(forceUpdateTag); + return this; + } + + /** + * Get the publisher property: The name of the extension handler publisher. + * + * @return the publisher value. + */ + public String publisher() { + return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().publisher(); + } + + /** + * Set the publisher property: The name of the extension handler publisher. + * + * @param publisher the publisher value to set. + * @return the ExtensionProperties object itself. + */ + public ExtensionProperties withPublisher(String publisher) { + if (this.innerExtensionParameters() == null) { + this.innerExtensionParameters = new ExtensionParameters(); + } + this.innerExtensionParameters().withPublisher(publisher); + return this; + } + + /** + * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the type value. + */ + public String type() { + return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().type(); + } + + /** + * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". + * + * @param type the type value to set. + * @return the ExtensionProperties object itself. + */ + public ExtensionProperties withType(String type) { + if (this.innerExtensionParameters() == null) { + this.innerExtensionParameters = new ExtensionParameters(); + } + this.innerExtensionParameters().withType(type); + return this; + } + + /** + * Get the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used if + * not specified. + * + * @return the typeHandlerVersion value. + */ + public String typeHandlerVersion() { + return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().typeHandlerVersion(); + } + + /** + * Set the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used if + * not specified. + * + * @param typeHandlerVersion the typeHandlerVersion value to set. + * @return the ExtensionProperties object itself. + */ + public ExtensionProperties withTypeHandlerVersion(String typeHandlerVersion) { + if (this.innerExtensionParameters() == null) { + this.innerExtensionParameters = new ExtensionParameters(); + } + this.innerExtensionParameters().withTypeHandlerVersion(typeHandlerVersion); + return this; + } + + /** + * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value. + */ + public Boolean autoUpgradeMinorVersion() { + return this.innerExtensionParameters() == null + ? null + : this.innerExtensionParameters().autoUpgradeMinorVersion(); + } + + /** + * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one + * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. + * @return the ExtensionProperties object itself. + */ + public ExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + if (this.innerExtensionParameters() == null) { + this.innerExtensionParameters = new ExtensionParameters(); + } + this.innerExtensionParameters().withAutoUpgradeMinorVersion(autoUpgradeMinorVersion); + return this; + } + + /** + * Get the settings property: Json formatted public settings for the extension. + * + * @return the settings value. + */ + public Object settings() { + return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().settings(); + } + + /** + * Set the settings property: Json formatted public settings for the extension. + * + * @param settings the settings value to set. + * @return the ExtensionProperties object itself. + */ + public ExtensionProperties withSettings(Object settings) { + if (this.innerExtensionParameters() == null) { + this.innerExtensionParameters = new ExtensionParameters(); + } + this.innerExtensionParameters().withSettings(settings); + return this; + } + + /** + * Get the protectedSettings property: Protected settings (may contain secrets). + * + * @return the protectedSettings value. + */ + public Object protectedSettings() { + return this.innerExtensionParameters() == null ? null : this.innerExtensionParameters().protectedSettings(); + } + + /** + * Set the protectedSettings property: Protected settings (may contain secrets). + * + * @param protectedSettings the protectedSettings value to set. + * @return the ExtensionProperties object itself. + */ + public ExtensionProperties withProtectedSettings(Object protectedSettings) { + if (this.innerExtensionParameters() == null) { + this.innerExtensionParameters = new ExtensionParameters(); + } + this.innerExtensionParameters().withProtectedSettings(protectedSettings); + return this; + } + + /** + * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.innerExtensionParameters() == null + ? null + : this.innerExtensionParameters().enableAutomaticUpgrade(); + } + + /** + * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. + * @return the ExtensionProperties object itself. + */ + public ExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + if (this.innerExtensionParameters() == null) { + this.innerExtensionParameters = new ExtensionParameters(); + } + this.innerExtensionParameters().withEnableAutomaticUpgrade(enableAutomaticUpgrade); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerExtensionParameters() != null) { + innerExtensionParameters().validate(); + } + if (perNodeExtensionDetails() != null) { + perNodeExtensionDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImageProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImageProperties.java index fe985b0dc7420..82472df0eb697 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImageProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImageProperties.java @@ -15,7 +15,9 @@ import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties under the gallery image resource. */ +/** + * Properties under the gallery image resource. + */ @Fluent public final class GalleryImageProperties { /* @@ -72,13 +74,15 @@ public final class GalleryImageProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private GalleryImageStatus status; - /** Creates an instance of GalleryImageProperties class. */ + /** + * Creates an instance of GalleryImageProperties class. + */ public GalleryImageProperties() { } /** * Get the containerId property: Storage ContainerID of the storage container to be used for gallery image. - * + * * @return the containerId value. */ public String containerId() { @@ -87,7 +91,7 @@ public String containerId() { /** * Set the containerId property: Storage ContainerID of the storage container to be used for gallery image. - * + * * @param containerId the containerId value to set. * @return the GalleryImageProperties object itself. */ @@ -98,7 +102,7 @@ public GalleryImageProperties withContainerId(String containerId) { /** * Get the imagePath property: location of the image the gallery image should be created from. - * + * * @return the imagePath value. */ public String imagePath() { @@ -107,7 +111,7 @@ public String imagePath() { /** * Set the imagePath property: location of the image the gallery image should be created from. - * + * * @param imagePath the imagePath value to set. * @return the GalleryImageProperties object itself. */ @@ -118,7 +122,7 @@ public GalleryImageProperties withImagePath(String imagePath) { /** * Get the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @return the osType value. */ public OperatingSystemTypes osType() { @@ -127,7 +131,7 @@ public OperatingSystemTypes osType() { /** * Set the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @param osType the osType value to set. * @return the GalleryImageProperties object itself. */ @@ -139,7 +143,7 @@ public GalleryImageProperties withOsType(OperatingSystemTypes osType) { /** * Get the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @return the cloudInitDataSource value. */ public CloudInitDataSource cloudInitDataSource() { @@ -149,7 +153,7 @@ public CloudInitDataSource cloudInitDataSource() { /** * Set the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @param cloudInitDataSource the cloudInitDataSource value to set. * @return the GalleryImageProperties object itself. */ @@ -160,7 +164,7 @@ public GalleryImageProperties withCloudInitDataSource(CloudInitDataSource cloudI /** * Get the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ public HyperVGeneration hyperVGeneration() { @@ -169,7 +173,7 @@ public HyperVGeneration hyperVGeneration() { /** * Set the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration the hyperVGeneration value to set. * @return the GalleryImageProperties object itself. */ @@ -180,7 +184,7 @@ public GalleryImageProperties withHyperVGeneration(HyperVGeneration hyperVGenera /** * Get the identifier property: This is the gallery image definition identifier. - * + * * @return the identifier value. */ public GalleryImageIdentifier identifier() { @@ -189,7 +193,7 @@ public GalleryImageIdentifier identifier() { /** * Set the identifier property: This is the gallery image definition identifier. - * + * * @param identifier the identifier value to set. * @return the GalleryImageProperties object itself. */ @@ -201,7 +205,7 @@ public GalleryImageProperties withIdentifier(GalleryImageIdentifier identifier) /** * Get the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @return the version value. */ public GalleryImageVersion version() { @@ -211,7 +215,7 @@ public GalleryImageVersion version() { /** * Set the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @param version the version value to set. * @return the GalleryImageProperties object itself. */ @@ -222,7 +226,7 @@ public GalleryImageProperties withVersion(GalleryImageVersion version) { /** * Get the provisioningState property: Provisioning state of the gallery image. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -231,7 +235,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the status property: The observed state of gallery images. - * + * * @return the status value. */ public GalleryImageStatus status() { @@ -240,14 +244,13 @@ public GalleryImageStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (osType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property osType in model GalleryImageProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property osType in model GalleryImageProperties")); } if (identifier() != null) { identifier().validate(); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImageVersionProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImageVersionProperties.java index ad1b2ef34f2a1..ebc15def8c80f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImageVersionProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImageVersionProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersionStorageProfile; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of a gallery image version. */ +/** + * Describes the properties of a gallery image version. + */ @Fluent public final class GalleryImageVersionProperties { /* @@ -18,13 +20,15 @@ public final class GalleryImageVersionProperties { @JsonProperty(value = "storageProfile", required = true) private GalleryImageVersionStorageProfile storageProfile; - /** Creates an instance of GalleryImageVersionProperties class. */ + /** + * Creates an instance of GalleryImageVersionProperties class. + */ public GalleryImageVersionProperties() { } /** * Get the storageProfile property: This is the storage profile of a Gallery Image Version. - * + * * @return the storageProfile value. */ public GalleryImageVersionStorageProfile storageProfile() { @@ -33,7 +37,7 @@ public GalleryImageVersionStorageProfile storageProfile() { /** * Set the storageProfile property: This is the storage profile of a Gallery Image Version. - * + * * @param storageProfile the storageProfile value to set. * @return the GalleryImageVersionProperties object itself. */ @@ -44,15 +48,14 @@ public GalleryImageVersionProperties withStorageProfile(GalleryImageVersionStora /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (storageProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageProfile in model GalleryImageVersionProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storageProfile in model GalleryImageVersionProperties")); } else { storageProfile().validate(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImagesInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImagesInner.java index 9e9bc65db83f7..2b4e5f351195e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImagesInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GalleryImagesInner.java @@ -18,7 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The gallery images resource definition. */ +/** + * The gallery images resource definition. + */ @Fluent public final class GalleryImagesInner extends Resource { /* @@ -39,13 +41,15 @@ public final class GalleryImagesInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of GalleryImagesInner class. */ + /** + * Creates an instance of GalleryImagesInner class. + */ public GalleryImagesInner() { } /** * Get the innerProperties property: Properties under the gallery image resource. - * + * * @return the innerProperties value. */ private GalleryImageProperties innerProperties() { @@ -54,7 +58,7 @@ private GalleryImageProperties innerProperties() { /** * Get the extendedLocation property: The extendedLocation of the resource. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -63,7 +67,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The extendedLocation of the resource. - * + * * @param extendedLocation the extendedLocation value to set. * @return the GalleryImagesInner object itself. */ @@ -74,21 +78,25 @@ public GalleryImagesInner withExtendedLocation(ExtendedLocation extendedLocation /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public GalleryImagesInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public GalleryImagesInner withTags(Map tags) { super.withTags(tags); @@ -97,7 +105,7 @@ public GalleryImagesInner withTags(Map tags) { /** * Get the containerId property: Storage ContainerID of the storage container to be used for gallery image. - * + * * @return the containerId value. */ public String containerId() { @@ -106,7 +114,7 @@ public String containerId() { /** * Set the containerId property: Storage ContainerID of the storage container to be used for gallery image. - * + * * @param containerId the containerId value to set. * @return the GalleryImagesInner object itself. */ @@ -120,7 +128,7 @@ public GalleryImagesInner withContainerId(String containerId) { /** * Get the imagePath property: location of the image the gallery image should be created from. - * + * * @return the imagePath value. */ public String imagePath() { @@ -129,7 +137,7 @@ public String imagePath() { /** * Set the imagePath property: location of the image the gallery image should be created from. - * + * * @param imagePath the imagePath value to set. * @return the GalleryImagesInner object itself. */ @@ -143,7 +151,7 @@ public GalleryImagesInner withImagePath(String imagePath) { /** * Get the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @return the osType value. */ public OperatingSystemTypes osType() { @@ -152,7 +160,7 @@ public OperatingSystemTypes osType() { /** * Set the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @param osType the osType value to set. * @return the GalleryImagesInner object itself. */ @@ -167,7 +175,7 @@ public GalleryImagesInner withOsType(OperatingSystemTypes osType) { /** * Get the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @return the cloudInitDataSource value. */ public CloudInitDataSource cloudInitDataSource() { @@ -177,7 +185,7 @@ public CloudInitDataSource cloudInitDataSource() { /** * Set the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @param cloudInitDataSource the cloudInitDataSource value to set. * @return the GalleryImagesInner object itself. */ @@ -191,7 +199,7 @@ public GalleryImagesInner withCloudInitDataSource(CloudInitDataSource cloudInitD /** * Get the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ public HyperVGeneration hyperVGeneration() { @@ -200,7 +208,7 @@ public HyperVGeneration hyperVGeneration() { /** * Set the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration the hyperVGeneration value to set. * @return the GalleryImagesInner object itself. */ @@ -214,7 +222,7 @@ public GalleryImagesInner withHyperVGeneration(HyperVGeneration hyperVGeneration /** * Get the identifier property: This is the gallery image definition identifier. - * + * * @return the identifier value. */ public GalleryImageIdentifier identifier() { @@ -223,7 +231,7 @@ public GalleryImageIdentifier identifier() { /** * Set the identifier property: This is the gallery image definition identifier. - * + * * @param identifier the identifier value to set. * @return the GalleryImagesInner object itself. */ @@ -238,7 +246,7 @@ public GalleryImagesInner withIdentifier(GalleryImageIdentifier identifier) { /** * Get the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @return the version value. */ public GalleryImageVersion version() { @@ -248,7 +256,7 @@ public GalleryImageVersion version() { /** * Set the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @param version the version value to set. * @return the GalleryImagesInner object itself. */ @@ -262,7 +270,7 @@ public GalleryImagesInner withVersion(GalleryImageVersion version) { /** * Get the provisioningState property: Provisioning state of the gallery image. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -271,7 +279,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the status property: The observed state of gallery images. - * + * * @return the status value. */ public GalleryImageStatus status() { @@ -280,7 +288,7 @@ public GalleryImageStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GuestAgentInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GuestAgentInner.java index 42e40d3bc07e4..471f5d0d93eac 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GuestAgentInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GuestAgentInner.java @@ -12,7 +12,9 @@ import com.azure.resourcemanager.azurestackhci.models.ProvisioningAction; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines the GuestAgent. */ +/** + * Defines the GuestAgent. + */ @Fluent public final class GuestAgentInner extends ProxyResource { /* @@ -27,13 +29,15 @@ public final class GuestAgentInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of GuestAgentInner class. */ + /** + * Creates an instance of GuestAgentInner class. + */ public GuestAgentInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private GuestAgentProperties innerProperties() { @@ -42,7 +46,7 @@ private GuestAgentProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -51,7 +55,7 @@ public SystemData systemData() { /** * Get the credentials property: Username / Password Credentials to provision guest agent. - * + * * @return the credentials value. */ public GuestCredential credentials() { @@ -60,7 +64,7 @@ public GuestCredential credentials() { /** * Set the credentials property: Username / Password Credentials to provision guest agent. - * + * * @param credentials the credentials value to set. * @return the GuestAgentInner object itself. */ @@ -74,7 +78,7 @@ public GuestAgentInner withCredentials(GuestCredential credentials) { /** * Get the provisioningAction property: The guest agent provisioning action. - * + * * @return the provisioningAction value. */ public ProvisioningAction provisioningAction() { @@ -83,7 +87,7 @@ public ProvisioningAction provisioningAction() { /** * Set the provisioningAction property: The guest agent provisioning action. - * + * * @param provisioningAction the provisioningAction value to set. * @return the GuestAgentInner object itself. */ @@ -97,7 +101,7 @@ public GuestAgentInner withProvisioningAction(ProvisioningAction provisioningAct /** * Get the status property: The guest agent status. - * + * * @return the status value. */ public String status() { @@ -106,7 +110,7 @@ public String status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -115,13 +119,13 @@ public String provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( + throw LOGGER.atError() + .log( new IllegalArgumentException("Missing required property innerProperties in model GuestAgentInner")); } else { innerProperties().validate(); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GuestAgentProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GuestAgentProperties.java index 84da616d738c7..93f77ef3bb5ed 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GuestAgentProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/GuestAgentProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.azurestackhci.models.ProvisioningAction; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines the resource properties. */ +/** + * Defines the resource properties. + */ @Fluent public final class GuestAgentProperties { /* @@ -36,13 +38,15 @@ public final class GuestAgentProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; - /** Creates an instance of GuestAgentProperties class. */ + /** + * Creates an instance of GuestAgentProperties class. + */ public GuestAgentProperties() { } /** * Get the credentials property: Username / Password Credentials to provision guest agent. - * + * * @return the credentials value. */ public GuestCredential credentials() { @@ -51,7 +55,7 @@ public GuestCredential credentials() { /** * Set the credentials property: Username / Password Credentials to provision guest agent. - * + * * @param credentials the credentials value to set. * @return the GuestAgentProperties object itself. */ @@ -62,7 +66,7 @@ public GuestAgentProperties withCredentials(GuestCredential credentials) { /** * Get the provisioningAction property: The guest agent provisioning action. - * + * * @return the provisioningAction value. */ public ProvisioningAction provisioningAction() { @@ -71,7 +75,7 @@ public ProvisioningAction provisioningAction() { /** * Set the provisioningAction property: The guest agent provisioning action. - * + * * @param provisioningAction the provisioningAction value to set. * @return the GuestAgentProperties object itself. */ @@ -82,7 +86,7 @@ public GuestAgentProperties withProvisioningAction(ProvisioningAction provisioni /** * Get the status property: The guest agent status. - * + * * @return the status value. */ public String status() { @@ -91,7 +95,7 @@ public String status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -100,7 +104,7 @@ public String provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java new file mode 100644 index 0000000000000..f00e4dd773d06 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HciUpdateInner.java @@ -0,0 +1,582 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.AvailabilityType; +import com.azure.resourcemanager.azurestackhci.models.HealthState; +import com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo; +import com.azure.resourcemanager.azurestackhci.models.PrecheckResult; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.RebootRequirement; +import com.azure.resourcemanager.azurestackhci.models.State; +import com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Update details. + */ +@Fluent +public final class HciUpdateInner extends ProxyResource { + /* + * The geo-location where the resource lives + */ + @JsonProperty(value = "location") + private String location; + + /* + * Update properties + */ + @JsonProperty(value = "properties") + private UpdateProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of HciUpdateInner class. + */ + public HciUpdateInner() { + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the innerProperties property: Update properties. + * + * @return the innerProperties value. + */ + private UpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning state of the Updates proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the installedDate property: Date that the update was installed. + * + * @return the installedDate value. + */ + public OffsetDateTime installedDate() { + return this.innerProperties() == null ? null : this.innerProperties().installedDate(); + } + + /** + * Set the installedDate property: Date that the update was installed. + * + * @param installedDate the installedDate value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withInstalledDate(OffsetDateTime installedDate) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withInstalledDate(installedDate); + return this; + } + + /** + * Get the description property: Description of the update. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Description of the update. + * + * @param description the description value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the state property: State of the update as it relates to this stamp. + * + * @return the state value. + */ + public State state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Set the state property: State of the update as it relates to this stamp. + * + * @param state the state value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withState(State state) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withState(state); + return this; + } + + /** + * Get the prerequisites property: If update State is HasPrerequisite, this property contains an array of objects + * describing prerequisite updates before installing this update. Otherwise, it is empty. + * + * @return the prerequisites value. + */ + public List prerequisites() { + return this.innerProperties() == null ? null : this.innerProperties().prerequisites(); + } + + /** + * Set the prerequisites property: If update State is HasPrerequisite, this property contains an array of objects + * describing prerequisite updates before installing this update. Otherwise, it is empty. + * + * @param prerequisites the prerequisites value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withPrerequisites(List prerequisites) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withPrerequisites(prerequisites); + return this; + } + + /** + * Get the componentVersions property: An array of component versions for a Solution Bundle update, and an empty + * array otherwise. + * + * @return the componentVersions value. + */ + public List componentVersions() { + return this.innerProperties() == null ? null : this.innerProperties().componentVersions(); + } + + /** + * Set the componentVersions property: An array of component versions for a Solution Bundle update, and an empty + * array otherwise. + * + * @param componentVersions the componentVersions value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withComponentVersions(List componentVersions) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withComponentVersions(componentVersions); + return this; + } + + /** + * Get the rebootRequired property: The rebootRequired property. + * + * @return the rebootRequired value. + */ + public RebootRequirement rebootRequired() { + return this.innerProperties() == null ? null : this.innerProperties().rebootRequired(); + } + + /** + * Set the rebootRequired property: The rebootRequired property. + * + * @param rebootRequired the rebootRequired value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withRebootRequired(RebootRequirement rebootRequired) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withRebootRequired(rebootRequired); + return this; + } + + /** + * Get the healthState property: Overall health state for update-specific health checks. + * + * @return the healthState value. + */ + public HealthState healthState() { + return this.innerProperties() == null ? null : this.innerProperties().healthState(); + } + + /** + * Set the healthState property: Overall health state for update-specific health checks. + * + * @param healthState the healthState value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withHealthState(HealthState healthState) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withHealthState(healthState); + return this; + } + + /** + * Get the healthCheckResult property: An array of PrecheckResult objects. + * + * @return the healthCheckResult value. + */ + public List healthCheckResult() { + return this.innerProperties() == null ? null : this.innerProperties().healthCheckResult(); + } + + /** + * Set the healthCheckResult property: An array of PrecheckResult objects. + * + * @param healthCheckResult the healthCheckResult value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withHealthCheckResult(List healthCheckResult) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withHealthCheckResult(healthCheckResult); + return this; + } + + /** + * Get the healthCheckDate property: Last time the package-specific checks were run. + * + * @return the healthCheckDate value. + */ + public OffsetDateTime healthCheckDate() { + return this.innerProperties() == null ? null : this.innerProperties().healthCheckDate(); + } + + /** + * Set the healthCheckDate property: Last time the package-specific checks were run. + * + * @param healthCheckDate the healthCheckDate value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withHealthCheckDate(OffsetDateTime healthCheckDate) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withHealthCheckDate(healthCheckDate); + return this; + } + + /** + * Get the packagePath property: Path where the update package is available. + * + * @return the packagePath value. + */ + public String packagePath() { + return this.innerProperties() == null ? null : this.innerProperties().packagePath(); + } + + /** + * Set the packagePath property: Path where the update package is available. + * + * @param packagePath the packagePath value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withPackagePath(String packagePath) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withPackagePath(packagePath); + return this; + } + + /** + * Get the packageSizeInMb property: Size of the package. This value is a combination of the size from update + * metadata and size of the payload that results from the live scan operation for OS update content. + * + * @return the packageSizeInMb value. + */ + public Float packageSizeInMb() { + return this.innerProperties() == null ? null : this.innerProperties().packageSizeInMb(); + } + + /** + * Set the packageSizeInMb property: Size of the package. This value is a combination of the size from update + * metadata and size of the payload that results from the live scan operation for OS update content. + * + * @param packageSizeInMb the packageSizeInMb value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withPackageSizeInMb(Float packageSizeInMb) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withPackageSizeInMb(packageSizeInMb); + return this; + } + + /** + * Get the displayName property: Display name of the Update. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the Update. + * + * @param displayName the displayName value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the version property: Version of the update. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: Version of the update. + * + * @param version the version value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the publisher property: Publisher of the update package. + * + * @return the publisher value. + */ + public String publisher() { + return this.innerProperties() == null ? null : this.innerProperties().publisher(); + } + + /** + * Set the publisher property: Publisher of the update package. + * + * @param publisher the publisher value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withPublisher(String publisher) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withPublisher(publisher); + return this; + } + + /** + * Get the releaseLink property: Link to release notes for the update. + * + * @return the releaseLink value. + */ + public String releaseLink() { + return this.innerProperties() == null ? null : this.innerProperties().releaseLink(); + } + + /** + * Set the releaseLink property: Link to release notes for the update. + * + * @param releaseLink the releaseLink value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withReleaseLink(String releaseLink) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withReleaseLink(releaseLink); + return this; + } + + /** + * Get the availabilityType property: Indicates the way the update content can be downloaded. + * + * @return the availabilityType value. + */ + public AvailabilityType availabilityType() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityType(); + } + + /** + * Set the availabilityType property: Indicates the way the update content can be downloaded. + * + * @param availabilityType the availabilityType value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withAvailabilityType(AvailabilityType availabilityType) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withAvailabilityType(availabilityType); + return this; + } + + /** + * Get the packageType property: Customer-visible type of the update. + * + * @return the packageType value. + */ + public String packageType() { + return this.innerProperties() == null ? null : this.innerProperties().packageType(); + } + + /** + * Set the packageType property: Customer-visible type of the update. + * + * @param packageType the packageType value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withPackageType(String packageType) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withPackageType(packageType); + return this; + } + + /** + * Get the additionalProperties property: Extensible KV pairs serialized as a string. This is currently used to + * report the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp + * based on OEM type. + * + * @return the additionalProperties value. + */ + public String additionalProperties() { + return this.innerProperties() == null ? null : this.innerProperties().additionalProperties(); + } + + /** + * Set the additionalProperties property: Extensible KV pairs serialized as a string. This is currently used to + * report the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp + * based on OEM type. + * + * @param additionalProperties the additionalProperties value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withAdditionalProperties(String additionalProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withAdditionalProperties(additionalProperties); + return this; + } + + /** + * Get the progressPercentage property: Progress percentage of ongoing operation. Currently this property is only + * valid when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * + * @return the progressPercentage value. + */ + public Float progressPercentage() { + return this.innerProperties() == null ? null : this.innerProperties().progressPercentage(); + } + + /** + * Set the progressPercentage property: Progress percentage of ongoing operation. Currently this property is only + * valid when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * + * @param progressPercentage the progressPercentage value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withProgressPercentage(Float progressPercentage) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withProgressPercentage(progressPercentage); + return this; + } + + /** + * Get the notifyMessage property: Brief message with instructions for updates of AvailabilityType Notify. + * + * @return the notifyMessage value. + */ + public String notifyMessage() { + return this.innerProperties() == null ? null : this.innerProperties().notifyMessage(); + } + + /** + * Set the notifyMessage property: Brief message with instructions for updates of AvailabilityType Notify. + * + * @param notifyMessage the notifyMessage value to set. + * @return the HciUpdateInner object itself. + */ + public HciUpdateInner withNotifyMessage(String notifyMessage) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateProperties(); + } + this.innerProperties().withNotifyMessage(notifyMessage); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HybridIdentityMetadataInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HybridIdentityMetadataInner.java index 58294778c682e..415806671eb15 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HybridIdentityMetadataInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HybridIdentityMetadataInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.azurestackhci.models.Identity; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines the HybridIdentityMetadata. */ +/** + * Defines the HybridIdentityMetadata. + */ @Fluent public final class HybridIdentityMetadataInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class HybridIdentityMetadataInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of HybridIdentityMetadataInner class. */ + /** + * Creates an instance of HybridIdentityMetadataInner class. + */ public HybridIdentityMetadataInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private HybridIdentityMetadataProperties innerProperties() { @@ -41,7 +45,7 @@ private HybridIdentityMetadataProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +54,7 @@ public SystemData systemData() { /** * Get the resourceUid property: The unique identifier for the resource. - * + * * @return the resourceUid value. */ public String resourceUid() { @@ -59,7 +63,7 @@ public String resourceUid() { /** * Set the resourceUid property: The unique identifier for the resource. - * + * * @param resourceUid the resourceUid value to set. * @return the HybridIdentityMetadataInner object itself. */ @@ -73,7 +77,7 @@ public HybridIdentityMetadataInner withResourceUid(String resourceUid) { /** * Get the publicKey property: The Public Key. - * + * * @return the publicKey value. */ public String publicKey() { @@ -82,7 +86,7 @@ public String publicKey() { /** * Set the publicKey property: The Public Key. - * + * * @param publicKey the publicKey value to set. * @return the HybridIdentityMetadataInner object itself. */ @@ -96,7 +100,7 @@ public HybridIdentityMetadataInner withPublicKey(String publicKey) { /** * Get the identity property: Identity for the resource. - * + * * @return the identity value. */ public Identity identity() { @@ -105,7 +109,7 @@ public Identity identity() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -114,15 +118,14 @@ public String provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model HybridIdentityMetadataInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model HybridIdentityMetadataInner")); } else { innerProperties().validate(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HybridIdentityMetadataProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HybridIdentityMetadataProperties.java index ed37a83a47fe1..b60bb8cd8f796 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HybridIdentityMetadataProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/HybridIdentityMetadataProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.azurestackhci.models.Identity; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines the resource properties. */ +/** + * Defines the resource properties. + */ @Fluent public final class HybridIdentityMetadataProperties { /* @@ -35,13 +37,15 @@ public final class HybridIdentityMetadataProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; - /** Creates an instance of HybridIdentityMetadataProperties class. */ + /** + * Creates an instance of HybridIdentityMetadataProperties class. + */ public HybridIdentityMetadataProperties() { } /** * Get the resourceUid property: The unique identifier for the resource. - * + * * @return the resourceUid value. */ public String resourceUid() { @@ -50,7 +54,7 @@ public String resourceUid() { /** * Set the resourceUid property: The unique identifier for the resource. - * + * * @param resourceUid the resourceUid value to set. * @return the HybridIdentityMetadataProperties object itself. */ @@ -61,7 +65,7 @@ public HybridIdentityMetadataProperties withResourceUid(String resourceUid) { /** * Get the publicKey property: The Public Key. - * + * * @return the publicKey value. */ public String publicKey() { @@ -70,7 +74,7 @@ public String publicKey() { /** * Set the publicKey property: The Public Key. - * + * * @param publicKey the publicKey value to set. * @return the HybridIdentityMetadataProperties object itself. */ @@ -81,7 +85,7 @@ public HybridIdentityMetadataProperties withPublicKey(String publicKey) { /** * Get the identity property: Identity for the resource. - * + * * @return the identity value. */ public Identity identity() { @@ -90,7 +94,7 @@ public Identity identity() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -99,7 +103,7 @@ public String provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/LogicalNetworkProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/LogicalNetworkProperties.java index 6c4ecb6cd4bf0..7888920647b09 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/LogicalNetworkProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/LogicalNetworkProperties.java @@ -12,12 +12,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties under the logical network resource. */ +/** + * Properties under the logical network resource. + */ @Fluent public final class LogicalNetworkProperties { /* - * DhcpOptions contains an array of DNS servers available to VMs deployed in the logical network. Standard DHCP - * option for a subnet overrides logical network DHCP options. + * DhcpOptions contains an array of DNS servers available to VMs deployed in the logical network. Standard DHCP option for a subnet overrides logical network DHCP options. */ @JsonProperty(value = "dhcpOptions") private LogicalNetworkPropertiesDhcpOptions dhcpOptions; @@ -46,14 +47,16 @@ public final class LogicalNetworkProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private LogicalNetworkStatus status; - /** Creates an instance of LogicalNetworkProperties class. */ + /** + * Creates an instance of LogicalNetworkProperties class. + */ public LogicalNetworkProperties() { } /** * Get the dhcpOptions property: DhcpOptions contains an array of DNS servers available to VMs deployed in the * logical network. Standard DHCP option for a subnet overrides logical network DHCP options. - * + * * @return the dhcpOptions value. */ public LogicalNetworkPropertiesDhcpOptions dhcpOptions() { @@ -63,7 +66,7 @@ public LogicalNetworkPropertiesDhcpOptions dhcpOptions() { /** * Set the dhcpOptions property: DhcpOptions contains an array of DNS servers available to VMs deployed in the * logical network. Standard DHCP option for a subnet overrides logical network DHCP options. - * + * * @param dhcpOptions the dhcpOptions value to set. * @return the LogicalNetworkProperties object itself. */ @@ -74,7 +77,7 @@ public LogicalNetworkProperties withDhcpOptions(LogicalNetworkPropertiesDhcpOpti /** * Get the subnets property: Subnet - list of subnets under the logical network. - * + * * @return the subnets value. */ public List subnets() { @@ -83,7 +86,7 @@ public List subnets() { /** * Set the subnets property: Subnet - list of subnets under the logical network. - * + * * @param subnets the subnets value to set. * @return the LogicalNetworkProperties object itself. */ @@ -94,7 +97,7 @@ public LogicalNetworkProperties withSubnets(List subnets) { /** * Get the provisioningState property: Provisioning state of the logical network. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -103,7 +106,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the vmSwitchName property: name of the network switch to be used for VMs. - * + * * @return the vmSwitchName value. */ public String vmSwitchName() { @@ -112,7 +115,7 @@ public String vmSwitchName() { /** * Set the vmSwitchName property: name of the network switch to be used for VMs. - * + * * @param vmSwitchName the vmSwitchName value to set. * @return the LogicalNetworkProperties object itself. */ @@ -123,7 +126,7 @@ public LogicalNetworkProperties withVmSwitchName(String vmSwitchName) { /** * Get the status property: The observed state of logical networks. - * + * * @return the status value. */ public LogicalNetworkStatus status() { @@ -132,7 +135,7 @@ public LogicalNetworkStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/LogicalNetworksInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/LogicalNetworksInner.java index 906d409fb0220..2e4daa6100053 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/LogicalNetworksInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/LogicalNetworksInner.java @@ -16,7 +16,9 @@ import java.util.List; import java.util.Map; -/** The logical network resource definition. */ +/** + * The logical network resource definition. + */ @Fluent public final class LogicalNetworksInner extends Resource { /* @@ -37,13 +39,15 @@ public final class LogicalNetworksInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of LogicalNetworksInner class. */ + /** + * Creates an instance of LogicalNetworksInner class. + */ public LogicalNetworksInner() { } /** * Get the innerProperties property: Properties under the logical network resource. - * + * * @return the innerProperties value. */ private LogicalNetworkProperties innerProperties() { @@ -52,7 +56,7 @@ private LogicalNetworkProperties innerProperties() { /** * Get the extendedLocation property: The extendedLocation of the resource. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -61,7 +65,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The extendedLocation of the resource. - * + * * @param extendedLocation the extendedLocation value to set. * @return the LogicalNetworksInner object itself. */ @@ -72,21 +76,25 @@ public LogicalNetworksInner withExtendedLocation(ExtendedLocation extendedLocati /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public LogicalNetworksInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public LogicalNetworksInner withTags(Map tags) { super.withTags(tags); @@ -96,7 +104,7 @@ public LogicalNetworksInner withTags(Map tags) { /** * Get the dhcpOptions property: DhcpOptions contains an array of DNS servers available to VMs deployed in the * logical network. Standard DHCP option for a subnet overrides logical network DHCP options. - * + * * @return the dhcpOptions value. */ public LogicalNetworkPropertiesDhcpOptions dhcpOptions() { @@ -106,7 +114,7 @@ public LogicalNetworkPropertiesDhcpOptions dhcpOptions() { /** * Set the dhcpOptions property: DhcpOptions contains an array of DNS servers available to VMs deployed in the * logical network. Standard DHCP option for a subnet overrides logical network DHCP options. - * + * * @param dhcpOptions the dhcpOptions value to set. * @return the LogicalNetworksInner object itself. */ @@ -120,7 +128,7 @@ public LogicalNetworksInner withDhcpOptions(LogicalNetworkPropertiesDhcpOptions /** * Get the subnets property: Subnet - list of subnets under the logical network. - * + * * @return the subnets value. */ public List subnets() { @@ -129,7 +137,7 @@ public List subnets() { /** * Set the subnets property: Subnet - list of subnets under the logical network. - * + * * @param subnets the subnets value to set. * @return the LogicalNetworksInner object itself. */ @@ -143,7 +151,7 @@ public LogicalNetworksInner withSubnets(List subnets) { /** * Get the provisioningState property: Provisioning state of the logical network. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -152,7 +160,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the vmSwitchName property: name of the network switch to be used for VMs. - * + * * @return the vmSwitchName value. */ public String vmSwitchName() { @@ -161,7 +169,7 @@ public String vmSwitchName() { /** * Set the vmSwitchName property: name of the network switch to be used for VMs. - * + * * @param vmSwitchName the vmSwitchName value to set. * @return the LogicalNetworksInner object itself. */ @@ -175,7 +183,7 @@ public LogicalNetworksInner withVmSwitchName(String vmSwitchName) { /** * Get the status property: The observed state of logical networks. - * + * * @return the status value. */ public LogicalNetworkStatus status() { @@ -184,7 +192,7 @@ public LogicalNetworkStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java new file mode 100644 index 0000000000000..ed939c61e8071 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ManagedServiceIdentity.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import java.util.UUID; + +/** + * Managed service identity (system assigned and/or user assigned identities). + */ +@Fluent +public final class ManagedServiceIdentity { + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /* + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private UUID tenantId; + + /* + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ + @JsonProperty(value = "type", required = true) + private ManagedServiceIdentityType type; + + /* + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map userAssignedIdentities; + + /** + * Creates an instance of ManagedServiceIdentity class. + */ + public ManagedServiceIdentity() { + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @param type the type value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity")); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/MarketplaceGalleryImageProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/MarketplaceGalleryImageProperties.java index 846c79e02b095..42130682594d2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/MarketplaceGalleryImageProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/MarketplaceGalleryImageProperties.java @@ -15,7 +15,9 @@ import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties under the marketplace gallery image resource. */ +/** + * Properties under the marketplace gallery image resource. + */ @Fluent public final class MarketplaceGalleryImageProperties { /* @@ -66,14 +68,16 @@ public final class MarketplaceGalleryImageProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private MarketplaceGalleryImageStatus status; - /** Creates an instance of MarketplaceGalleryImageProperties class. */ + /** + * Creates an instance of MarketplaceGalleryImageProperties class. + */ public MarketplaceGalleryImageProperties() { } /** * Get the containerId property: Storage ContainerID of the storage container to be used for marketplace gallery * image. - * + * * @return the containerId value. */ public String containerId() { @@ -83,7 +87,7 @@ public String containerId() { /** * Set the containerId property: Storage ContainerID of the storage container to be used for marketplace gallery * image. - * + * * @param containerId the containerId value to set. * @return the MarketplaceGalleryImageProperties object itself. */ @@ -94,7 +98,7 @@ public MarketplaceGalleryImageProperties withContainerId(String containerId) { /** * Get the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @return the osType value. */ public OperatingSystemTypes osType() { @@ -103,7 +107,7 @@ public OperatingSystemTypes osType() { /** * Set the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @param osType the osType value to set. * @return the MarketplaceGalleryImageProperties object itself. */ @@ -115,7 +119,7 @@ public MarketplaceGalleryImageProperties withOsType(OperatingSystemTypes osType) /** * Get the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @return the cloudInitDataSource value. */ public CloudInitDataSource cloudInitDataSource() { @@ -125,7 +129,7 @@ public CloudInitDataSource cloudInitDataSource() { /** * Set the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @param cloudInitDataSource the cloudInitDataSource value to set. * @return the MarketplaceGalleryImageProperties object itself. */ @@ -136,7 +140,7 @@ public MarketplaceGalleryImageProperties withCloudInitDataSource(CloudInitDataSo /** * Get the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ public HyperVGeneration hyperVGeneration() { @@ -145,7 +149,7 @@ public HyperVGeneration hyperVGeneration() { /** * Set the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration the hyperVGeneration value to set. * @return the MarketplaceGalleryImageProperties object itself. */ @@ -156,7 +160,7 @@ public MarketplaceGalleryImageProperties withHyperVGeneration(HyperVGeneration h /** * Get the identifier property: This is the gallery image definition identifier. - * + * * @return the identifier value. */ public GalleryImageIdentifier identifier() { @@ -165,7 +169,7 @@ public GalleryImageIdentifier identifier() { /** * Set the identifier property: This is the gallery image definition identifier. - * + * * @param identifier the identifier value to set. * @return the MarketplaceGalleryImageProperties object itself. */ @@ -177,7 +181,7 @@ public MarketplaceGalleryImageProperties withIdentifier(GalleryImageIdentifier i /** * Get the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @return the version value. */ public GalleryImageVersion version() { @@ -187,7 +191,7 @@ public GalleryImageVersion version() { /** * Set the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @param version the version value to set. * @return the MarketplaceGalleryImageProperties object itself. */ @@ -198,7 +202,7 @@ public MarketplaceGalleryImageProperties withVersion(GalleryImageVersion version /** * Get the provisioningState property: Provisioning state of the marketplace gallery image. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -207,7 +211,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the status property: The observed state of marketplace gallery images. - * + * * @return the status value. */ public MarketplaceGalleryImageStatus status() { @@ -216,15 +220,14 @@ public MarketplaceGalleryImageStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (osType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property osType in model MarketplaceGalleryImageProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property osType in model MarketplaceGalleryImageProperties")); } if (identifier() != null) { identifier().validate(); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/MarketplaceGalleryImagesInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/MarketplaceGalleryImagesInner.java index f3e6159a5c308..b40cee07ac46e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/MarketplaceGalleryImagesInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/MarketplaceGalleryImagesInner.java @@ -18,7 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The marketplace gallery image resource definition. */ +/** + * The marketplace gallery image resource definition. + */ @Fluent public final class MarketplaceGalleryImagesInner extends Resource { /* @@ -39,13 +41,15 @@ public final class MarketplaceGalleryImagesInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of MarketplaceGalleryImagesInner class. */ + /** + * Creates an instance of MarketplaceGalleryImagesInner class. + */ public MarketplaceGalleryImagesInner() { } /** * Get the innerProperties property: Properties under the marketplace gallery image resource. - * + * * @return the innerProperties value. */ private MarketplaceGalleryImageProperties innerProperties() { @@ -54,7 +58,7 @@ private MarketplaceGalleryImageProperties innerProperties() { /** * Get the extendedLocation property: The extendedLocation of the resource. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -63,7 +67,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The extendedLocation of the resource. - * + * * @param extendedLocation the extendedLocation value to set. * @return the MarketplaceGalleryImagesInner object itself. */ @@ -74,21 +78,25 @@ public MarketplaceGalleryImagesInner withExtendedLocation(ExtendedLocation exten /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MarketplaceGalleryImagesInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MarketplaceGalleryImagesInner withTags(Map tags) { super.withTags(tags); @@ -98,7 +106,7 @@ public MarketplaceGalleryImagesInner withTags(Map tags) { /** * Get the containerId property: Storage ContainerID of the storage container to be used for marketplace gallery * image. - * + * * @return the containerId value. */ public String containerId() { @@ -108,7 +116,7 @@ public String containerId() { /** * Set the containerId property: Storage ContainerID of the storage container to be used for marketplace gallery * image. - * + * * @param containerId the containerId value to set. * @return the MarketplaceGalleryImagesInner object itself. */ @@ -122,7 +130,7 @@ public MarketplaceGalleryImagesInner withContainerId(String containerId) { /** * Get the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @return the osType value. */ public OperatingSystemTypes osType() { @@ -131,7 +139,7 @@ public OperatingSystemTypes osType() { /** * Set the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @param osType the osType value to set. * @return the MarketplaceGalleryImagesInner object itself. */ @@ -146,7 +154,7 @@ public MarketplaceGalleryImagesInner withOsType(OperatingSystemTypes osType) { /** * Get the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @return the cloudInitDataSource value. */ public CloudInitDataSource cloudInitDataSource() { @@ -156,7 +164,7 @@ public CloudInitDataSource cloudInitDataSource() { /** * Set the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @param cloudInitDataSource the cloudInitDataSource value to set. * @return the MarketplaceGalleryImagesInner object itself. */ @@ -170,7 +178,7 @@ public MarketplaceGalleryImagesInner withCloudInitDataSource(CloudInitDataSource /** * Get the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ public HyperVGeneration hyperVGeneration() { @@ -179,7 +187,7 @@ public HyperVGeneration hyperVGeneration() { /** * Set the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration the hyperVGeneration value to set. * @return the MarketplaceGalleryImagesInner object itself. */ @@ -193,7 +201,7 @@ public MarketplaceGalleryImagesInner withHyperVGeneration(HyperVGeneration hyper /** * Get the identifier property: This is the gallery image definition identifier. - * + * * @return the identifier value. */ public GalleryImageIdentifier identifier() { @@ -202,7 +210,7 @@ public GalleryImageIdentifier identifier() { /** * Set the identifier property: This is the gallery image definition identifier. - * + * * @param identifier the identifier value to set. * @return the MarketplaceGalleryImagesInner object itself. */ @@ -217,7 +225,7 @@ public MarketplaceGalleryImagesInner withIdentifier(GalleryImageIdentifier ident /** * Get the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @return the version value. */ public GalleryImageVersion version() { @@ -227,7 +235,7 @@ public GalleryImageVersion version() { /** * Set the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @param version the version value to set. * @return the MarketplaceGalleryImagesInner object itself. */ @@ -241,7 +249,7 @@ public MarketplaceGalleryImagesInner withVersion(GalleryImageVersion version) { /** * Get the provisioningState property: Provisioning state of the marketplace gallery image. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -250,7 +258,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the status property: The observed state of marketplace gallery images. - * + * * @return the status value. */ public MarketplaceGalleryImageStatus status() { @@ -259,7 +267,7 @@ public MarketplaceGalleryImageStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkInterfaceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkInterfaceProperties.java index f15bd4eed24ea..bee2b499f3fd2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkInterfaceProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkInterfaceProperties.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties under the network interface resource. */ +/** + * Properties under the network interface resource. + */ @Fluent public final class NetworkInterfaceProperties { /* @@ -45,13 +47,15 @@ public final class NetworkInterfaceProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private NetworkInterfaceStatus status; - /** Creates an instance of NetworkInterfaceProperties class. */ + /** + * Creates an instance of NetworkInterfaceProperties class. + */ public NetworkInterfaceProperties() { } /** * Get the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface. - * + * * @return the ipConfigurations value. */ public List ipConfigurations() { @@ -60,7 +64,7 @@ public List ipConfigurations() { /** * Set the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface. - * + * * @param ipConfigurations the ipConfigurations value to set. * @return the NetworkInterfaceProperties object itself. */ @@ -71,7 +75,7 @@ public NetworkInterfaceProperties withIpConfigurations(List ipC /** * Get the macAddress property: MacAddress - The MAC address of the network interface. - * + * * @return the macAddress value. */ public String macAddress() { @@ -80,7 +84,7 @@ public String macAddress() { /** * Set the macAddress property: MacAddress - The MAC address of the network interface. - * + * * @param macAddress the macAddress value to set. * @return the NetworkInterfaceProperties object itself. */ @@ -91,7 +95,7 @@ public NetworkInterfaceProperties withMacAddress(String macAddress) { /** * Get the dnsSettings property: DNS Settings for the interface. - * + * * @return the dnsSettings value. */ public InterfaceDnsSettings dnsSettings() { @@ -100,7 +104,7 @@ public InterfaceDnsSettings dnsSettings() { /** * Set the dnsSettings property: DNS Settings for the interface. - * + * * @param dnsSettings the dnsSettings value to set. * @return the NetworkInterfaceProperties object itself. */ @@ -111,7 +115,7 @@ public NetworkInterfaceProperties withDnsSettings(InterfaceDnsSettings dnsSettin /** * Get the provisioningState property: Provisioning state of the network interface. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -120,7 +124,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the status property: The observed state of network interfaces. - * + * * @return the status value. */ public NetworkInterfaceStatus status() { @@ -129,7 +133,7 @@ public NetworkInterfaceStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkInterfacesInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkInterfacesInner.java index e504f8292c41e..e8cabdbff327a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkInterfacesInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/NetworkInterfacesInner.java @@ -16,7 +16,9 @@ import java.util.List; import java.util.Map; -/** The network interface resource definition. */ +/** + * The network interface resource definition. + */ @Fluent public final class NetworkInterfacesInner extends Resource { /* @@ -37,13 +39,15 @@ public final class NetworkInterfacesInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of NetworkInterfacesInner class. */ + /** + * Creates an instance of NetworkInterfacesInner class. + */ public NetworkInterfacesInner() { } /** * Get the innerProperties property: Properties under the network interface resource. - * + * * @return the innerProperties value. */ private NetworkInterfaceProperties innerProperties() { @@ -52,7 +56,7 @@ private NetworkInterfaceProperties innerProperties() { /** * Get the extendedLocation property: The extendedLocation of the resource. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -61,7 +65,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The extendedLocation of the resource. - * + * * @param extendedLocation the extendedLocation value to set. * @return the NetworkInterfacesInner object itself. */ @@ -72,21 +76,25 @@ public NetworkInterfacesInner withExtendedLocation(ExtendedLocation extendedLoca /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public NetworkInterfacesInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public NetworkInterfacesInner withTags(Map tags) { super.withTags(tags); @@ -95,7 +103,7 @@ public NetworkInterfacesInner withTags(Map tags) { /** * Get the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface. - * + * * @return the ipConfigurations value. */ public List ipConfigurations() { @@ -104,7 +112,7 @@ public List ipConfigurations() { /** * Set the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface. - * + * * @param ipConfigurations the ipConfigurations value to set. * @return the NetworkInterfacesInner object itself. */ @@ -118,7 +126,7 @@ public NetworkInterfacesInner withIpConfigurations(List ipConfi /** * Get the macAddress property: MacAddress - The MAC address of the network interface. - * + * * @return the macAddress value. */ public String macAddress() { @@ -127,7 +135,7 @@ public String macAddress() { /** * Set the macAddress property: MacAddress - The MAC address of the network interface. - * + * * @param macAddress the macAddress value to set. * @return the NetworkInterfacesInner object itself. */ @@ -141,7 +149,7 @@ public NetworkInterfacesInner withMacAddress(String macAddress) { /** * Get the dnsSettings property: DNS Settings for the interface. - * + * * @return the dnsSettings value. */ public InterfaceDnsSettings dnsSettings() { @@ -150,7 +158,7 @@ public InterfaceDnsSettings dnsSettings() { /** * Set the dnsSettings property: DNS Settings for the interface. - * + * * @param dnsSettings the dnsSettings value to set. * @return the NetworkInterfacesInner object itself. */ @@ -164,7 +172,7 @@ public NetworkInterfacesInner withDnsSettings(InterfaceDnsSettings dnsSettings) /** * Get the provisioningState property: Provisioning state of the network interface. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -173,7 +181,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the status property: The observed state of network interfaces. - * + * * @return the status value. */ public NetworkInterfaceStatus status() { @@ -182,7 +190,7 @@ public NetworkInterfaceStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java new file mode 100644 index 0000000000000..4e30fcd1b67d9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.SkuMappings; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Offer details. + */ +@Fluent +public final class OfferInner extends ProxyResource { + /* + * Offer properties. + */ + @JsonProperty(value = "properties") + private OfferProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of OfferInner class. + */ + public OfferInner() { + } + + /** + * Get the innerProperties property: Offer properties. + * + * @return the innerProperties value. + */ + private OfferProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the publisherId property: Identifier of the Publisher for the offer. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.innerProperties() == null ? null : this.innerProperties().publisherId(); + } + + /** + * Set the publisherId property: Identifier of the Publisher for the offer. + * + * @param publisherId the publisherId value to set. + * @return the OfferInner object itself. + */ + public OfferInner withPublisherId(String publisherId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfferProperties(); + } + this.innerProperties().withPublisherId(publisherId); + return this; + } + + /** + * Get the content property: JSON serialized catalog content of the offer. + * + * @return the content value. + */ + public String content() { + return this.innerProperties() == null ? null : this.innerProperties().content(); + } + + /** + * Set the content property: JSON serialized catalog content of the offer. + * + * @param content the content value to set. + * @return the OfferInner object itself. + */ + public OfferInner withContent(String content) { + if (this.innerProperties() == null) { + this.innerProperties = new OfferProperties(); + } + this.innerProperties().withContent(content); + return this; + } + + /** + * Get the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @return the contentVersion value. + */ + public String contentVersion() { + return this.innerProperties() == null ? null : this.innerProperties().contentVersion(); + } + + /** + * Set the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @param contentVersion the contentVersion value to set. + * @return the OfferInner object itself. + */ + public OfferInner withContentVersion(String contentVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new OfferProperties(); + } + this.innerProperties().withContentVersion(contentVersion); + return this; + } + + /** + * Get the skuMappings property: Array of SKU mappings. + * + * @return the skuMappings value. + */ + public List skuMappings() { + return this.innerProperties() == null ? null : this.innerProperties().skuMappings(); + } + + /** + * Set the skuMappings property: Array of SKU mappings. + * + * @param skuMappings the skuMappings value to set. + * @return the OfferInner object itself. + */ + public OfferInner withSkuMappings(List skuMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new OfferProperties(); + } + this.innerProperties().withSkuMappings(skuMappings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java new file mode 100644 index 0000000000000..8c8c996ae6c06 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OfferProperties.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.SkuMappings; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Publisher properties. + */ +@Fluent +public final class OfferProperties { + /* + * Provisioning State + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Identifier of the Publisher for the offer + */ + @JsonProperty(value = "publisherId") + private String publisherId; + + /* + * JSON serialized catalog content of the offer + */ + @JsonProperty(value = "content") + private String content; + + /* + * The API version of the catalog service used to serve the catalog content + */ + @JsonProperty(value = "contentVersion") + private String contentVersion; + + /* + * Array of SKU mappings + */ + @JsonProperty(value = "skuMappings") + private List skuMappings; + + /** + * Creates an instance of OfferProperties class. + */ + public OfferProperties() { + } + + /** + * Get the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the publisherId property: Identifier of the Publisher for the offer. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Identifier of the Publisher for the offer. + * + * @param publisherId the publisherId value to set. + * @return the OfferProperties object itself. + */ + public OfferProperties withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * Get the content property: JSON serialized catalog content of the offer. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Set the content property: JSON serialized catalog content of the offer. + * + * @param content the content value to set. + * @return the OfferProperties object itself. + */ + public OfferProperties withContent(String content) { + this.content = content; + return this; + } + + /** + * Get the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @return the contentVersion value. + */ + public String contentVersion() { + return this.contentVersion; + } + + /** + * Set the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @param contentVersion the contentVersion value to set. + * @return the OfferProperties object itself. + */ + public OfferProperties withContentVersion(String contentVersion) { + this.contentVersion = contentVersion; + return this; + } + + /** + * Get the skuMappings property: Array of SKU mappings. + * + * @return the skuMappings value. + */ + public List skuMappings() { + return this.skuMappings; + } + + /** + * Set the skuMappings property: Array of SKU mappings. + * + * @param skuMappings the skuMappings value to set. + * @return the OfferProperties object itself. + */ + public OfferProperties withSkuMappings(List skuMappings) { + this.skuMappings = skuMappings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (skuMappings() != null) { + skuMappings().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java deleted file mode 100644 index bae278555ce0d..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationInner.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.azurestackhci.models.ActionType; -import com.azure.resourcemanager.azurestackhci.models.OperationDisplay; -import com.azure.resourcemanager.azurestackhci.models.Origin; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * REST API Operation - * - *

Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Fluent -public final class OperationInner { - /* - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. - */ - @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /* - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default - * value is "user,system" - */ - @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) - private Origin origin; - - /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) - private ActionType actionType; - - /** Creates an instance of OperationInner class. */ - public OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java new file mode 100644 index 0000000000000..f3f71a667d5dd --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/OperationListResultInner.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.azurestackhci.models.Operation; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResultInner { + /* + * List of operations supported by the resource provider + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of OperationListResultInner class. + */ + public OperationListResultInner() { + } + + /** + * Get the value property: List of operations supported by the resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java new file mode 100644 index 0000000000000..3ca16c1f89381 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PasswordCredentialInner.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * The PasswordCredential model. + */ +@Fluent +public final class PasswordCredentialInner { + /* + * The secretText property. + */ + @JsonProperty(value = "secretText") + private String secretText; + + /* + * The keyId property. + */ + @JsonProperty(value = "keyId") + private String keyId; + + /* + * The startDateTime property. + */ + @JsonProperty(value = "startDateTime") + private OffsetDateTime startDateTime; + + /* + * The endDateTime property. + */ + @JsonProperty(value = "endDateTime") + private OffsetDateTime endDateTime; + + /** + * Creates an instance of PasswordCredentialInner class. + */ + public PasswordCredentialInner() { + } + + /** + * Get the secretText property: The secretText property. + * + * @return the secretText value. + */ + public String secretText() { + return this.secretText; + } + + /** + * Set the secretText property: The secretText property. + * + * @param secretText the secretText value to set. + * @return the PasswordCredentialInner object itself. + */ + public PasswordCredentialInner withSecretText(String secretText) { + this.secretText = secretText; + return this; + } + + /** + * Get the keyId property: The keyId property. + * + * @return the keyId value. + */ + public String keyId() { + return this.keyId; + } + + /** + * Set the keyId property: The keyId property. + * + * @param keyId the keyId value to set. + * @return the PasswordCredentialInner object itself. + */ + public PasswordCredentialInner withKeyId(String keyId) { + this.keyId = keyId; + return this; + } + + /** + * Get the startDateTime property: The startDateTime property. + * + * @return the startDateTime value. + */ + public OffsetDateTime startDateTime() { + return this.startDateTime; + } + + /** + * Set the startDateTime property: The startDateTime property. + * + * @param startDateTime the startDateTime value to set. + * @return the PasswordCredentialInner object itself. + */ + public PasswordCredentialInner withStartDateTime(OffsetDateTime startDateTime) { + this.startDateTime = startDateTime; + return this; + } + + /** + * Get the endDateTime property: The endDateTime property. + * + * @return the endDateTime value. + */ + public OffsetDateTime endDateTime() { + return this.endDateTime; + } + + /** + * Set the endDateTime property: The endDateTime property. + * + * @param endDateTime the endDateTime value to set. + * @return the PasswordCredentialInner object itself. + */ + public PasswordCredentialInner withEndDateTime(OffsetDateTime endDateTime) { + this.endDateTime = endDateTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherInner.java new file mode 100644 index 0000000000000..bb00402eb2a30 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherInner.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Publisher details. + */ +@Immutable +public final class PublisherInner extends ProxyResource { + /* + * Publisher properties. + */ + @JsonProperty(value = "properties") + private PublisherProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PublisherInner class. + */ + public PublisherInner() { + } + + /** + * Get the innerProperties property: Publisher properties. + * + * @return the innerProperties value. + */ + private PublisherProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.java new file mode 100644 index 0000000000000..b307e794bdb9c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/PublisherProperties.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Publisher properties. + */ +@Immutable +public final class PublisherProperties { + /* + * Provisioning State + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Creates an instance of PublisherProperties class. + */ + public PublisherProperties() { + } + + /** + * Get the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/RoutePropertiesFormat.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/RoutePropertiesFormat.java index 69003032257a8..94c84abd94804 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/RoutePropertiesFormat.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/RoutePropertiesFormat.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** RoutePropertiesFormat - Route resource. */ +/** + * RoutePropertiesFormat - Route resource. + */ @Fluent public final class RoutePropertiesFormat { /* @@ -17,19 +19,20 @@ public final class RoutePropertiesFormat { private String addressPrefix; /* - * The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop - * type is VirtualAppliance. + * The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. */ @JsonProperty(value = "nextHopIpAddress") private String nextHopIpAddress; - /** Creates an instance of RoutePropertiesFormat class. */ + /** + * Creates an instance of RoutePropertiesFormat class. + */ public RoutePropertiesFormat() { } /** * Get the addressPrefix property: The destination CIDR to which the route applies. - * + * * @return the addressPrefix value. */ public String addressPrefix() { @@ -38,7 +41,7 @@ public String addressPrefix() { /** * Set the addressPrefix property: The destination CIDR to which the route applies. - * + * * @param addressPrefix the addressPrefix value to set. * @return the RoutePropertiesFormat object itself. */ @@ -50,7 +53,7 @@ public RoutePropertiesFormat withAddressPrefix(String addressPrefix) { /** * Get the nextHopIpAddress property: The IP address packets should be forwarded to. Next hop values are only * allowed in routes where the next hop type is VirtualAppliance. - * + * * @return the nextHopIpAddress value. */ public String nextHopIpAddress() { @@ -60,7 +63,7 @@ public String nextHopIpAddress() { /** * Set the nextHopIpAddress property: The IP address packets should be forwarded to. Next hop values are only * allowed in routes where the next hop type is VirtualAppliance. - * + * * @param nextHopIpAddress the nextHopIpAddress value to set. * @return the RoutePropertiesFormat object itself. */ @@ -71,7 +74,7 @@ public RoutePropertiesFormat withNextHopIpAddress(String nextHopIpAddress) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/RouteTablePropertiesFormat.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/RouteTablePropertiesFormat.java index b75df727cdeac..db27b0568d235 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/RouteTablePropertiesFormat.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/RouteTablePropertiesFormat.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** RouteTablePropertiesFormat - Route Table resource. */ +/** + * RouteTablePropertiesFormat - Route Table resource. + */ @Fluent public final class RouteTablePropertiesFormat { /* @@ -18,13 +20,15 @@ public final class RouteTablePropertiesFormat { @JsonProperty(value = "routes") private List routes; - /** Creates an instance of RouteTablePropertiesFormat class. */ + /** + * Creates an instance of RouteTablePropertiesFormat class. + */ public RouteTablePropertiesFormat() { } /** * Get the routes property: Collection of routes contained within a route table. - * + * * @return the routes value. */ public List routes() { @@ -33,7 +37,7 @@ public List routes() { /** * Set the routes property: Collection of routes contained within a route table. - * + * * @param routes the routes value to set. * @return the RouteTablePropertiesFormat object itself. */ @@ -44,7 +48,7 @@ public RouteTablePropertiesFormat withRoutes(List routes) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java new file mode 100644 index 0000000000000..befd96b665027 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecurityProperties.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.SecurityComplianceStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Security properties of the resource. + */ +@Fluent +public final class SecurityProperties { + /* + * Secured Core Compliance Assignment + */ + @JsonProperty(value = "securedCoreComplianceAssignment") + private ComplianceAssignmentType securedCoreComplianceAssignment; + + /* + * Security Compliance Status + */ + @JsonProperty(value = "securityComplianceStatus", access = JsonProperty.Access.WRITE_ONLY) + private SecurityComplianceStatus securityComplianceStatus; + + /* + * The status of the last operation. + */ + @JsonProperty(value = "provisioningState") + private ProvisioningState provisioningState; + + /** + * Creates an instance of SecurityProperties class. + */ + public SecurityProperties() { + } + + /** + * Get the securedCoreComplianceAssignment property: Secured Core Compliance Assignment. + * + * @return the securedCoreComplianceAssignment value. + */ + public ComplianceAssignmentType securedCoreComplianceAssignment() { + return this.securedCoreComplianceAssignment; + } + + /** + * Set the securedCoreComplianceAssignment property: Secured Core Compliance Assignment. + * + * @param securedCoreComplianceAssignment the securedCoreComplianceAssignment value to set. + * @return the SecurityProperties object itself. + */ + public SecurityProperties + withSecuredCoreComplianceAssignment(ComplianceAssignmentType securedCoreComplianceAssignment) { + this.securedCoreComplianceAssignment = securedCoreComplianceAssignment; + return this; + } + + /** + * Get the securityComplianceStatus property: Security Compliance Status. + * + * @return the securityComplianceStatus value. + */ + public SecurityComplianceStatus securityComplianceStatus() { + return this.securityComplianceStatus; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The status of the last operation. + * + * @param provisioningState the provisioningState value to set. + * @return the SecurityProperties object itself. + */ + public SecurityProperties withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (securityComplianceStatus() != null) { + securityComplianceStatus().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java new file mode 100644 index 0000000000000..64f2ad97aed46 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SecuritySettingInner.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.SecurityComplianceStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Security settings proxy resource. + */ +@Fluent +public final class SecuritySettingInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private SecurityProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SecuritySettingInner class. + */ + public SecuritySettingInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private SecurityProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the securedCoreComplianceAssignment property: Secured Core Compliance Assignment. + * + * @return the securedCoreComplianceAssignment value. + */ + public ComplianceAssignmentType securedCoreComplianceAssignment() { + return this.innerProperties() == null ? null : this.innerProperties().securedCoreComplianceAssignment(); + } + + /** + * Set the securedCoreComplianceAssignment property: Secured Core Compliance Assignment. + * + * @param securedCoreComplianceAssignment the securedCoreComplianceAssignment value to set. + * @return the SecuritySettingInner object itself. + */ + public SecuritySettingInner + withSecuredCoreComplianceAssignment(ComplianceAssignmentType securedCoreComplianceAssignment) { + if (this.innerProperties() == null) { + this.innerProperties = new SecurityProperties(); + } + this.innerProperties().withSecuredCoreComplianceAssignment(securedCoreComplianceAssignment); + return this; + } + + /** + * Get the securityComplianceStatus property: Security Compliance Status. + * + * @return the securityComplianceStatus value. + */ + public SecurityComplianceStatus securityComplianceStatus() { + return this.innerProperties() == null ? null : this.innerProperties().securityComplianceStatus(); + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Set the provisioningState property: The status of the last operation. + * + * @param provisioningState the provisioningState value to set. + * @return the SecuritySettingInner object itself. + */ + public SecuritySettingInner withProvisioningState(ProvisioningState provisioningState) { + if (this.innerProperties() == null) { + this.innerProperties = new SecurityProperties(); + } + this.innerProperties().withProvisioningState(provisioningState); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java new file mode 100644 index 0000000000000..63e046cc2e441 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuInner.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.SkuMappings; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Sku details. + */ +@Fluent +public final class SkuInner extends ProxyResource { + /* + * SKU properties. + */ + @JsonProperty(value = "properties") + private SkuProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SkuInner class. + */ + public SkuInner() { + } + + /** + * Get the innerProperties property: SKU properties. + * + * @return the innerProperties value. + */ + private SkuProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the publisherId property: Identifier of the Publisher for the offer. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.innerProperties() == null ? null : this.innerProperties().publisherId(); + } + + /** + * Set the publisherId property: Identifier of the Publisher for the offer. + * + * @param publisherId the publisherId value to set. + * @return the SkuInner object itself. + */ + public SkuInner withPublisherId(String publisherId) { + if (this.innerProperties() == null) { + this.innerProperties = new SkuProperties(); + } + this.innerProperties().withPublisherId(publisherId); + return this; + } + + /** + * Get the offerId property: Identifier of the Offer for the sku. + * + * @return the offerId value. + */ + public String offerId() { + return this.innerProperties() == null ? null : this.innerProperties().offerId(); + } + + /** + * Set the offerId property: Identifier of the Offer for the sku. + * + * @param offerId the offerId value to set. + * @return the SkuInner object itself. + */ + public SkuInner withOfferId(String offerId) { + if (this.innerProperties() == null) { + this.innerProperties = new SkuProperties(); + } + this.innerProperties().withOfferId(offerId); + return this; + } + + /** + * Get the content property: JSON serialized catalog content of the sku offer. + * + * @return the content value. + */ + public String content() { + return this.innerProperties() == null ? null : this.innerProperties().content(); + } + + /** + * Set the content property: JSON serialized catalog content of the sku offer. + * + * @param content the content value to set. + * @return the SkuInner object itself. + */ + public SkuInner withContent(String content) { + if (this.innerProperties() == null) { + this.innerProperties = new SkuProperties(); + } + this.innerProperties().withContent(content); + return this; + } + + /** + * Get the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @return the contentVersion value. + */ + public String contentVersion() { + return this.innerProperties() == null ? null : this.innerProperties().contentVersion(); + } + + /** + * Set the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @param contentVersion the contentVersion value to set. + * @return the SkuInner object itself. + */ + public SkuInner withContentVersion(String contentVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SkuProperties(); + } + this.innerProperties().withContentVersion(contentVersion); + return this; + } + + /** + * Get the skuMappings property: Array of SKU mappings. + * + * @return the skuMappings value. + */ + public List skuMappings() { + return this.innerProperties() == null ? null : this.innerProperties().skuMappings(); + } + + /** + * Set the skuMappings property: Array of SKU mappings. + * + * @param skuMappings the skuMappings value to set. + * @return the SkuInner object itself. + */ + public SkuInner withSkuMappings(List skuMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new SkuProperties(); + } + this.innerProperties().withSkuMappings(skuMappings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java new file mode 100644 index 0000000000000..b578c8ccc2db4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SkuProperties.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.SkuMappings; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * SKU properties. + */ +@Fluent +public final class SkuProperties { + /* + * Provisioning State + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Identifier of the Publisher for the offer + */ + @JsonProperty(value = "publisherId") + private String publisherId; + + /* + * Identifier of the Offer for the sku + */ + @JsonProperty(value = "offerId") + private String offerId; + + /* + * JSON serialized catalog content of the sku offer + */ + @JsonProperty(value = "content") + private String content; + + /* + * The API version of the catalog service used to serve the catalog content + */ + @JsonProperty(value = "contentVersion") + private String contentVersion; + + /* + * Array of SKU mappings + */ + @JsonProperty(value = "skuMappings") + private List skuMappings; + + /** + * Creates an instance of SkuProperties class. + */ + public SkuProperties() { + } + + /** + * Get the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the publisherId property: Identifier of the Publisher for the offer. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Identifier of the Publisher for the offer. + * + * @param publisherId the publisherId value to set. + * @return the SkuProperties object itself. + */ + public SkuProperties withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * Get the offerId property: Identifier of the Offer for the sku. + * + * @return the offerId value. + */ + public String offerId() { + return this.offerId; + } + + /** + * Set the offerId property: Identifier of the Offer for the sku. + * + * @param offerId the offerId value to set. + * @return the SkuProperties object itself. + */ + public SkuProperties withOfferId(String offerId) { + this.offerId = offerId; + return this; + } + + /** + * Get the content property: JSON serialized catalog content of the sku offer. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Set the content property: JSON serialized catalog content of the sku offer. + * + * @param content the content value to set. + * @return the SkuProperties object itself. + */ + public SkuProperties withContent(String content) { + this.content = content; + return this; + } + + /** + * Get the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @return the contentVersion value. + */ + public String contentVersion() { + return this.contentVersion; + } + + /** + * Set the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @param contentVersion the contentVersion value to set. + * @return the SkuProperties object itself. + */ + public SkuProperties withContentVersion(String contentVersion) { + this.contentVersion = contentVersion; + return this; + } + + /** + * Get the skuMappings property: Array of SKU mappings. + * + * @return the skuMappings value. + */ + public List skuMappings() { + return this.skuMappings; + } + + /** + * Set the skuMappings property: Array of SKU mappings. + * + * @param skuMappings the skuMappings value to set. + * @return the SkuProperties object itself. + */ + public SkuProperties withSkuMappings(List skuMappings) { + this.skuMappings = skuMappings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (skuMappings() != null) { + skuMappings().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java new file mode 100644 index 0000000000000..d5454a86f0866 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/Step.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Progress representation of the update run steps. + */ +@Fluent +public final class Step { + /* + * Name of the step. + */ + @JsonProperty(value = "name") + private String name; + + /* + * More detailed description of the step. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Error message, specified if the step is in a failed state. + */ + @JsonProperty(value = "errorMessage") + private String errorMessage; + + /* + * Status of the step, bubbled up from the ECE action plan for installation attempts. Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + */ + @JsonProperty(value = "status") + private String status; + + /* + * When the step started, or empty if it has not started executing. + */ + @JsonProperty(value = "startTimeUtc") + private OffsetDateTime startTimeUtc; + + /* + * When the step reached a terminal state. + */ + @JsonProperty(value = "endTimeUtc") + private OffsetDateTime endTimeUtc; + + /* + * Completion time of this step or the last completed sub-step. + */ + @JsonProperty(value = "lastUpdatedTimeUtc") + private OffsetDateTime lastUpdatedTimeUtc; + + /* + * Recursive model for child steps of this step. + */ + @JsonProperty(value = "steps") + private List steps; + + /** + * Creates an instance of Step class. + */ + public Step() { + } + + /** + * Get the name property: Name of the step. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the step. + * + * @param name the name value to set. + * @return the Step object itself. + */ + public Step withName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: More detailed description of the step. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: More detailed description of the step. + * + * @param description the description value to set. + * @return the Step object itself. + */ + public Step withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the errorMessage property: Error message, specified if the step is in a failed state. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Set the errorMessage property: Error message, specified if the step is in a failed state. + * + * @param errorMessage the errorMessage value to set. + * @return the Step object itself. + */ + public Step withErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get the status property: Status of the step, bubbled up from the ECE action plan for installation attempts. + * Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Status of the step, bubbled up from the ECE action plan for installation attempts. + * Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * + * @param status the status value to set. + * @return the Step object itself. + */ + public Step withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the startTimeUtc property: When the step started, or empty if it has not started executing. + * + * @return the startTimeUtc value. + */ + public OffsetDateTime startTimeUtc() { + return this.startTimeUtc; + } + + /** + * Set the startTimeUtc property: When the step started, or empty if it has not started executing. + * + * @param startTimeUtc the startTimeUtc value to set. + * @return the Step object itself. + */ + public Step withStartTimeUtc(OffsetDateTime startTimeUtc) { + this.startTimeUtc = startTimeUtc; + return this; + } + + /** + * Get the endTimeUtc property: When the step reached a terminal state. + * + * @return the endTimeUtc value. + */ + public OffsetDateTime endTimeUtc() { + return this.endTimeUtc; + } + + /** + * Set the endTimeUtc property: When the step reached a terminal state. + * + * @param endTimeUtc the endTimeUtc value to set. + * @return the Step object itself. + */ + public Step withEndTimeUtc(OffsetDateTime endTimeUtc) { + this.endTimeUtc = endTimeUtc; + return this; + } + + /** + * Get the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step. + * + * @return the lastUpdatedTimeUtc value. + */ + public OffsetDateTime lastUpdatedTimeUtc() { + return this.lastUpdatedTimeUtc; + } + + /** + * Set the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step. + * + * @param lastUpdatedTimeUtc the lastUpdatedTimeUtc value to set. + * @return the Step object itself. + */ + public Step withLastUpdatedTimeUtc(OffsetDateTime lastUpdatedTimeUtc) { + this.lastUpdatedTimeUtc = lastUpdatedTimeUtc; + return this; + } + + /** + * Get the steps property: Recursive model for child steps of this step. + * + * @return the steps value. + */ + public List steps() { + return this.steps; + } + + /** + * Set the steps property: Recursive model for child steps of this step. + * + * @param steps the steps value to set. + * @return the Step object itself. + */ + public Step withSteps(List steps) { + this.steps = steps; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (steps() != null) { + steps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/StorageContainerProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/StorageContainerProperties.java index 2709e211ea702..74f96dd28b087 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/StorageContainerProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/StorageContainerProperties.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.azurestackhci.models.StorageContainerStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties under the storage container resource. */ +/** + * Properties under the storage container resource. + */ @Fluent public final class StorageContainerProperties { /* @@ -31,13 +33,15 @@ public final class StorageContainerProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private StorageContainerStatus status; - /** Creates an instance of StorageContainerProperties class. */ + /** + * Creates an instance of StorageContainerProperties class. + */ public StorageContainerProperties() { } /** * Get the path property: Path of the storage container on the disk. - * + * * @return the path value. */ public String path() { @@ -46,7 +50,7 @@ public String path() { /** * Set the path property: Path of the storage container on the disk. - * + * * @param path the path value to set. * @return the StorageContainerProperties object itself. */ @@ -57,7 +61,7 @@ public StorageContainerProperties withPath(String path) { /** * Get the provisioningState property: Provisioning state of the storage container. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -66,7 +70,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the status property: The observed state of storage containers. - * + * * @return the status value. */ public StorageContainerStatus status() { @@ -75,13 +79,13 @@ public StorageContainerStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (path() == null) { - throw LOGGER - .logExceptionAsError( + throw LOGGER.atError() + .log( new IllegalArgumentException("Missing required property path in model StorageContainerProperties")); } if (status() != null) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/StorageContainersInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/StorageContainersInner.java index 046491d1e9927..8154e3d3e149c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/StorageContainersInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/StorageContainersInner.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The storage container resource definition. */ +/** + * The storage container resource definition. + */ @Fluent public final class StorageContainersInner extends Resource { /* @@ -34,13 +36,15 @@ public final class StorageContainersInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of StorageContainersInner class. */ + /** + * Creates an instance of StorageContainersInner class. + */ public StorageContainersInner() { } /** * Get the innerProperties property: Properties under the storage container resource. - * + * * @return the innerProperties value. */ private StorageContainerProperties innerProperties() { @@ -49,7 +53,7 @@ private StorageContainerProperties innerProperties() { /** * Get the extendedLocation property: The extendedLocation of the resource. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -58,7 +62,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The extendedLocation of the resource. - * + * * @param extendedLocation the extendedLocation value to set. * @return the StorageContainersInner object itself. */ @@ -69,21 +73,25 @@ public StorageContainersInner withExtendedLocation(ExtendedLocation extendedLoca /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public StorageContainersInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public StorageContainersInner withTags(Map tags) { super.withTags(tags); @@ -92,7 +100,7 @@ public StorageContainersInner withTags(Map tags) { /** * Get the path property: Path of the storage container on the disk. - * + * * @return the path value. */ public String path() { @@ -101,7 +109,7 @@ public String path() { /** * Set the path property: Path of the storage container on the disk. - * + * * @param path the path value to set. * @return the StorageContainersInner object itself. */ @@ -115,7 +123,7 @@ public StorageContainersInner withPath(String path) { /** * Get the provisioningState property: Provisioning state of the storage container. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -124,7 +132,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the status property: The observed state of storage containers. - * + * * @return the status value. */ public StorageContainerStatus status() { @@ -133,7 +141,7 @@ public StorageContainerStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SubnetPropertiesFormat.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SubnetPropertiesFormat.java index 24e133b286c68..51170a38b090d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SubnetPropertiesFormat.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/SubnetPropertiesFormat.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of the subnet. */ +/** + * Properties of the subnet. + */ @Fluent public final class SubnetPropertiesFormat { /* @@ -57,13 +59,15 @@ public final class SubnetPropertiesFormat { @JsonProperty(value = "vlan") private Integer vlan; - /** Creates an instance of SubnetPropertiesFormat class. */ + /** + * Creates an instance of SubnetPropertiesFormat class. + */ public SubnetPropertiesFormat() { } /** * Get the addressPrefix property: The address prefix for the subnet: Cidr for this subnet - IPv4, IPv6. - * + * * @return the addressPrefix value. */ public String addressPrefix() { @@ -72,7 +76,7 @@ public String addressPrefix() { /** * Set the addressPrefix property: The address prefix for the subnet: Cidr for this subnet - IPv4, IPv6. - * + * * @param addressPrefix the addressPrefix value to set. * @return the SubnetPropertiesFormat object itself. */ @@ -83,7 +87,7 @@ public SubnetPropertiesFormat withAddressPrefix(String addressPrefix) { /** * Get the addressPrefixes property: List of address prefixes for the subnet. - * + * * @return the addressPrefixes value. */ public List addressPrefixes() { @@ -92,7 +96,7 @@ public List addressPrefixes() { /** * Set the addressPrefixes property: List of address prefixes for the subnet. - * + * * @param addressPrefixes the addressPrefixes value to set. * @return the SubnetPropertiesFormat object itself. */ @@ -104,7 +108,7 @@ public SubnetPropertiesFormat withAddressPrefixes(List addressPrefixes) /** * Get the ipAllocationMethod property: IPAllocationMethod - The IP address allocation method. Possible values * include: 'Static', 'Dynamic'. - * + * * @return the ipAllocationMethod value. */ public IpAllocationMethodEnum ipAllocationMethod() { @@ -114,7 +118,7 @@ public IpAllocationMethodEnum ipAllocationMethod() { /** * Set the ipAllocationMethod property: IPAllocationMethod - The IP address allocation method. Possible values * include: 'Static', 'Dynamic'. - * + * * @param ipAllocationMethod the ipAllocationMethod value to set. * @return the SubnetPropertiesFormat object itself. */ @@ -125,7 +129,7 @@ public SubnetPropertiesFormat withIpAllocationMethod(IpAllocationMethodEnum ipAl /** * Get the ipConfigurationReferences property: IPConfigurationReferences - list of IPConfigurationReferences. - * + * * @return the ipConfigurationReferences value. */ public List ipConfigurationReferences() { @@ -134,7 +138,7 @@ public List ipConfiguration /** * Set the ipConfigurationReferences property: IPConfigurationReferences - list of IPConfigurationReferences. - * + * * @param ipConfigurationReferences the ipConfigurationReferences value to set. * @return the SubnetPropertiesFormat object itself. */ @@ -146,7 +150,7 @@ public SubnetPropertiesFormat withIpConfigurationReferences( /** * Get the routeTable property: Route table resource. - * + * * @return the routeTable value. */ public RouteTable routeTable() { @@ -155,7 +159,7 @@ public RouteTable routeTable() { /** * Set the routeTable property: Route table resource. - * + * * @param routeTable the routeTable value to set. * @return the SubnetPropertiesFormat object itself. */ @@ -166,7 +170,7 @@ public SubnetPropertiesFormat withRouteTable(RouteTable routeTable) { /** * Get the ipPools property: network associated pool of IP Addresses. - * + * * @return the ipPools value. */ public List ipPools() { @@ -175,7 +179,7 @@ public List ipPools() { /** * Set the ipPools property: network associated pool of IP Addresses. - * + * * @param ipPools the ipPools value to set. * @return the SubnetPropertiesFormat object itself. */ @@ -186,7 +190,7 @@ public SubnetPropertiesFormat withIpPools(List ipPools) { /** * Get the vlan property: Vlan to use for the subnet. - * + * * @return the vlan value. */ public Integer vlan() { @@ -195,7 +199,7 @@ public Integer vlan() { /** * Set the vlan property: Vlan to use for the subnet. - * + * * @param vlan the vlan value to set. * @return the SubnetPropertiesFormat object itself. */ @@ -206,7 +210,7 @@ public SubnetPropertiesFormat withVlan(Integer vlan) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java new file mode 100644 index 0000000000000..2d969baa25e89 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateProperties.java @@ -0,0 +1,611 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.AvailabilityType; +import com.azure.resourcemanager.azurestackhci.models.HealthState; +import com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo; +import com.azure.resourcemanager.azurestackhci.models.PrecheckResult; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.RebootRequirement; +import com.azure.resourcemanager.azurestackhci.models.State; +import com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Details of a singular Update in HCI Cluster. + */ +@Fluent +public final class UpdateProperties { + /* + * Provisioning state of the Updates proxy resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Date that the update was installed. + */ + @JsonProperty(value = "installedDate") + private OffsetDateTime installedDate; + + /* + * Description of the update. + */ + @JsonProperty(value = "description") + private String description; + + /* + * State of the update as it relates to this stamp. + */ + @JsonProperty(value = "state") + private State state; + + /* + * If update State is HasPrerequisite, this property contains an array of objects describing prerequisite updates before installing this update. Otherwise, it is empty. + */ + @JsonProperty(value = "prerequisites") + private List prerequisites; + + /* + * An array of component versions for a Solution Bundle update, and an empty array otherwise. + */ + @JsonProperty(value = "componentVersions") + private List componentVersions; + + /* + * The rebootRequired property. + */ + @JsonProperty(value = "rebootRequired") + private RebootRequirement rebootRequired; + + /* + * Overall health state for update-specific health checks. + */ + @JsonProperty(value = "healthState") + private HealthState healthState; + + /* + * An array of PrecheckResult objects. + */ + @JsonProperty(value = "healthCheckResult") + private List healthCheckResult; + + /* + * Last time the package-specific checks were run. + */ + @JsonProperty(value = "healthCheckDate") + private OffsetDateTime healthCheckDate; + + /* + * Path where the update package is available. + */ + @JsonProperty(value = "packagePath") + private String packagePath; + + /* + * Size of the package. This value is a combination of the size from update metadata and size of the payload that results from the live scan operation for OS update content. + */ + @JsonProperty(value = "packageSizeInMb") + private Float packageSizeInMb; + + /* + * Display name of the Update + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Version of the update. + */ + @JsonProperty(value = "version") + private String version; + + /* + * Publisher of the update package. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /* + * Link to release notes for the update. + */ + @JsonProperty(value = "releaseLink") + private String releaseLink; + + /* + * Indicates the way the update content can be downloaded. + */ + @JsonProperty(value = "availabilityType") + private AvailabilityType availabilityType; + + /* + * Customer-visible type of the update. + */ + @JsonProperty(value = "packageType") + private String packageType; + + /* + * Extensible KV pairs serialized as a string. This is currently used to report the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp based on OEM type. + */ + @JsonProperty(value = "additionalProperties") + private String additionalProperties; + + /* + * Additional information regarding the state of the update. See definition of UpdateStateProperties type below for more details on this property. + */ + @JsonProperty(value = "updateStateProperties") + private UpdateStateProperties innerUpdateStateProperties; + + /** + * Creates an instance of UpdateProperties class. + */ + public UpdateProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the Updates proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the installedDate property: Date that the update was installed. + * + * @return the installedDate value. + */ + public OffsetDateTime installedDate() { + return this.installedDate; + } + + /** + * Set the installedDate property: Date that the update was installed. + * + * @param installedDate the installedDate value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withInstalledDate(OffsetDateTime installedDate) { + this.installedDate = installedDate; + return this; + } + + /** + * Get the description property: Description of the update. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the update. + * + * @param description the description value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the state property: State of the update as it relates to this stamp. + * + * @return the state value. + */ + public State state() { + return this.state; + } + + /** + * Set the state property: State of the update as it relates to this stamp. + * + * @param state the state value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withState(State state) { + this.state = state; + return this; + } + + /** + * Get the prerequisites property: If update State is HasPrerequisite, this property contains an array of objects + * describing prerequisite updates before installing this update. Otherwise, it is empty. + * + * @return the prerequisites value. + */ + public List prerequisites() { + return this.prerequisites; + } + + /** + * Set the prerequisites property: If update State is HasPrerequisite, this property contains an array of objects + * describing prerequisite updates before installing this update. Otherwise, it is empty. + * + * @param prerequisites the prerequisites value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withPrerequisites(List prerequisites) { + this.prerequisites = prerequisites; + return this; + } + + /** + * Get the componentVersions property: An array of component versions for a Solution Bundle update, and an empty + * array otherwise. + * + * @return the componentVersions value. + */ + public List componentVersions() { + return this.componentVersions; + } + + /** + * Set the componentVersions property: An array of component versions for a Solution Bundle update, and an empty + * array otherwise. + * + * @param componentVersions the componentVersions value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withComponentVersions(List componentVersions) { + this.componentVersions = componentVersions; + return this; + } + + /** + * Get the rebootRequired property: The rebootRequired property. + * + * @return the rebootRequired value. + */ + public RebootRequirement rebootRequired() { + return this.rebootRequired; + } + + /** + * Set the rebootRequired property: The rebootRequired property. + * + * @param rebootRequired the rebootRequired value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withRebootRequired(RebootRequirement rebootRequired) { + this.rebootRequired = rebootRequired; + return this; + } + + /** + * Get the healthState property: Overall health state for update-specific health checks. + * + * @return the healthState value. + */ + public HealthState healthState() { + return this.healthState; + } + + /** + * Set the healthState property: Overall health state for update-specific health checks. + * + * @param healthState the healthState value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withHealthState(HealthState healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get the healthCheckResult property: An array of PrecheckResult objects. + * + * @return the healthCheckResult value. + */ + public List healthCheckResult() { + return this.healthCheckResult; + } + + /** + * Set the healthCheckResult property: An array of PrecheckResult objects. + * + * @param healthCheckResult the healthCheckResult value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withHealthCheckResult(List healthCheckResult) { + this.healthCheckResult = healthCheckResult; + return this; + } + + /** + * Get the healthCheckDate property: Last time the package-specific checks were run. + * + * @return the healthCheckDate value. + */ + public OffsetDateTime healthCheckDate() { + return this.healthCheckDate; + } + + /** + * Set the healthCheckDate property: Last time the package-specific checks were run. + * + * @param healthCheckDate the healthCheckDate value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withHealthCheckDate(OffsetDateTime healthCheckDate) { + this.healthCheckDate = healthCheckDate; + return this; + } + + /** + * Get the packagePath property: Path where the update package is available. + * + * @return the packagePath value. + */ + public String packagePath() { + return this.packagePath; + } + + /** + * Set the packagePath property: Path where the update package is available. + * + * @param packagePath the packagePath value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withPackagePath(String packagePath) { + this.packagePath = packagePath; + return this; + } + + /** + * Get the packageSizeInMb property: Size of the package. This value is a combination of the size from update + * metadata and size of the payload that results from the live scan operation for OS update content. + * + * @return the packageSizeInMb value. + */ + public Float packageSizeInMb() { + return this.packageSizeInMb; + } + + /** + * Set the packageSizeInMb property: Size of the package. This value is a combination of the size from update + * metadata and size of the payload that results from the live scan operation for OS update content. + * + * @param packageSizeInMb the packageSizeInMb value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withPackageSizeInMb(Float packageSizeInMb) { + this.packageSizeInMb = packageSizeInMb; + return this; + } + + /** + * Get the displayName property: Display name of the Update. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the Update. + * + * @param displayName the displayName value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the version property: Version of the update. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the update. + * + * @param version the version value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the publisher property: Publisher of the update package. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: Publisher of the update package. + * + * @param publisher the publisher value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the releaseLink property: Link to release notes for the update. + * + * @return the releaseLink value. + */ + public String releaseLink() { + return this.releaseLink; + } + + /** + * Set the releaseLink property: Link to release notes for the update. + * + * @param releaseLink the releaseLink value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withReleaseLink(String releaseLink) { + this.releaseLink = releaseLink; + return this; + } + + /** + * Get the availabilityType property: Indicates the way the update content can be downloaded. + * + * @return the availabilityType value. + */ + public AvailabilityType availabilityType() { + return this.availabilityType; + } + + /** + * Set the availabilityType property: Indicates the way the update content can be downloaded. + * + * @param availabilityType the availabilityType value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withAvailabilityType(AvailabilityType availabilityType) { + this.availabilityType = availabilityType; + return this; + } + + /** + * Get the packageType property: Customer-visible type of the update. + * + * @return the packageType value. + */ + public String packageType() { + return this.packageType; + } + + /** + * Set the packageType property: Customer-visible type of the update. + * + * @param packageType the packageType value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withPackageType(String packageType) { + this.packageType = packageType; + return this; + } + + /** + * Get the additionalProperties property: Extensible KV pairs serialized as a string. This is currently used to + * report the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp + * based on OEM type. + * + * @return the additionalProperties value. + */ + public String additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Extensible KV pairs serialized as a string. This is currently used to + * report the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp + * based on OEM type. + * + * @param additionalProperties the additionalProperties value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withAdditionalProperties(String additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * Get the innerUpdateStateProperties property: Additional information regarding the state of the update. See + * definition of UpdateStateProperties type below for more details on this property. + * + * @return the innerUpdateStateProperties value. + */ + private UpdateStateProperties innerUpdateStateProperties() { + return this.innerUpdateStateProperties; + } + + /** + * Get the progressPercentage property: Progress percentage of ongoing operation. Currently this property is only + * valid when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * + * @return the progressPercentage value. + */ + public Float progressPercentage() { + return this.innerUpdateStateProperties() == null + ? null + : this.innerUpdateStateProperties().progressPercentage(); + } + + /** + * Set the progressPercentage property: Progress percentage of ongoing operation. Currently this property is only + * valid when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * + * @param progressPercentage the progressPercentage value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withProgressPercentage(Float progressPercentage) { + if (this.innerUpdateStateProperties() == null) { + this.innerUpdateStateProperties = new UpdateStateProperties(); + } + this.innerUpdateStateProperties().withProgressPercentage(progressPercentage); + return this; + } + + /** + * Get the notifyMessage property: Brief message with instructions for updates of AvailabilityType Notify. + * + * @return the notifyMessage value. + */ + public String notifyMessage() { + return this.innerUpdateStateProperties() == null ? null : this.innerUpdateStateProperties().notifyMessage(); + } + + /** + * Set the notifyMessage property: Brief message with instructions for updates of AvailabilityType Notify. + * + * @param notifyMessage the notifyMessage value to set. + * @return the UpdateProperties object itself. + */ + public UpdateProperties withNotifyMessage(String notifyMessage) { + if (this.innerUpdateStateProperties() == null) { + this.innerUpdateStateProperties = new UpdateStateProperties(); + } + this.innerUpdateStateProperties().withNotifyMessage(notifyMessage); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (prerequisites() != null) { + prerequisites().forEach(e -> e.validate()); + } + if (componentVersions() != null) { + componentVersions().forEach(e -> e.validate()); + } + if (healthCheckResult() != null) { + healthCheckResult().forEach(e -> e.validate()); + } + if (innerUpdateStateProperties() != null) { + innerUpdateStateProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java new file mode 100644 index 0000000000000..1513a778f5050 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunInner.java @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Details of an Update run. + */ +@Fluent +public final class UpdateRunInner extends ProxyResource { + /* + * The geo-location where the resource lives + */ + @JsonProperty(value = "location") + private String location; + + /* + * Describes Update Run Properties. + */ + @JsonProperty(value = "properties") + private UpdateRunProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of UpdateRunInner class. + */ + public UpdateRunInner() { + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the innerProperties property: Describes Update Run Properties. + * + * @return the innerProperties value. + */ + private UpdateRunProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning state of the UpdateRuns proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the timeStarted property: Timestamp of the update run was started. + * + * @return the timeStarted value. + */ + public OffsetDateTime timeStarted() { + return this.innerProperties() == null ? null : this.innerProperties().timeStarted(); + } + + /** + * Set the timeStarted property: Timestamp of the update run was started. + * + * @param timeStarted the timeStarted value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withTimeStarted(OffsetDateTime timeStarted) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withTimeStarted(timeStarted); + return this; + } + + /** + * Get the lastUpdatedTime property: Timestamp of the most recently completed step in the update run. + * + * @return the lastUpdatedTime value. + */ + public OffsetDateTime lastUpdatedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedTime(); + } + + /** + * Set the lastUpdatedTime property: Timestamp of the most recently completed step in the update run. + * + * @param lastUpdatedTime the lastUpdatedTime value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withLastUpdatedTime(OffsetDateTime lastUpdatedTime) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withLastUpdatedTime(lastUpdatedTime); + return this; + } + + /** + * Get the duration property: Duration of the update run. + * + * @return the duration value. + */ + public String duration() { + return this.innerProperties() == null ? null : this.innerProperties().duration(); + } + + /** + * Set the duration property: Duration of the update run. + * + * @param duration the duration value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withDuration(String duration) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withDuration(duration); + return this; + } + + /** + * Get the state property: State of the update run. + * + * @return the state value. + */ + public UpdateRunPropertiesState state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Set the state property: State of the update run. + * + * @param state the state value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withState(UpdateRunPropertiesState state) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withState(state); + return this; + } + + /** + * Get the name property: Name of the step. + * + * @return the name value. + */ + public String namePropertiesName() { + return this.innerProperties() == null ? null : this.innerProperties().name(); + } + + /** + * Set the name property: Name of the step. + * + * @param name the name value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withNamePropertiesName(String name) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withName(name); + return this; + } + + /** + * Get the description property: More detailed description of the step. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: More detailed description of the step. + * + * @param description the description value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the errorMessage property: Error message, specified if the step is in a failed state. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.innerProperties() == null ? null : this.innerProperties().errorMessage(); + } + + /** + * Set the errorMessage property: Error message, specified if the step is in a failed state. + * + * @param errorMessage the errorMessage value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withErrorMessage(String errorMessage) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withErrorMessage(errorMessage); + return this; + } + + /** + * Get the status property: Status of the step, bubbled up from the ECE action plan for installation attempts. + * Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * + * @return the status value. + */ + public String status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: Status of the step, bubbled up from the ECE action plan for installation attempts. + * Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * + * @param status the status value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withStatus(String status) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the startTimeUtc property: When the step started, or empty if it has not started executing. + * + * @return the startTimeUtc value. + */ + public OffsetDateTime startTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().startTimeUtc(); + } + + /** + * Set the startTimeUtc property: When the step started, or empty if it has not started executing. + * + * @param startTimeUtc the startTimeUtc value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withStartTimeUtc(OffsetDateTime startTimeUtc) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withStartTimeUtc(startTimeUtc); + return this; + } + + /** + * Get the endTimeUtc property: When the step reached a terminal state. + * + * @return the endTimeUtc value. + */ + public OffsetDateTime endTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().endTimeUtc(); + } + + /** + * Set the endTimeUtc property: When the step reached a terminal state. + * + * @param endTimeUtc the endTimeUtc value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withEndTimeUtc(OffsetDateTime endTimeUtc) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withEndTimeUtc(endTimeUtc); + return this; + } + + /** + * Get the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step. + * + * @return the lastUpdatedTimeUtc value. + */ + public OffsetDateTime lastUpdatedTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedTimeUtc(); + } + + /** + * Set the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step. + * + * @param lastUpdatedTimeUtc the lastUpdatedTimeUtc value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withLastUpdatedTimeUtc(OffsetDateTime lastUpdatedTimeUtc) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withLastUpdatedTimeUtc(lastUpdatedTimeUtc); + return this; + } + + /** + * Get the steps property: Recursive model for child steps of this step. + * + * @return the steps value. + */ + public List steps() { + return this.innerProperties() == null ? null : this.innerProperties().steps(); + } + + /** + * Set the steps property: Recursive model for child steps of this step. + * + * @param steps the steps value to set. + * @return the UpdateRunInner object itself. + */ + public UpdateRunInner withSteps(List steps) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateRunProperties(); + } + this.innerProperties().withSteps(steps); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java new file mode 100644 index 0000000000000..538f08e58b491 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateRunProperties.java @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Details of an Update run. + */ +@Fluent +public final class UpdateRunProperties { + /* + * Provisioning state of the UpdateRuns proxy resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Timestamp of the update run was started. + */ + @JsonProperty(value = "timeStarted") + private OffsetDateTime timeStarted; + + /* + * Timestamp of the most recently completed step in the update run. + */ + @JsonProperty(value = "lastUpdatedTime") + private OffsetDateTime lastUpdatedTime; + + /* + * Duration of the update run. + */ + @JsonProperty(value = "duration") + private String duration; + + /* + * State of the update run. + */ + @JsonProperty(value = "state") + private UpdateRunPropertiesState state; + + /* + * Progress representation of the update run steps. + */ + @JsonProperty(value = "progress") + private Step innerProgress; + + /** + * Creates an instance of UpdateRunProperties class. + */ + public UpdateRunProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the UpdateRuns proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the timeStarted property: Timestamp of the update run was started. + * + * @return the timeStarted value. + */ + public OffsetDateTime timeStarted() { + return this.timeStarted; + } + + /** + * Set the timeStarted property: Timestamp of the update run was started. + * + * @param timeStarted the timeStarted value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withTimeStarted(OffsetDateTime timeStarted) { + this.timeStarted = timeStarted; + return this; + } + + /** + * Get the lastUpdatedTime property: Timestamp of the most recently completed step in the update run. + * + * @return the lastUpdatedTime value. + */ + public OffsetDateTime lastUpdatedTime() { + return this.lastUpdatedTime; + } + + /** + * Set the lastUpdatedTime property: Timestamp of the most recently completed step in the update run. + * + * @param lastUpdatedTime the lastUpdatedTime value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withLastUpdatedTime(OffsetDateTime lastUpdatedTime) { + this.lastUpdatedTime = lastUpdatedTime; + return this; + } + + /** + * Get the duration property: Duration of the update run. + * + * @return the duration value. + */ + public String duration() { + return this.duration; + } + + /** + * Set the duration property: Duration of the update run. + * + * @param duration the duration value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withDuration(String duration) { + this.duration = duration; + return this; + } + + /** + * Get the state property: State of the update run. + * + * @return the state value. + */ + public UpdateRunPropertiesState state() { + return this.state; + } + + /** + * Set the state property: State of the update run. + * + * @param state the state value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withState(UpdateRunPropertiesState state) { + this.state = state; + return this; + } + + /** + * Get the innerProgress property: Progress representation of the update run steps. + * + * @return the innerProgress value. + */ + private Step innerProgress() { + return this.innerProgress; + } + + /** + * Get the name property: Name of the step. + * + * @return the name value. + */ + public String name() { + return this.innerProgress() == null ? null : this.innerProgress().name(); + } + + /** + * Set the name property: Name of the step. + * + * @param name the name value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withName(String name) { + if (this.innerProgress() == null) { + this.innerProgress = new Step(); + } + this.innerProgress().withName(name); + return this; + } + + /** + * Get the description property: More detailed description of the step. + * + * @return the description value. + */ + public String description() { + return this.innerProgress() == null ? null : this.innerProgress().description(); + } + + /** + * Set the description property: More detailed description of the step. + * + * @param description the description value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withDescription(String description) { + if (this.innerProgress() == null) { + this.innerProgress = new Step(); + } + this.innerProgress().withDescription(description); + return this; + } + + /** + * Get the errorMessage property: Error message, specified if the step is in a failed state. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.innerProgress() == null ? null : this.innerProgress().errorMessage(); + } + + /** + * Set the errorMessage property: Error message, specified if the step is in a failed state. + * + * @param errorMessage the errorMessage value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withErrorMessage(String errorMessage) { + if (this.innerProgress() == null) { + this.innerProgress = new Step(); + } + this.innerProgress().withErrorMessage(errorMessage); + return this; + } + + /** + * Get the status property: Status of the step, bubbled up from the ECE action plan for installation attempts. + * Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * + * @return the status value. + */ + public String status() { + return this.innerProgress() == null ? null : this.innerProgress().status(); + } + + /** + * Set the status property: Status of the step, bubbled up from the ECE action plan for installation attempts. + * Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * + * @param status the status value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withStatus(String status) { + if (this.innerProgress() == null) { + this.innerProgress = new Step(); + } + this.innerProgress().withStatus(status); + return this; + } + + /** + * Get the startTimeUtc property: When the step started, or empty if it has not started executing. + * + * @return the startTimeUtc value. + */ + public OffsetDateTime startTimeUtc() { + return this.innerProgress() == null ? null : this.innerProgress().startTimeUtc(); + } + + /** + * Set the startTimeUtc property: When the step started, or empty if it has not started executing. + * + * @param startTimeUtc the startTimeUtc value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withStartTimeUtc(OffsetDateTime startTimeUtc) { + if (this.innerProgress() == null) { + this.innerProgress = new Step(); + } + this.innerProgress().withStartTimeUtc(startTimeUtc); + return this; + } + + /** + * Get the endTimeUtc property: When the step reached a terminal state. + * + * @return the endTimeUtc value. + */ + public OffsetDateTime endTimeUtc() { + return this.innerProgress() == null ? null : this.innerProgress().endTimeUtc(); + } + + /** + * Set the endTimeUtc property: When the step reached a terminal state. + * + * @param endTimeUtc the endTimeUtc value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withEndTimeUtc(OffsetDateTime endTimeUtc) { + if (this.innerProgress() == null) { + this.innerProgress = new Step(); + } + this.innerProgress().withEndTimeUtc(endTimeUtc); + return this; + } + + /** + * Get the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step. + * + * @return the lastUpdatedTimeUtc value. + */ + public OffsetDateTime lastUpdatedTimeUtc() { + return this.innerProgress() == null ? null : this.innerProgress().lastUpdatedTimeUtc(); + } + + /** + * Set the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step. + * + * @param lastUpdatedTimeUtc the lastUpdatedTimeUtc value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withLastUpdatedTimeUtc(OffsetDateTime lastUpdatedTimeUtc) { + if (this.innerProgress() == null) { + this.innerProgress = new Step(); + } + this.innerProgress().withLastUpdatedTimeUtc(lastUpdatedTimeUtc); + return this; + } + + /** + * Get the steps property: Recursive model for child steps of this step. + * + * @return the steps value. + */ + public List steps() { + return this.innerProgress() == null ? null : this.innerProgress().steps(); + } + + /** + * Set the steps property: Recursive model for child steps of this step. + * + * @param steps the steps value to set. + * @return the UpdateRunProperties object itself. + */ + public UpdateRunProperties withSteps(List steps) { + if (this.innerProgress() == null) { + this.innerProgress = new Step(); + } + this.innerProgress().withSteps(steps); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProgress() != null) { + innerProgress().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java new file mode 100644 index 0000000000000..1f89cfb4e7e13 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateStateProperties.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Additional information regarding the state of the update. See definition of UpdateStateProperties type below for more + * details on this property. + */ +@Fluent +public final class UpdateStateProperties { + /* + * Progress percentage of ongoing operation. Currently this property is only valid when the update is in the Downloading state, where it maps to how much of the update content has been downloaded. + */ + @JsonProperty(value = "progressPercentage") + private Float progressPercentage; + + /* + * Brief message with instructions for updates of AvailabilityType Notify. + */ + @JsonProperty(value = "notifyMessage") + private String notifyMessage; + + /** + * Creates an instance of UpdateStateProperties class. + */ + public UpdateStateProperties() { + } + + /** + * Get the progressPercentage property: Progress percentage of ongoing operation. Currently this property is only + * valid when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * + * @return the progressPercentage value. + */ + public Float progressPercentage() { + return this.progressPercentage; + } + + /** + * Set the progressPercentage property: Progress percentage of ongoing operation. Currently this property is only + * valid when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * + * @param progressPercentage the progressPercentage value to set. + * @return the UpdateStateProperties object itself. + */ + public UpdateStateProperties withProgressPercentage(Float progressPercentage) { + this.progressPercentage = progressPercentage; + return this; + } + + /** + * Get the notifyMessage property: Brief message with instructions for updates of AvailabilityType Notify. + * + * @return the notifyMessage value. + */ + public String notifyMessage() { + return this.notifyMessage; + } + + /** + * Set the notifyMessage property: Brief message with instructions for updates of AvailabilityType Notify. + * + * @param notifyMessage the notifyMessage value to set. + * @return the UpdateStateProperties object itself. + */ + public UpdateStateProperties withNotifyMessage(String notifyMessage) { + this.notifyMessage = notifyMessage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesInner.java new file mode 100644 index 0000000000000..4a87308a94274 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesInner.java @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.models.HealthState; +import com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo; +import com.azure.resourcemanager.azurestackhci.models.PrecheckResult; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Get the update summaries for the cluster. + */ +@Fluent +public final class UpdateSummariesInner extends ProxyResource { + /* + * The geo-location where the resource lives + */ + @JsonProperty(value = "location") + private String location; + + /* + * Update summaries properties + */ + @JsonProperty(value = "properties") + private UpdateSummariesProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of UpdateSummariesInner class. + */ + public UpdateSummariesInner() { + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the innerProperties property: Update summaries properties. + * + * @return the innerProperties value. + */ + private UpdateSummariesProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning state of the UpdateSummaries proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the oemFamily property: OEM family name. + * + * @return the oemFamily value. + */ + public String oemFamily() { + return this.innerProperties() == null ? null : this.innerProperties().oemFamily(); + } + + /** + * Set the oemFamily property: OEM family name. + * + * @param oemFamily the oemFamily value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withOemFamily(String oemFamily) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withOemFamily(oemFamily); + return this; + } + + /** + * Get the hardwareModel property: Name of the hardware model. + * + * @return the hardwareModel value. + */ + public String hardwareModel() { + return this.innerProperties() == null ? null : this.innerProperties().hardwareModel(); + } + + /** + * Set the hardwareModel property: Name of the hardware model. + * + * @param hardwareModel the hardwareModel value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withHardwareModel(String hardwareModel) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withHardwareModel(hardwareModel); + return this; + } + + /** + * Get the packageVersions property: Current version of each updatable component. + * + * @return the packageVersions value. + */ + public List packageVersions() { + return this.innerProperties() == null ? null : this.innerProperties().packageVersions(); + } + + /** + * Set the packageVersions property: Current version of each updatable component. + * + * @param packageVersions the packageVersions value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withPackageVersions(List packageVersions) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withPackageVersions(packageVersions); + return this; + } + + /** + * Get the currentVersion property: Current Solution Bundle version of the stamp. + * + * @return the currentVersion value. + */ + public String currentVersion() { + return this.innerProperties() == null ? null : this.innerProperties().currentVersion(); + } + + /** + * Set the currentVersion property: Current Solution Bundle version of the stamp. + * + * @param currentVersion the currentVersion value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withCurrentVersion(String currentVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withCurrentVersion(currentVersion); + return this; + } + + /** + * Get the lastUpdated property: Last time an update installation completed successfully. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdated(); + } + + /** + * Set the lastUpdated property: Last time an update installation completed successfully. + * + * @param lastUpdated the lastUpdated value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withLastUpdated(OffsetDateTime lastUpdated) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withLastUpdated(lastUpdated); + return this; + } + + /** + * Get the lastChecked property: Last time the update service successfully checked for updates. + * + * @return the lastChecked value. + */ + public OffsetDateTime lastChecked() { + return this.innerProperties() == null ? null : this.innerProperties().lastChecked(); + } + + /** + * Set the lastChecked property: Last time the update service successfully checked for updates. + * + * @param lastChecked the lastChecked value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withLastChecked(OffsetDateTime lastChecked) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withLastChecked(lastChecked); + return this; + } + + /** + * Get the healthState property: Overall health state for update-specific health checks. + * + * @return the healthState value. + */ + public HealthState healthState() { + return this.innerProperties() == null ? null : this.innerProperties().healthState(); + } + + /** + * Set the healthState property: Overall health state for update-specific health checks. + * + * @param healthState the healthState value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withHealthState(HealthState healthState) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withHealthState(healthState); + return this; + } + + /** + * Get the healthCheckResult property: An array of pre-check result objects. + * + * @return the healthCheckResult value. + */ + public List healthCheckResult() { + return this.innerProperties() == null ? null : this.innerProperties().healthCheckResult(); + } + + /** + * Set the healthCheckResult property: An array of pre-check result objects. + * + * @param healthCheckResult the healthCheckResult value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withHealthCheckResult(List healthCheckResult) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withHealthCheckResult(healthCheckResult); + return this; + } + + /** + * Get the healthCheckDate property: Last time the package-specific checks were run. + * + * @return the healthCheckDate value. + */ + public OffsetDateTime healthCheckDate() { + return this.innerProperties() == null ? null : this.innerProperties().healthCheckDate(); + } + + /** + * Set the healthCheckDate property: Last time the package-specific checks were run. + * + * @param healthCheckDate the healthCheckDate value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withHealthCheckDate(OffsetDateTime healthCheckDate) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withHealthCheckDate(healthCheckDate); + return this; + } + + /** + * Get the state property: Overall update state of the stamp. + * + * @return the state value. + */ + public UpdateSummariesPropertiesState state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Set the state property: Overall update state of the stamp. + * + * @param state the state value to set. + * @return the UpdateSummariesInner object itself. + */ + public UpdateSummariesInner withState(UpdateSummariesPropertiesState state) { + if (this.innerProperties() == null) { + this.innerProperties = new UpdateSummariesProperties(); + } + this.innerProperties().withState(state); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesProperties.java new file mode 100644 index 0000000000000..a43e672db2ea6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/UpdateSummariesProperties.java @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.models.HealthState; +import com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo; +import com.azure.resourcemanager.azurestackhci.models.PrecheckResult; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Properties of Update summaries. + */ +@Fluent +public final class UpdateSummariesProperties { + /* + * Provisioning state of the UpdateSummaries proxy resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * OEM family name. + */ + @JsonProperty(value = "oemFamily") + private String oemFamily; + + /* + * Name of the hardware model. + */ + @JsonProperty(value = "hardwareModel") + private String hardwareModel; + + /* + * Current version of each updatable component. + */ + @JsonProperty(value = "packageVersions") + private List packageVersions; + + /* + * Current Solution Bundle version of the stamp. + */ + @JsonProperty(value = "currentVersion") + private String currentVersion; + + /* + * Last time an update installation completed successfully. + */ + @JsonProperty(value = "lastUpdated") + private OffsetDateTime lastUpdated; + + /* + * Last time the update service successfully checked for updates + */ + @JsonProperty(value = "lastChecked") + private OffsetDateTime lastChecked; + + /* + * Overall health state for update-specific health checks. + */ + @JsonProperty(value = "healthState") + private HealthState healthState; + + /* + * An array of pre-check result objects. + */ + @JsonProperty(value = "healthCheckResult") + private List healthCheckResult; + + /* + * Last time the package-specific checks were run. + */ + @JsonProperty(value = "healthCheckDate") + private OffsetDateTime healthCheckDate; + + /* + * Overall update state of the stamp. + */ + @JsonProperty(value = "state") + private UpdateSummariesPropertiesState state; + + /** + * Creates an instance of UpdateSummariesProperties class. + */ + public UpdateSummariesProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the UpdateSummaries proxy resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the oemFamily property: OEM family name. + * + * @return the oemFamily value. + */ + public String oemFamily() { + return this.oemFamily; + } + + /** + * Set the oemFamily property: OEM family name. + * + * @param oemFamily the oemFamily value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withOemFamily(String oemFamily) { + this.oemFamily = oemFamily; + return this; + } + + /** + * Get the hardwareModel property: Name of the hardware model. + * + * @return the hardwareModel value. + */ + public String hardwareModel() { + return this.hardwareModel; + } + + /** + * Set the hardwareModel property: Name of the hardware model. + * + * @param hardwareModel the hardwareModel value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withHardwareModel(String hardwareModel) { + this.hardwareModel = hardwareModel; + return this; + } + + /** + * Get the packageVersions property: Current version of each updatable component. + * + * @return the packageVersions value. + */ + public List packageVersions() { + return this.packageVersions; + } + + /** + * Set the packageVersions property: Current version of each updatable component. + * + * @param packageVersions the packageVersions value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withPackageVersions(List packageVersions) { + this.packageVersions = packageVersions; + return this; + } + + /** + * Get the currentVersion property: Current Solution Bundle version of the stamp. + * + * @return the currentVersion value. + */ + public String currentVersion() { + return this.currentVersion; + } + + /** + * Set the currentVersion property: Current Solution Bundle version of the stamp. + * + * @param currentVersion the currentVersion value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withCurrentVersion(String currentVersion) { + this.currentVersion = currentVersion; + return this; + } + + /** + * Get the lastUpdated property: Last time an update installation completed successfully. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the lastUpdated property: Last time an update installation completed successfully. + * + * @param lastUpdated the lastUpdated value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withLastUpdated(OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the lastChecked property: Last time the update service successfully checked for updates. + * + * @return the lastChecked value. + */ + public OffsetDateTime lastChecked() { + return this.lastChecked; + } + + /** + * Set the lastChecked property: Last time the update service successfully checked for updates. + * + * @param lastChecked the lastChecked value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withLastChecked(OffsetDateTime lastChecked) { + this.lastChecked = lastChecked; + return this; + } + + /** + * Get the healthState property: Overall health state for update-specific health checks. + * + * @return the healthState value. + */ + public HealthState healthState() { + return this.healthState; + } + + /** + * Set the healthState property: Overall health state for update-specific health checks. + * + * @param healthState the healthState value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withHealthState(HealthState healthState) { + this.healthState = healthState; + return this; + } + + /** + * Get the healthCheckResult property: An array of pre-check result objects. + * + * @return the healthCheckResult value. + */ + public List healthCheckResult() { + return this.healthCheckResult; + } + + /** + * Set the healthCheckResult property: An array of pre-check result objects. + * + * @param healthCheckResult the healthCheckResult value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withHealthCheckResult(List healthCheckResult) { + this.healthCheckResult = healthCheckResult; + return this; + } + + /** + * Get the healthCheckDate property: Last time the package-specific checks were run. + * + * @return the healthCheckDate value. + */ + public OffsetDateTime healthCheckDate() { + return this.healthCheckDate; + } + + /** + * Set the healthCheckDate property: Last time the package-specific checks were run. + * + * @param healthCheckDate the healthCheckDate value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withHealthCheckDate(OffsetDateTime healthCheckDate) { + this.healthCheckDate = healthCheckDate; + return this; + } + + /** + * Get the state property: Overall update state of the stamp. + * + * @return the state value. + */ + public UpdateSummariesPropertiesState state() { + return this.state; + } + + /** + * Set the state property: Overall update state of the stamp. + * + * @param state the state value to set. + * @return the UpdateSummariesProperties object itself. + */ + public UpdateSummariesProperties withState(UpdateSummariesPropertiesState state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packageVersions() != null) { + packageVersions().forEach(e -> e.validate()); + } + if (healthCheckResult() != null) { + healthCheckResult().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java new file mode 100644 index 0000000000000..fb438c0bc696b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/ValidateResponseInner.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Accepted response with an Operation-Location header. + */ +@Immutable +public final class ValidateResponseInner { + /* + * edge device validation status + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /** + * Creates an instance of ValidateResponseInner class. + */ + public ValidateResponseInner() { + } + + /** + * Get the status property: edge device validation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualHardDiskProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualHardDiskProperties.java index 1b424339cfaec..8d28b2fc038c0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualHardDiskProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualHardDiskProperties.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.azurestackhci.models.VirtualHardDiskStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties under the virtual hard disk resource. */ +/** + * Properties under the virtual hard disk resource. + */ @Fluent public final class VirtualHardDiskProperties { /* @@ -74,13 +76,15 @@ public final class VirtualHardDiskProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private VirtualHardDiskStatus status; - /** Creates an instance of VirtualHardDiskProperties class. */ + /** + * Creates an instance of VirtualHardDiskProperties class. + */ public VirtualHardDiskProperties() { } /** * Get the blockSizeBytes property: The blockSizeBytes property. - * + * * @return the blockSizeBytes value. */ public Integer blockSizeBytes() { @@ -89,7 +93,7 @@ public Integer blockSizeBytes() { /** * Set the blockSizeBytes property: The blockSizeBytes property. - * + * * @param blockSizeBytes the blockSizeBytes value to set. * @return the VirtualHardDiskProperties object itself. */ @@ -100,7 +104,7 @@ public VirtualHardDiskProperties withBlockSizeBytes(Integer blockSizeBytes) { /** * Get the diskSizeGB property: Size of the disk in GB. - * + * * @return the diskSizeGB value. */ public Long diskSizeGB() { @@ -109,7 +113,7 @@ public Long diskSizeGB() { /** * Set the diskSizeGB property: Size of the disk in GB. - * + * * @param diskSizeGB the diskSizeGB value to set. * @return the VirtualHardDiskProperties object itself. */ @@ -120,7 +124,7 @@ public VirtualHardDiskProperties withDiskSizeGB(Long diskSizeGB) { /** * Get the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk. - * + * * @return the dynamic value. */ public Boolean dynamic() { @@ -129,7 +133,7 @@ public Boolean dynamic() { /** * Set the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk. - * + * * @param dynamic the dynamic value to set. * @return the VirtualHardDiskProperties object itself. */ @@ -140,7 +144,7 @@ public VirtualHardDiskProperties withDynamic(Boolean dynamic) { /** * Get the logicalSectorBytes property: The logicalSectorBytes property. - * + * * @return the logicalSectorBytes value. */ public Integer logicalSectorBytes() { @@ -149,7 +153,7 @@ public Integer logicalSectorBytes() { /** * Set the logicalSectorBytes property: The logicalSectorBytes property. - * + * * @param logicalSectorBytes the logicalSectorBytes value to set. * @return the VirtualHardDiskProperties object itself. */ @@ -160,7 +164,7 @@ public VirtualHardDiskProperties withLogicalSectorBytes(Integer logicalSectorByt /** * Get the physicalSectorBytes property: The physicalSectorBytes property. - * + * * @return the physicalSectorBytes value. */ public Integer physicalSectorBytes() { @@ -169,7 +173,7 @@ public Integer physicalSectorBytes() { /** * Set the physicalSectorBytes property: The physicalSectorBytes property. - * + * * @param physicalSectorBytes the physicalSectorBytes value to set. * @return the VirtualHardDiskProperties object itself. */ @@ -180,7 +184,7 @@ public VirtualHardDiskProperties withPhysicalSectorBytes(Integer physicalSectorB /** * Get the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ public HyperVGeneration hyperVGeneration() { @@ -189,7 +193,7 @@ public HyperVGeneration hyperVGeneration() { /** * Set the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration the hyperVGeneration value to set. * @return the VirtualHardDiskProperties object itself. */ @@ -200,7 +204,7 @@ public VirtualHardDiskProperties withHyperVGeneration(HyperVGeneration hyperVGen /** * Get the diskFileFormat property: The format of the actual VHD file [vhd, vhdx]. - * + * * @return the diskFileFormat value. */ public DiskFileFormat diskFileFormat() { @@ -209,7 +213,7 @@ public DiskFileFormat diskFileFormat() { /** * Set the diskFileFormat property: The format of the actual VHD file [vhd, vhdx]. - * + * * @param diskFileFormat the diskFileFormat value to set. * @return the VirtualHardDiskProperties object itself. */ @@ -220,7 +224,7 @@ public VirtualHardDiskProperties withDiskFileFormat(DiskFileFormat diskFileForma /** * Get the provisioningState property: Provisioning state of the virtual hard disk. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -229,7 +233,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the containerId property: Storage ContainerID of the storage container to be used for VHD. - * + * * @return the containerId value. */ public String containerId() { @@ -238,7 +242,7 @@ public String containerId() { /** * Set the containerId property: Storage ContainerID of the storage container to be used for VHD. - * + * * @param containerId the containerId value to set. * @return the VirtualHardDiskProperties object itself. */ @@ -249,7 +253,7 @@ public VirtualHardDiskProperties withContainerId(String containerId) { /** * Get the status property: The observed state of virtual hard disks. - * + * * @return the status value. */ public VirtualHardDiskStatus status() { @@ -258,7 +262,7 @@ public VirtualHardDiskStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualHardDisksInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualHardDisksInner.java index a335eb5f2d37e..6994267aa2721 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualHardDisksInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualHardDisksInner.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The virtual hard disk resource definition. */ +/** + * The virtual hard disk resource definition. + */ @Fluent public final class VirtualHardDisksInner extends Resource { /* @@ -36,13 +38,15 @@ public final class VirtualHardDisksInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of VirtualHardDisksInner class. */ + /** + * Creates an instance of VirtualHardDisksInner class. + */ public VirtualHardDisksInner() { } /** * Get the innerProperties property: Properties under the virtual hard disk resource. - * + * * @return the innerProperties value. */ private VirtualHardDiskProperties innerProperties() { @@ -51,7 +55,7 @@ private VirtualHardDiskProperties innerProperties() { /** * Get the extendedLocation property: The extendedLocation of the resource. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -60,7 +64,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The extendedLocation of the resource. - * + * * @param extendedLocation the extendedLocation value to set. * @return the VirtualHardDisksInner object itself. */ @@ -71,21 +75,25 @@ public VirtualHardDisksInner withExtendedLocation(ExtendedLocation extendedLocat /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VirtualHardDisksInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VirtualHardDisksInner withTags(Map tags) { super.withTags(tags); @@ -94,7 +102,7 @@ public VirtualHardDisksInner withTags(Map tags) { /** * Get the blockSizeBytes property: The blockSizeBytes property. - * + * * @return the blockSizeBytes value. */ public Integer blockSizeBytes() { @@ -103,7 +111,7 @@ public Integer blockSizeBytes() { /** * Set the blockSizeBytes property: The blockSizeBytes property. - * + * * @param blockSizeBytes the blockSizeBytes value to set. * @return the VirtualHardDisksInner object itself. */ @@ -117,7 +125,7 @@ public VirtualHardDisksInner withBlockSizeBytes(Integer blockSizeBytes) { /** * Get the diskSizeGB property: Size of the disk in GB. - * + * * @return the diskSizeGB value. */ public Long diskSizeGB() { @@ -126,7 +134,7 @@ public Long diskSizeGB() { /** * Set the diskSizeGB property: Size of the disk in GB. - * + * * @param diskSizeGB the diskSizeGB value to set. * @return the VirtualHardDisksInner object itself. */ @@ -140,7 +148,7 @@ public VirtualHardDisksInner withDiskSizeGB(Long diskSizeGB) { /** * Get the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk. - * + * * @return the dynamic value. */ public Boolean dynamic() { @@ -149,7 +157,7 @@ public Boolean dynamic() { /** * Set the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk. - * + * * @param dynamic the dynamic value to set. * @return the VirtualHardDisksInner object itself. */ @@ -163,7 +171,7 @@ public VirtualHardDisksInner withDynamic(Boolean dynamic) { /** * Get the logicalSectorBytes property: The logicalSectorBytes property. - * + * * @return the logicalSectorBytes value. */ public Integer logicalSectorBytes() { @@ -172,7 +180,7 @@ public Integer logicalSectorBytes() { /** * Set the logicalSectorBytes property: The logicalSectorBytes property. - * + * * @param logicalSectorBytes the logicalSectorBytes value to set. * @return the VirtualHardDisksInner object itself. */ @@ -186,7 +194,7 @@ public VirtualHardDisksInner withLogicalSectorBytes(Integer logicalSectorBytes) /** * Get the physicalSectorBytes property: The physicalSectorBytes property. - * + * * @return the physicalSectorBytes value. */ public Integer physicalSectorBytes() { @@ -195,7 +203,7 @@ public Integer physicalSectorBytes() { /** * Set the physicalSectorBytes property: The physicalSectorBytes property. - * + * * @param physicalSectorBytes the physicalSectorBytes value to set. * @return the VirtualHardDisksInner object itself. */ @@ -209,7 +217,7 @@ public VirtualHardDisksInner withPhysicalSectorBytes(Integer physicalSectorBytes /** * Get the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ public HyperVGeneration hyperVGeneration() { @@ -218,7 +226,7 @@ public HyperVGeneration hyperVGeneration() { /** * Set the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration the hyperVGeneration value to set. * @return the VirtualHardDisksInner object itself. */ @@ -232,7 +240,7 @@ public VirtualHardDisksInner withHyperVGeneration(HyperVGeneration hyperVGenerat /** * Get the diskFileFormat property: The format of the actual VHD file [vhd, vhdx]. - * + * * @return the diskFileFormat value. */ public DiskFileFormat diskFileFormat() { @@ -241,7 +249,7 @@ public DiskFileFormat diskFileFormat() { /** * Set the diskFileFormat property: The format of the actual VHD file [vhd, vhdx]. - * + * * @param diskFileFormat the diskFileFormat value to set. * @return the VirtualHardDisksInner object itself. */ @@ -255,7 +263,7 @@ public VirtualHardDisksInner withDiskFileFormat(DiskFileFormat diskFileFormat) { /** * Get the provisioningState property: Provisioning state of the virtual hard disk. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -264,7 +272,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the containerId property: Storage ContainerID of the storage container to be used for VHD. - * + * * @return the containerId value. */ public String containerId() { @@ -273,7 +281,7 @@ public String containerId() { /** * Set the containerId property: Storage ContainerID of the storage container to be used for VHD. - * + * * @param containerId the containerId value to set. * @return the VirtualHardDisksInner object itself. */ @@ -287,7 +295,7 @@ public VirtualHardDisksInner withContainerId(String containerId) { /** * Get the status property: The observed state of virtual hard disks. - * + * * @return the status value. */ public VirtualHardDiskStatus status() { @@ -296,7 +304,7 @@ public VirtualHardDiskStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualMachineInstanceInner.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualMachineInstanceInner.java index eae851615ccb1..11f3a805a343f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualMachineInstanceInner.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualMachineInstanceInner.java @@ -21,7 +21,9 @@ import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceView; import com.fasterxml.jackson.annotation.JsonProperty; -/** The virtual machine instance resource definition. */ +/** + * The virtual machine instance resource definition. + */ @Fluent public final class VirtualMachineInstanceInner extends ProxyResource { /* @@ -48,13 +50,15 @@ public final class VirtualMachineInstanceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of VirtualMachineInstanceInner class. */ + /** + * Creates an instance of VirtualMachineInstanceInner class. + */ public VirtualMachineInstanceInner() { } /** * Get the innerProperties property: Properties under the virtual machine instance resource. - * + * * @return the innerProperties value. */ private VirtualMachineInstanceProperties innerProperties() { @@ -63,7 +67,7 @@ private VirtualMachineInstanceProperties innerProperties() { /** * Get the extendedLocation property: The extendedLocation of the resource. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -72,7 +76,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The extendedLocation of the resource. - * + * * @param extendedLocation the extendedLocation value to set. * @return the VirtualMachineInstanceInner object itself. */ @@ -83,7 +87,7 @@ public VirtualMachineInstanceInner withExtendedLocation(ExtendedLocation extende /** * Get the identity property: Identity for the resource. - * + * * @return the identity value. */ public Identity identity() { @@ -92,7 +96,7 @@ public Identity identity() { /** * Set the identity property: Identity for the resource. - * + * * @param identity the identity value to set. * @return the VirtualMachineInstanceInner object itself. */ @@ -103,7 +107,7 @@ public VirtualMachineInstanceInner withIdentity(Identity identity) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -113,7 +117,7 @@ public SystemData systemData() { /** * Get the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine * instance. - * + * * @return the hardwareProfile value. */ public VirtualMachineInstancePropertiesHardwareProfile hardwareProfile() { @@ -123,12 +127,12 @@ public VirtualMachineInstancePropertiesHardwareProfile hardwareProfile() { /** * Set the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine * instance. - * + * * @param hardwareProfile the hardwareProfile value to set. * @return the VirtualMachineInstanceInner object itself. */ - public VirtualMachineInstanceInner withHardwareProfile( - VirtualMachineInstancePropertiesHardwareProfile hardwareProfile) { + public VirtualMachineInstanceInner + withHardwareProfile(VirtualMachineInstancePropertiesHardwareProfile hardwareProfile) { if (this.innerProperties() == null) { this.innerProperties = new VirtualMachineInstanceProperties(); } @@ -139,7 +143,7 @@ public VirtualMachineInstanceInner withHardwareProfile( /** * Get the networkProfile property: NetworkProfile - describes the network configuration the virtual machine * instance. - * + * * @return the networkProfile value. */ public VirtualMachineInstancePropertiesNetworkProfile networkProfile() { @@ -149,12 +153,12 @@ public VirtualMachineInstancePropertiesNetworkProfile networkProfile() { /** * Set the networkProfile property: NetworkProfile - describes the network configuration the virtual machine * instance. - * + * * @param networkProfile the networkProfile value to set. * @return the VirtualMachineInstanceInner object itself. */ - public VirtualMachineInstanceInner withNetworkProfile( - VirtualMachineInstancePropertiesNetworkProfile networkProfile) { + public VirtualMachineInstanceInner + withNetworkProfile(VirtualMachineInstancePropertiesNetworkProfile networkProfile) { if (this.innerProperties() == null) { this.innerProperties = new VirtualMachineInstanceProperties(); } @@ -164,7 +168,7 @@ public VirtualMachineInstanceInner withNetworkProfile( /** * Get the osProfile property: OsProfile - describes the configuration of the operating system and sets login data. - * + * * @return the osProfile value. */ public VirtualMachineInstancePropertiesOsProfile osProfile() { @@ -173,7 +177,7 @@ public VirtualMachineInstancePropertiesOsProfile osProfile() { /** * Set the osProfile property: OsProfile - describes the configuration of the operating system and sets login data. - * + * * @param osProfile the osProfile value to set. * @return the VirtualMachineInstanceInner object itself. */ @@ -188,7 +192,7 @@ public VirtualMachineInstanceInner withOsProfile(VirtualMachineInstancePropertie /** * Get the securityProfile property: SecurityProfile - Specifies the security settings for the virtual machine * instance. - * + * * @return the securityProfile value. */ public VirtualMachineInstancePropertiesSecurityProfile securityProfile() { @@ -198,12 +202,12 @@ public VirtualMachineInstancePropertiesSecurityProfile securityProfile() { /** * Set the securityProfile property: SecurityProfile - Specifies the security settings for the virtual machine * instance. - * + * * @param securityProfile the securityProfile value to set. * @return the VirtualMachineInstanceInner object itself. */ - public VirtualMachineInstanceInner withSecurityProfile( - VirtualMachineInstancePropertiesSecurityProfile securityProfile) { + public VirtualMachineInstanceInner + withSecurityProfile(VirtualMachineInstancePropertiesSecurityProfile securityProfile) { if (this.innerProperties() == null) { this.innerProperties = new VirtualMachineInstanceProperties(); } @@ -214,7 +218,7 @@ public VirtualMachineInstanceInner withSecurityProfile( /** * Get the storageProfile property: StorageProfile - contains information about the disks and storage information * for the virtual machine instance. - * + * * @return the storageProfile value. */ public VirtualMachineInstancePropertiesStorageProfile storageProfile() { @@ -224,12 +228,12 @@ public VirtualMachineInstancePropertiesStorageProfile storageProfile() { /** * Set the storageProfile property: StorageProfile - contains information about the disks and storage information * for the virtual machine instance. - * + * * @param storageProfile the storageProfile value to set. * @return the VirtualMachineInstanceInner object itself. */ - public VirtualMachineInstanceInner withStorageProfile( - VirtualMachineInstancePropertiesStorageProfile storageProfile) { + public VirtualMachineInstanceInner + withStorageProfile(VirtualMachineInstancePropertiesStorageProfile storageProfile) { if (this.innerProperties() == null) { this.innerProperties = new VirtualMachineInstanceProperties(); } @@ -239,7 +243,7 @@ public VirtualMachineInstanceInner withStorageProfile( /** * Get the httpProxyConfig property: HTTP Proxy configuration for the VM. - * + * * @return the httpProxyConfig value. */ public HttpProxyConfiguration httpProxyConfig() { @@ -248,7 +252,7 @@ public HttpProxyConfiguration httpProxyConfig() { /** * Set the httpProxyConfig property: HTTP Proxy configuration for the VM. - * + * * @param httpProxyConfig the httpProxyConfig value to set. * @return the VirtualMachineInstanceInner object itself. */ @@ -262,7 +266,7 @@ public VirtualMachineInstanceInner withHttpProxyConfig(HttpProxyConfiguration ht /** * Get the provisioningState property: Provisioning state of the virtual machine instance. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -271,7 +275,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the instanceView property: The virtual machine instance view. - * + * * @return the instanceView value. */ public VirtualMachineInstanceView instanceView() { @@ -280,7 +284,7 @@ public VirtualMachineInstanceView instanceView() { /** * Get the status property: The observed state of virtual machine instances. - * + * * @return the status value. */ public VirtualMachineInstanceStatus status() { @@ -289,7 +293,7 @@ public VirtualMachineInstanceStatus status() { /** * Get the guestAgentInstallStatus property: Guest agent install status. - * + * * @return the guestAgentInstallStatus value. */ public GuestAgentInstallStatus guestAgentInstallStatus() { @@ -298,7 +302,7 @@ public GuestAgentInstallStatus guestAgentInstallStatus() { /** * Set the guestAgentInstallStatus property: Guest agent install status. - * + * * @param guestAgentInstallStatus the guestAgentInstallStatus value to set. * @return the VirtualMachineInstanceInner object itself. */ @@ -312,7 +316,7 @@ public VirtualMachineInstanceInner withGuestAgentInstallStatus(GuestAgentInstall /** * Get the vmId property: Unique identifier for the vm resource. - * + * * @return the vmId value. */ public String vmId() { @@ -321,7 +325,7 @@ public String vmId() { /** * Get the resourceUid property: Unique identifier defined by ARC to identify the guest of the VM. - * + * * @return the resourceUid value. */ public String resourceUid() { @@ -330,7 +334,7 @@ public String resourceUid() { /** * Set the resourceUid property: Unique identifier defined by ARC to identify the guest of the VM. - * + * * @param resourceUid the resourceUid value to set. * @return the VirtualMachineInstanceInner object itself. */ @@ -344,7 +348,7 @@ public VirtualMachineInstanceInner withResourceUid(String resourceUid) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualMachineInstanceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualMachineInstanceProperties.java index 49c9a61c58e4e..59be753a77646 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualMachineInstanceProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/VirtualMachineInstanceProperties.java @@ -17,7 +17,9 @@ import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceView; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties under the virtual machine instance resource. */ +/** + * Properties under the virtual machine instance resource. + */ @Fluent public final class VirtualMachineInstanceProperties { /* @@ -92,14 +94,16 @@ public final class VirtualMachineInstanceProperties { @JsonProperty(value = "resourceUid") private String resourceUid; - /** Creates an instance of VirtualMachineInstanceProperties class. */ + /** + * Creates an instance of VirtualMachineInstanceProperties class. + */ public VirtualMachineInstanceProperties() { } /** * Get the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine * instance. - * + * * @return the hardwareProfile value. */ public VirtualMachineInstancePropertiesHardwareProfile hardwareProfile() { @@ -109,12 +113,12 @@ public VirtualMachineInstancePropertiesHardwareProfile hardwareProfile() { /** * Set the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine * instance. - * + * * @param hardwareProfile the hardwareProfile value to set. * @return the VirtualMachineInstanceProperties object itself. */ - public VirtualMachineInstanceProperties withHardwareProfile( - VirtualMachineInstancePropertiesHardwareProfile hardwareProfile) { + public VirtualMachineInstanceProperties + withHardwareProfile(VirtualMachineInstancePropertiesHardwareProfile hardwareProfile) { this.hardwareProfile = hardwareProfile; return this; } @@ -122,7 +126,7 @@ public VirtualMachineInstanceProperties withHardwareProfile( /** * Get the networkProfile property: NetworkProfile - describes the network configuration the virtual machine * instance. - * + * * @return the networkProfile value. */ public VirtualMachineInstancePropertiesNetworkProfile networkProfile() { @@ -132,19 +136,19 @@ public VirtualMachineInstancePropertiesNetworkProfile networkProfile() { /** * Set the networkProfile property: NetworkProfile - describes the network configuration the virtual machine * instance. - * + * * @param networkProfile the networkProfile value to set. * @return the VirtualMachineInstanceProperties object itself. */ - public VirtualMachineInstanceProperties withNetworkProfile( - VirtualMachineInstancePropertiesNetworkProfile networkProfile) { + public VirtualMachineInstanceProperties + withNetworkProfile(VirtualMachineInstancePropertiesNetworkProfile networkProfile) { this.networkProfile = networkProfile; return this; } /** * Get the osProfile property: OsProfile - describes the configuration of the operating system and sets login data. - * + * * @return the osProfile value. */ public VirtualMachineInstancePropertiesOsProfile osProfile() { @@ -153,7 +157,7 @@ public VirtualMachineInstancePropertiesOsProfile osProfile() { /** * Set the osProfile property: OsProfile - describes the configuration of the operating system and sets login data. - * + * * @param osProfile the osProfile value to set. * @return the VirtualMachineInstanceProperties object itself. */ @@ -165,7 +169,7 @@ public VirtualMachineInstanceProperties withOsProfile(VirtualMachineInstanceProp /** * Get the securityProfile property: SecurityProfile - Specifies the security settings for the virtual machine * instance. - * + * * @return the securityProfile value. */ public VirtualMachineInstancePropertiesSecurityProfile securityProfile() { @@ -175,12 +179,12 @@ public VirtualMachineInstancePropertiesSecurityProfile securityProfile() { /** * Set the securityProfile property: SecurityProfile - Specifies the security settings for the virtual machine * instance. - * + * * @param securityProfile the securityProfile value to set. * @return the VirtualMachineInstanceProperties object itself. */ - public VirtualMachineInstanceProperties withSecurityProfile( - VirtualMachineInstancePropertiesSecurityProfile securityProfile) { + public VirtualMachineInstanceProperties + withSecurityProfile(VirtualMachineInstancePropertiesSecurityProfile securityProfile) { this.securityProfile = securityProfile; return this; } @@ -188,7 +192,7 @@ public VirtualMachineInstanceProperties withSecurityProfile( /** * Get the storageProfile property: StorageProfile - contains information about the disks and storage information * for the virtual machine instance. - * + * * @return the storageProfile value. */ public VirtualMachineInstancePropertiesStorageProfile storageProfile() { @@ -198,19 +202,19 @@ public VirtualMachineInstancePropertiesStorageProfile storageProfile() { /** * Set the storageProfile property: StorageProfile - contains information about the disks and storage information * for the virtual machine instance. - * + * * @param storageProfile the storageProfile value to set. * @return the VirtualMachineInstanceProperties object itself. */ - public VirtualMachineInstanceProperties withStorageProfile( - VirtualMachineInstancePropertiesStorageProfile storageProfile) { + public VirtualMachineInstanceProperties + withStorageProfile(VirtualMachineInstancePropertiesStorageProfile storageProfile) { this.storageProfile = storageProfile; return this; } /** * Get the httpProxyConfig property: HTTP Proxy configuration for the VM. - * + * * @return the httpProxyConfig value. */ public HttpProxyConfiguration httpProxyConfig() { @@ -219,7 +223,7 @@ public HttpProxyConfiguration httpProxyConfig() { /** * Set the httpProxyConfig property: HTTP Proxy configuration for the VM. - * + * * @param httpProxyConfig the httpProxyConfig value to set. * @return the VirtualMachineInstanceProperties object itself. */ @@ -230,7 +234,7 @@ public VirtualMachineInstanceProperties withHttpProxyConfig(HttpProxyConfigurati /** * Get the provisioningState property: Provisioning state of the virtual machine instance. - * + * * @return the provisioningState value. */ public ProvisioningStateEnum provisioningState() { @@ -239,7 +243,7 @@ public ProvisioningStateEnum provisioningState() { /** * Get the instanceView property: The virtual machine instance view. - * + * * @return the instanceView value. */ public VirtualMachineInstanceView instanceView() { @@ -248,7 +252,7 @@ public VirtualMachineInstanceView instanceView() { /** * Get the status property: The observed state of virtual machine instances. - * + * * @return the status value. */ public VirtualMachineInstanceStatus status() { @@ -257,7 +261,7 @@ public VirtualMachineInstanceStatus status() { /** * Get the guestAgentInstallStatus property: Guest agent install status. - * + * * @return the guestAgentInstallStatus value. */ public GuestAgentInstallStatus guestAgentInstallStatus() { @@ -266,19 +270,19 @@ public GuestAgentInstallStatus guestAgentInstallStatus() { /** * Set the guestAgentInstallStatus property: Guest agent install status. - * + * * @param guestAgentInstallStatus the guestAgentInstallStatus value to set. * @return the VirtualMachineInstanceProperties object itself. */ - public VirtualMachineInstanceProperties withGuestAgentInstallStatus( - GuestAgentInstallStatus guestAgentInstallStatus) { + public VirtualMachineInstanceProperties + withGuestAgentInstallStatus(GuestAgentInstallStatus guestAgentInstallStatus) { this.guestAgentInstallStatus = guestAgentInstallStatus; return this; } /** * Get the vmId property: Unique identifier for the vm resource. - * + * * @return the vmId value. */ public String vmId() { @@ -287,7 +291,7 @@ public String vmId() { /** * Get the resourceUid property: Unique identifier defined by ARC to identify the guest of the VM. - * + * * @return the resourceUid value. */ public String resourceUid() { @@ -296,7 +300,7 @@ public String resourceUid() { /** * Set the resourceUid property: Unique identifier defined by ARC to identify the guest of the VM. - * + * * @param resourceUid the resourceUid value to set. * @return the VirtualMachineInstanceProperties object itself. */ @@ -307,7 +311,7 @@ public VirtualMachineInstanceProperties withResourceUid(String resourceUid) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java index cb01ac2fa2c40..611f7358c042d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for AzureStackHciClient. Azure Stack HCI management service. */ +/** + * Package containing the inner data models for AzureStackHciClient. + * Azure Stack HCI management service. + */ package com.azure.resourcemanager.azurestackhci.fluent.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java index 187c45a59c4ba..d0573888c104b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for AzureStackHciClient. Azure Stack HCI management service. */ +/** + * Package containing the service clients for AzureStackHciClient. + * Azure Stack HCI management service. + */ package com.azure.resourcemanager.azurestackhci.fluent; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java new file mode 100644 index 0000000000000..54ac1517757b4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcIdentityResponseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner; +import com.azure.resourcemanager.azurestackhci.models.ArcIdentityResponse; + +public final class ArcIdentityResponseImpl implements ArcIdentityResponse { + private ArcIdentityResponseInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + ArcIdentityResponseImpl(ArcIdentityResponseInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String arcApplicationClientId() { + return this.innerModel().arcApplicationClientId(); + } + + public String arcApplicationTenantId() { + return this.innerModel().arcApplicationTenantId(); + } + + public String arcServicePrincipalObjectId() { + return this.innerModel().arcServicePrincipalObjectId(); + } + + public String arcApplicationObjectId() { + return this.innerModel().arcApplicationObjectId(); + } + + public ArcIdentityResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java new file mode 100644 index 0000000000000..36a7f582212d0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingImpl.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; +import com.azure.resourcemanager.azurestackhci.models.ArcIdentityResponse; +import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState; +import com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch; +import com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails; +import com.azure.resourcemanager.azurestackhci.models.PasswordCredential; +import com.azure.resourcemanager.azurestackhci.models.PerNodeState; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ArcSettingImpl implements ArcSetting, ArcSetting.Definition, ArcSetting.Update { + private ArcSettingInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String arcInstanceResourceGroup() { + return this.innerModel().arcInstanceResourceGroup(); + } + + public String arcApplicationClientId() { + return this.innerModel().arcApplicationClientId(); + } + + public String arcApplicationTenantId() { + return this.innerModel().arcApplicationTenantId(); + } + + public String arcServicePrincipalObjectId() { + return this.innerModel().arcServicePrincipalObjectId(); + } + + public String arcApplicationObjectId() { + return this.innerModel().arcApplicationObjectId(); + } + + public ArcSettingAggregateState aggregateState() { + return this.innerModel().aggregateState(); + } + + public List perNodeDetails() { + List inner = this.innerModel().perNodeDetails(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Object connectivityProperties() { + return this.innerModel().connectivityProperties(); + } + + public List defaultExtensions() { + List inner = this.innerModel().defaultExtensions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ArcSettingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String arcSettingName; + + private ArcSettingsPatch updateArcSetting; + + public ArcSettingImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public ArcSetting create() { + this.innerObject = serviceManager.serviceClient() + .getArcSettings() + .createWithResponse(resourceGroupName, clusterName, arcSettingName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ArcSetting create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getArcSettings() + .createWithResponse(resourceGroupName, clusterName, arcSettingName, this.innerModel(), context) + .getValue(); + return this; + } + + ArcSettingImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new ArcSettingInner(); + this.serviceManager = serviceManager; + this.arcSettingName = name; + } + + public ArcSettingImpl update() { + this.updateArcSetting = new ArcSettingsPatch(); + return this; + } + + public ArcSetting apply() { + this.innerObject = serviceManager.serviceClient() + .getArcSettings() + .updateWithResponse(resourceGroupName, clusterName, arcSettingName, updateArcSetting, Context.NONE) + .getValue(); + return this; + } + + public ArcSetting apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getArcSettings() + .updateWithResponse(resourceGroupName, clusterName, arcSettingName, updateArcSetting, context) + .getValue(); + return this; + } + + ArcSettingImpl(ArcSettingInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.arcSettingName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "arcSettings"); + } + + public ArcSetting refresh() { + this.innerObject = serviceManager.serviceClient() + .getArcSettings() + .getWithResponse(resourceGroupName, clusterName, arcSettingName, Context.NONE) + .getValue(); + return this; + } + + public ArcSetting refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getArcSettings() + .getWithResponse(resourceGroupName, clusterName, arcSettingName, context) + .getValue(); + return this; + } + + public Response generatePasswordWithResponse(Context context) { + return serviceManager.arcSettings() + .generatePasswordWithResponse(resourceGroupName, clusterName, arcSettingName, context); + } + + public PasswordCredential generatePassword() { + return serviceManager.arcSettings().generatePassword(resourceGroupName, clusterName, arcSettingName); + } + + public ArcIdentityResponse createIdentity() { + return serviceManager.arcSettings().createIdentity(resourceGroupName, clusterName, arcSettingName); + } + + public ArcIdentityResponse createIdentity(Context context) { + return serviceManager.arcSettings().createIdentity(resourceGroupName, clusterName, arcSettingName, context); + } + + public Response consentAndInstallDefaultExtensionsWithResponse(Context context) { + return serviceManager.arcSettings() + .consentAndInstallDefaultExtensionsWithResponse(resourceGroupName, clusterName, arcSettingName, context); + } + + public ArcSetting consentAndInstallDefaultExtensions() { + return serviceManager.arcSettings() + .consentAndInstallDefaultExtensions(resourceGroupName, clusterName, arcSettingName); + } + + public void initializeDisableProcess() { + serviceManager.arcSettings().initializeDisableProcess(resourceGroupName, clusterName, arcSettingName); + } + + public void initializeDisableProcess(Context context) { + serviceManager.arcSettings().initializeDisableProcess(resourceGroupName, clusterName, arcSettingName, context); + } + + public ArcSettingImpl withArcInstanceResourceGroup(String arcInstanceResourceGroup) { + this.innerModel().withArcInstanceResourceGroup(arcInstanceResourceGroup); + return this; + } + + public ArcSettingImpl withArcApplicationClientId(String arcApplicationClientId) { + this.innerModel().withArcApplicationClientId(arcApplicationClientId); + return this; + } + + public ArcSettingImpl withArcApplicationTenantId(String arcApplicationTenantId) { + this.innerModel().withArcApplicationTenantId(arcApplicationTenantId); + return this; + } + + public ArcSettingImpl withArcServicePrincipalObjectId(String arcServicePrincipalObjectId) { + this.innerModel().withArcServicePrincipalObjectId(arcServicePrincipalObjectId); + return this; + } + + public ArcSettingImpl withArcApplicationObjectId(String arcApplicationObjectId) { + this.innerModel().withArcApplicationObjectId(arcApplicationObjectId); + return this; + } + + public ArcSettingImpl withConnectivityProperties(Object connectivityProperties) { + if (isInCreateMode()) { + this.innerModel().withConnectivityProperties(connectivityProperties); + return this; + } else { + this.updateArcSetting.withConnectivityProperties(connectivityProperties); + return this; + } + } + + public ArcSettingImpl withTags(Map tags) { + this.updateArcSetting.withTags(tags); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java new file mode 100644 index 0000000000000..6dd8a0267460c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsClientImpl.java @@ -0,0 +1,1741 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner; +import com.azure.resourcemanager.azurestackhci.models.ArcSettingList; +import com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ArcSettingsClient. + */ +public final class ArcSettingsClientImpl implements ArcSettingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ArcSettingsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of ArcSettingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ArcSettingsClientImpl(AzureStackHciClientImpl client) { + this.service + = RestProxy.create(ArcSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientArcSettings to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientA") + public interface ArcSettingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ArcSettingInner arcSetting, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ArcSettingsPatch arcSetting, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/generatePassword") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generatePassword(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createIdentity(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/consentAndInstallDefaultExtensions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> consentAndInstallDefaultExtensions(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/initializeDisableProcess") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> initializeDisableProcess(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClusterNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listByClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName)); + } + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); + } + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resource details of HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resource details of HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + arcSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resource details of HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String arcSettingName) { + return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resource details of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + } + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting resource details of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArcSettingInner get(String resourceGroupName, String clusterName, String arcSettingName) { + return getWithResponse(resourceGroupName, clusterName, arcSettingName, Context.NONE).getValue(); + } + + /** + * Create ArcSetting for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, ArcSettingInner arcSetting) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (arcSetting == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null.")); + } else { + arcSetting.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, this.client.getApiVersion(), arcSetting, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create ArcSetting for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, ArcSettingInner arcSetting, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (arcSetting == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null.")); + } else { + arcSetting.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, this.client.getApiVersion(), arcSetting, accept, context); + } + + /** + * Create ArcSetting for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String clusterName, String arcSettingName, + ArcSettingInner arcSetting) { + return createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, arcSetting) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create ArcSetting for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, ArcSettingInner arcSetting, Context context) { + return createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, arcSetting, context).block(); + } + + /** + * Create ArcSetting for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting Parameters supplied to the Create ArcSetting resource for this HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArcSettingInner create(String resourceGroupName, String clusterName, String arcSettingName, + ArcSettingInner arcSetting) { + return createWithResponse(resourceGroupName, clusterName, arcSettingName, arcSetting, Context.NONE).getValue(); + } + + /** + * Update ArcSettings for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting ArcSettings parameters that needs to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, ArcSettingsPatch arcSetting) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (arcSetting == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null.")); + } else { + arcSetting.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, this.client.getApiVersion(), arcSetting, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update ArcSettings for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting ArcSettings parameters that needs to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, ArcSettingsPatch arcSetting, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (arcSetting == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSetting is required and cannot be null.")); + } else { + arcSetting.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, this.client.getApiVersion(), arcSetting, accept, context); + } + + /** + * Update ArcSettings for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting ArcSettings parameters that needs to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, String arcSettingName, + ArcSettingsPatch arcSetting) { + return updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, arcSetting) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update ArcSettings for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting ArcSettings parameters that needs to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, ArcSettingsPatch arcSetting, Context context) { + return updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, arcSetting, context).block(); + } + + /** + * Update ArcSettings for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param arcSetting ArcSettings parameters that needs to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArcSettingInner update(String resourceGroupName, String clusterName, String arcSettingName, + ArcSettingsPatch arcSetting) { + return updateWithResponse(resourceGroupName, clusterName, arcSettingName, arcSetting, Context.NONE).getValue(); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String arcSettingName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, arcSettingName).getSyncPoller(); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, context).getSyncPoller(); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String arcSettingName) { + return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String arcSettingName, + Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String arcSettingName) { + deleteAsync(resourceGroupName, clusterName, arcSettingName).block(); + } + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context) { + deleteAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + } + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generatePasswordWithResponseAsync(String resourceGroupName, + String clusterName, String arcSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.generatePassword(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generatePasswordWithResponseAsync(String resourceGroupName, + String clusterName, String arcSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.generatePassword(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generatePasswordAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + return generatePasswordWithResponseAsync(resourceGroupName, clusterName, arcSettingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generatePasswordWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return generatePasswordWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + } + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PasswordCredentialInner generatePassword(String resourceGroupName, String clusterName, + String arcSettingName) { + return generatePasswordWithResponse(resourceGroupName, clusterName, arcSettingName, Context.NONE).getValue(); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcIdentity details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createIdentityWithResponseAsync(String resourceGroupName, + String clusterName, String arcSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcIdentity details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createIdentityWithResponseAsync(String resourceGroupName, + String clusterName, String arcSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ArcIdentityResponseInner> + beginCreateIdentityAsync(String resourceGroupName, String clusterName, String arcSettingName) { + Mono>> mono + = createIdentityWithResponseAsync(resourceGroupName, clusterName, arcSettingName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ArcIdentityResponseInner.class, ArcIdentityResponseInner.class, + this.client.getContext()); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ArcIdentityResponseInner> + beginCreateIdentityAsync(String resourceGroupName, String clusterName, String arcSettingName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createIdentityWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ArcIdentityResponseInner.class, ArcIdentityResponseInner.class, context); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ArcIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName, String arcSettingName) { + return this.beginCreateIdentityAsync(resourceGroupName, clusterName, arcSettingName).getSyncPoller(); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ArcIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName, String arcSettingName, Context context) { + return this.beginCreateIdentityAsync(resourceGroupName, clusterName, arcSettingName, context).getSyncPoller(); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcIdentity details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createIdentityAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + return beginCreateIdentityAsync(resourceGroupName, clusterName, arcSettingName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcIdentity details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createIdentityAsync(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return beginCreateIdentityAsync(resourceGroupName, clusterName, arcSettingName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, + String arcSettingName) { + return createIdentityAsync(resourceGroupName, clusterName, arcSettingName).block(); + } + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcIdentity details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArcIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, String arcSettingName, + Context context) { + return createIdentityAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + } + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> consentAndInstallDefaultExtensionsWithResponseAsync( + String resourceGroupName, String clusterName, String arcSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.consentAndInstallDefaultExtensions(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, arcSettingName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> consentAndInstallDefaultExtensionsWithResponseAsync( + String resourceGroupName, String clusterName, String arcSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.consentAndInstallDefaultExtensions(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono consentAndInstallDefaultExtensionsAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + return consentAndInstallDefaultExtensionsWithResponseAsync(resourceGroupName, clusterName, arcSettingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response consentAndInstallDefaultExtensionsWithResponse(String resourceGroupName, + String clusterName, String arcSettingName, Context context) { + return consentAndInstallDefaultExtensionsWithResponseAsync(resourceGroupName, clusterName, arcSettingName, + context).block(); + } + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return arcSetting details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ArcSettingInner consentAndInstallDefaultExtensions(String resourceGroupName, String clusterName, + String arcSettingName) { + return consentAndInstallDefaultExtensionsWithResponse(resourceGroupName, clusterName, arcSettingName, + Context.NONE).getValue(); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> initializeDisableProcessWithResponseAsync(String resourceGroupName, + String clusterName, String arcSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.initializeDisableProcess(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> initializeDisableProcessWithResponseAsync(String resourceGroupName, + String clusterName, String arcSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.initializeDisableProcess(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginInitializeDisableProcessAsync(String resourceGroupName, + String clusterName, String arcSettingName) { + Mono>> mono + = initializeDisableProcessWithResponseAsync(resourceGroupName, clusterName, arcSettingName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginInitializeDisableProcessAsync(String resourceGroupName, + String clusterName, String arcSettingName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = initializeDisableProcessWithResponseAsync(resourceGroupName, clusterName, arcSettingName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginInitializeDisableProcess(String resourceGroupName, + String clusterName, String arcSettingName) { + return this.beginInitializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName).getSyncPoller(); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginInitializeDisableProcess(String resourceGroupName, + String clusterName, String arcSettingName, Context context) { + return this.beginInitializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName, context) + .getSyncPoller(); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono initializeDisableProcessAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + return beginInitializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono initializeDisableProcessAsync(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return beginInitializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName) { + initializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName).block(); + } + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName, + Context context) { + initializeDisableProcessAsync(resourceGroupName, clusterName, arcSettingName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ArcSetting proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ArcSetting proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java new file mode 100644 index 0000000000000..6763384442bd2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ArcSettingsImpl.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner; +import com.azure.resourcemanager.azurestackhci.models.ArcIdentityResponse; +import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import com.azure.resourcemanager.azurestackhci.models.ArcSettings; +import com.azure.resourcemanager.azurestackhci.models.PasswordCredential; + +public final class ArcSettingsImpl implements ArcSettings { + private static final ClientLogger LOGGER = new ClientLogger(ArcSettingsImpl.class); + + private final ArcSettingsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public ArcSettingsImpl(ArcSettingsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ArcSettingImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, arcSettingName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ArcSettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ArcSetting get(String resourceGroupName, String clusterName, String arcSettingName) { + ArcSettingInner inner = this.serviceClient().get(resourceGroupName, clusterName, arcSettingName); + if (inner != null) { + return new ArcSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String arcSettingName) { + this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName); + } + + public void delete(String resourceGroupName, String clusterName, String arcSettingName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, context); + } + + public Response generatePasswordWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + Response inner = this.serviceClient() + .generatePasswordWithResponse(resourceGroupName, clusterName, arcSettingName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PasswordCredentialImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PasswordCredential generatePassword(String resourceGroupName, String clusterName, String arcSettingName) { + PasswordCredentialInner inner + = this.serviceClient().generatePassword(resourceGroupName, clusterName, arcSettingName); + if (inner != null) { + return new PasswordCredentialImpl(inner, this.manager()); + } else { + return null; + } + } + + public ArcIdentityResponse createIdentity(String resourceGroupName, String clusterName, String arcSettingName) { + ArcIdentityResponseInner inner + = this.serviceClient().createIdentity(resourceGroupName, clusterName, arcSettingName); + if (inner != null) { + return new ArcIdentityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ArcIdentityResponse createIdentity(String resourceGroupName, String clusterName, String arcSettingName, + Context context) { + ArcIdentityResponseInner inner + = this.serviceClient().createIdentity(resourceGroupName, clusterName, arcSettingName, context); + if (inner != null) { + return new ArcIdentityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response consentAndInstallDefaultExtensionsWithResponse(String resourceGroupName, + String clusterName, String arcSettingName, Context context) { + Response inner = this.serviceClient() + .consentAndInstallDefaultExtensionsWithResponse(resourceGroupName, clusterName, arcSettingName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ArcSettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ArcSetting consentAndInstallDefaultExtensions(String resourceGroupName, String clusterName, + String arcSettingName) { + ArcSettingInner inner + = this.serviceClient().consentAndInstallDefaultExtensions(resourceGroupName, clusterName, arcSettingName); + if (inner != null) { + return new ArcSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public void initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName) { + this.serviceClient().initializeDisableProcess(resourceGroupName, clusterName, arcSettingName); + } + + public void initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName, + Context context) { + this.serviceClient().initializeDisableProcess(resourceGroupName, clusterName, arcSettingName, context); + } + + public ArcSetting getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String arcSettingName = ResourceManagerUtils.getValueFromIdByName(id, "arcSettings"); + if (arcSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, arcSettingName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String arcSettingName = ResourceManagerUtils.getValueFromIdByName(id, "arcSettings"); + if (arcSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, arcSettingName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String arcSettingName = ResourceManagerUtils.getValueFromIdByName(id, "arcSettings"); + if (arcSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id))); + } + this.delete(resourceGroupName, clusterName, arcSettingName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String arcSettingName = ResourceManagerUtils.getValueFromIdByName(id, "arcSettings"); + if (arcSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id))); + } + this.delete(resourceGroupName, clusterName, arcSettingName, context); + } + + private ArcSettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public ArcSettingImpl define(String name) { + return new ArcSettingImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java index dafafa520ac61..3f101035c8aa9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the AzureStackHciClientImpl type. */ -@ServiceClientBuilder(serviceClients = {AzureStackHciClientImpl.class}) +/** + * A builder for creating a new instance of the AzureStackHciClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { AzureStackHciClientImpl.class }) public final class AzureStackHciClientBuilder { /* * The ID of the target subscription. @@ -24,7 +26,7 @@ public final class AzureStackHciClientBuilder { /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the AzureStackHciClientBuilder. */ @@ -40,7 +42,7 @@ public AzureStackHciClientBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the AzureStackHciClientBuilder. */ @@ -56,7 +58,7 @@ public AzureStackHciClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the AzureStackHciClientBuilder. */ @@ -72,7 +74,7 @@ public AzureStackHciClientBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the AzureStackHciClientBuilder. */ @@ -88,7 +90,7 @@ public AzureStackHciClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the AzureStackHciClientBuilder. */ @@ -104,7 +106,7 @@ public AzureStackHciClientBuilder defaultPollInterval(Duration defaultPollInterv /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the AzureStackHciClientBuilder. */ @@ -115,30 +117,22 @@ public AzureStackHciClientBuilder serializerAdapter(SerializerAdapter serializer /** * Builds an instance of AzureStackHciClientImpl with the provided parameters. - * + * * @return an instance of AzureStackHciClientImpl. */ public AzureStackHciClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureStackHciClientImpl client = - new AzureStackHciClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + AzureStackHciClientImpl client = new AzureStackHciClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java index 45cc6e53fb788..b68076beb6e17 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/AzureStackHciClientImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.azurestackhci.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -22,7 +23,12 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azurestackhci.fluent.ArcSettingsClient; import com.azure.resourcemanager.azurestackhci.fluent.AzureStackHciClient; +import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient; +import com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient; +import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient; import com.azure.resourcemanager.azurestackhci.fluent.GalleryImagesOperationsClient; import com.azure.resourcemanager.azurestackhci.fluent.GuestAgentsClient; import com.azure.resourcemanager.azurestackhci.fluent.GuestAgentsOperationsClient; @@ -30,8 +36,15 @@ import com.azure.resourcemanager.azurestackhci.fluent.LogicalNetworksOperationsClient; import com.azure.resourcemanager.azurestackhci.fluent.MarketplaceGalleryImagesOperationsClient; import com.azure.resourcemanager.azurestackhci.fluent.NetworkInterfacesOperationsClient; +import com.azure.resourcemanager.azurestackhci.fluent.OffersClient; import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient; +import com.azure.resourcemanager.azurestackhci.fluent.PublishersClient; +import com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.SkusClient; import com.azure.resourcemanager.azurestackhci.fluent.StorageContainersOperationsClient; +import com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient; +import com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient; +import com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient; import com.azure.resourcemanager.azurestackhci.fluent.VirtualHardDisksOperationsClient; import com.azure.resourcemanager.azurestackhci.fluent.VirtualMachineInstancesClient; import java.io.IOException; @@ -43,207 +56,411 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AzureStackHciClientImpl type. */ +/** + * Initializes a new instance of the AzureStackHciClientImpl type. + */ @ServiceClient(builder = AzureStackHciClientBuilder.class) public final class AzureStackHciClientImpl implements AzureStackHciClient { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The GalleryImagesOperationsClient object to access its operations. */ + /** + * The ArcSettingsClient object to access its operations. + */ + private final ArcSettingsClient arcSettings; + + /** + * Gets the ArcSettingsClient object to access its operations. + * + * @return the ArcSettingsClient object. + */ + public ArcSettingsClient getArcSettings() { + return this.arcSettings; + } + + /** + * The ClustersClient object to access its operations. + */ + private final ClustersClient clusters; + + /** + * Gets the ClustersClient object to access its operations. + * + * @return the ClustersClient object. + */ + public ClustersClient getClusters() { + return this.clusters; + } + + /** + * The DeploymentSettingsClient object to access its operations. + */ + private final DeploymentSettingsClient deploymentSettings; + + /** + * Gets the DeploymentSettingsClient object to access its operations. + * + * @return the DeploymentSettingsClient object. + */ + public DeploymentSettingsClient getDeploymentSettings() { + return this.deploymentSettings; + } + + /** + * The EdgeDevicesClient object to access its operations. + */ + private final EdgeDevicesClient edgeDevices; + + /** + * Gets the EdgeDevicesClient object to access its operations. + * + * @return the EdgeDevicesClient object. + */ + public EdgeDevicesClient getEdgeDevices() { + return this.edgeDevices; + } + + /** + * The ExtensionsClient object to access its operations. + */ + private final ExtensionsClient extensions; + + /** + * Gets the ExtensionsClient object to access its operations. + * + * @return the ExtensionsClient object. + */ + public ExtensionsClient getExtensions() { + return this.extensions; + } + + /** + * The GalleryImagesOperationsClient object to access its operations. + */ private final GalleryImagesOperationsClient galleryImagesOperations; /** * Gets the GalleryImagesOperationsClient object to access its operations. - * + * * @return the GalleryImagesOperationsClient object. */ public GalleryImagesOperationsClient getGalleryImagesOperations() { return this.galleryImagesOperations; } - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. + * The LogicalNetworksOperationsClient object to access its operations. */ - public OperationsClient getOperations() { - return this.operations; - } - - /** The LogicalNetworksOperationsClient object to access its operations. */ private final LogicalNetworksOperationsClient logicalNetworksOperations; /** * Gets the LogicalNetworksOperationsClient object to access its operations. - * + * * @return the LogicalNetworksOperationsClient object. */ public LogicalNetworksOperationsClient getLogicalNetworksOperations() { return this.logicalNetworksOperations; } - /** The MarketplaceGalleryImagesOperationsClient object to access its operations. */ + /** + * The MarketplaceGalleryImagesOperationsClient object to access its operations. + */ private final MarketplaceGalleryImagesOperationsClient marketplaceGalleryImagesOperations; /** * Gets the MarketplaceGalleryImagesOperationsClient object to access its operations. - * + * * @return the MarketplaceGalleryImagesOperationsClient object. */ public MarketplaceGalleryImagesOperationsClient getMarketplaceGalleryImagesOperations() { return this.marketplaceGalleryImagesOperations; } - /** The NetworkInterfacesOperationsClient object to access its operations. */ + /** + * The NetworkInterfacesOperationsClient object to access its operations. + */ private final NetworkInterfacesOperationsClient networkInterfacesOperations; /** * Gets the NetworkInterfacesOperationsClient object to access its operations. - * + * * @return the NetworkInterfacesOperationsClient object. */ public NetworkInterfacesOperationsClient getNetworkInterfacesOperations() { return this.networkInterfacesOperations; } - /** The StorageContainersOperationsClient object to access its operations. */ + /** + * The OffersClient object to access its operations. + */ + private final OffersClient offers; + + /** + * Gets the OffersClient object to access its operations. + * + * @return the OffersClient object. + */ + public OffersClient getOffers() { + return this.offers; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The PublishersClient object to access its operations. + */ + private final PublishersClient publishers; + + /** + * Gets the PublishersClient object to access its operations. + * + * @return the PublishersClient object. + */ + public PublishersClient getPublishers() { + return this.publishers; + } + + /** + * The SecuritySettingsClient object to access its operations. + */ + private final SecuritySettingsClient securitySettings; + + /** + * Gets the SecuritySettingsClient object to access its operations. + * + * @return the SecuritySettingsClient object. + */ + public SecuritySettingsClient getSecuritySettings() { + return this.securitySettings; + } + + /** + * The SkusClient object to access its operations. + */ + private final SkusClient skus; + + /** + * Gets the SkusClient object to access its operations. + * + * @return the SkusClient object. + */ + public SkusClient getSkus() { + return this.skus; + } + + /** + * The StorageContainersOperationsClient object to access its operations. + */ private final StorageContainersOperationsClient storageContainersOperations; /** * Gets the StorageContainersOperationsClient object to access its operations. - * + * * @return the StorageContainersOperationsClient object. */ public StorageContainersOperationsClient getStorageContainersOperations() { return this.storageContainersOperations; } - /** The VirtualHardDisksOperationsClient object to access its operations. */ + /** + * The UpdateRunsClient object to access its operations. + */ + private final UpdateRunsClient updateRuns; + + /** + * Gets the UpdateRunsClient object to access its operations. + * + * @return the UpdateRunsClient object. + */ + public UpdateRunsClient getUpdateRuns() { + return this.updateRuns; + } + + /** + * The UpdateSummariesOperationsClient object to access its operations. + */ + private final UpdateSummariesOperationsClient updateSummariesOperations; + + /** + * Gets the UpdateSummariesOperationsClient object to access its operations. + * + * @return the UpdateSummariesOperationsClient object. + */ + public UpdateSummariesOperationsClient getUpdateSummariesOperations() { + return this.updateSummariesOperations; + } + + /** + * The UpdatesClient object to access its operations. + */ + private final UpdatesClient updates; + + /** + * Gets the UpdatesClient object to access its operations. + * + * @return the UpdatesClient object. + */ + public UpdatesClient getUpdates() { + return this.updates; + } + + /** + * The VirtualHardDisksOperationsClient object to access its operations. + */ private final VirtualHardDisksOperationsClient virtualHardDisksOperations; /** * Gets the VirtualHardDisksOperationsClient object to access its operations. - * + * * @return the VirtualHardDisksOperationsClient object. */ public VirtualHardDisksOperationsClient getVirtualHardDisksOperations() { return this.virtualHardDisksOperations; } - /** The VirtualMachineInstancesClient object to access its operations. */ + /** + * The VirtualMachineInstancesClient object to access its operations. + */ private final VirtualMachineInstancesClient virtualMachineInstances; /** * Gets the VirtualMachineInstancesClient object to access its operations. - * + * * @return the VirtualMachineInstancesClient object. */ public VirtualMachineInstancesClient getVirtualMachineInstances() { return this.virtualMachineInstances; } - /** The HybridIdentityMetadatasClient object to access its operations. */ + /** + * The HybridIdentityMetadatasClient object to access its operations. + */ private final HybridIdentityMetadatasClient hybridIdentityMetadatas; /** * Gets the HybridIdentityMetadatasClient object to access its operations. - * + * * @return the HybridIdentityMetadatasClient object. */ public HybridIdentityMetadatasClient getHybridIdentityMetadatas() { return this.hybridIdentityMetadatas; } - /** The GuestAgentsClient object to access its operations. */ + /** + * The GuestAgentsClient object to access its operations. + */ private final GuestAgentsClient guestAgents; /** * Gets the GuestAgentsClient object to access its operations. - * + * * @return the GuestAgentsClient object. */ public GuestAgentsClient getGuestAgents() { return this.guestAgents; } - /** The GuestAgentsOperationsClient object to access its operations. */ + /** + * The GuestAgentsOperationsClient object to access its operations. + */ private final GuestAgentsOperationsClient guestAgentsOperations; /** * Gets the GuestAgentsOperationsClient object to access its operations. - * + * * @return the GuestAgentsOperationsClient object. */ public GuestAgentsOperationsClient getGuestAgentsOperations() { @@ -252,7 +469,7 @@ public GuestAgentsOperationsClient getGuestAgentsOperations() { /** * Initializes an instance of AzureStackHciClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -260,25 +477,32 @@ public GuestAgentsOperationsClient getGuestAgentsOperations() { * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ - AzureStackHciClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + AzureStackHciClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-09-01-preview"; + this.apiVersion = "2024-01-01"; + this.arcSettings = new ArcSettingsClientImpl(this); + this.clusters = new ClustersClientImpl(this); + this.deploymentSettings = new DeploymentSettingsClientImpl(this); + this.edgeDevices = new EdgeDevicesClientImpl(this); + this.extensions = new ExtensionsClientImpl(this); this.galleryImagesOperations = new GalleryImagesOperationsClientImpl(this); - this.operations = new OperationsClientImpl(this); this.logicalNetworksOperations = new LogicalNetworksOperationsClientImpl(this); this.marketplaceGalleryImagesOperations = new MarketplaceGalleryImagesOperationsClientImpl(this); this.networkInterfacesOperations = new NetworkInterfacesOperationsClientImpl(this); + this.offers = new OffersClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.publishers = new PublishersClientImpl(this); + this.securitySettings = new SecuritySettingsClientImpl(this); + this.skus = new SkusClientImpl(this); this.storageContainersOperations = new StorageContainersOperationsClientImpl(this); + this.updateRuns = new UpdateRunsClientImpl(this); + this.updateSummariesOperations = new UpdateSummariesOperationsClientImpl(this); + this.updates = new UpdatesClientImpl(this); this.virtualHardDisksOperations = new VirtualHardDisksOperationsClientImpl(this); this.virtualMachineInstances = new VirtualMachineInstancesClientImpl(this); this.hybridIdentityMetadatas = new HybridIdentityMetadatasClientImpl(this); @@ -288,7 +512,7 @@ public GuestAgentsOperationsClient getGuestAgentsOperations() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -297,7 +521,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -307,7 +531,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -317,26 +541,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -349,19 +562,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -402,7 +612,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java new file mode 100644 index 0000000000000..54b4e3a155b0b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterIdentityResponseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner; +import com.azure.resourcemanager.azurestackhci.models.ClusterIdentityResponse; + +public final class ClusterIdentityResponseImpl implements ClusterIdentityResponse { + private ClusterIdentityResponseInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + ClusterIdentityResponseImpl(ClusterIdentityResponseInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String aadClientId() { + return this.innerModel().aadClientId(); + } + + public String aadTenantId() { + return this.innerModel().aadTenantId(); + } + + public String aadServicePrincipalObjectId() { + return this.innerModel().aadServicePrincipalObjectId(); + } + + public String aadApplicationObjectId() { + return this.innerModel().aadApplicationObjectId(); + } + + public ClusterIdentityResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java new file mode 100644 index 0000000000000..74318753fd109 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClusterImpl.java @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; +import com.azure.resourcemanager.azurestackhci.models.Cluster; +import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; +import com.azure.resourcemanager.azurestackhci.models.ClusterIdentityResponse; +import com.azure.resourcemanager.azurestackhci.models.ClusterPatch; +import com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties; +import com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus; +import com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration; +import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties; +import com.azure.resourcemanager.azurestackhci.models.Status; +import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; +import com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; +import java.util.UUID; + +public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update { + private ClusterInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public UUID principalId() { + return this.innerModel().principalId(); + } + + public UUID tenantId() { + return this.innerModel().tenantId(); + } + + public ManagedServiceIdentityType typeIdentityType() { + return this.innerModel().typeIdentityType(); + } + + public Map userAssignedIdentities() { + Map inner = this.innerModel().userAssignedIdentities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Status status() { + return this.innerModel().status(); + } + + public ConnectivityStatus connectivityStatus() { + return this.innerModel().connectivityStatus(); + } + + public String cloudId() { + return this.innerModel().cloudId(); + } + + public String cloudManagementEndpoint() { + return this.innerModel().cloudManagementEndpoint(); + } + + public String aadClientId() { + return this.innerModel().aadClientId(); + } + + public String aadTenantId() { + return this.innerModel().aadTenantId(); + } + + public String aadApplicationObjectId() { + return this.innerModel().aadApplicationObjectId(); + } + + public String aadServicePrincipalObjectId() { + return this.innerModel().aadServicePrincipalObjectId(); + } + + public SoftwareAssuranceProperties softwareAssuranceProperties() { + return this.innerModel().softwareAssuranceProperties(); + } + + public ClusterDesiredProperties desiredProperties() { + return this.innerModel().desiredProperties(); + } + + public ClusterReportedProperties reportedProperties() { + return this.innerModel().reportedProperties(); + } + + public IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration() { + return this.innerModel().isolatedVmAttestationConfiguration(); + } + + public Float trialDaysRemaining() { + return this.innerModel().trialDaysRemaining(); + } + + public String billingModel() { + return this.innerModel().billingModel(); + } + + public OffsetDateTime registrationTimestamp() { + return this.innerModel().registrationTimestamp(); + } + + public OffsetDateTime lastSyncTimestamp() { + return this.innerModel().lastSyncTimestamp(); + } + + public OffsetDateTime lastBillingTimestamp() { + return this.innerModel().lastBillingTimestamp(); + } + + public String serviceEndpoint() { + return this.innerModel().serviceEndpoint(); + } + + public String resourceProviderObjectId() { + return this.innerModel().resourceProviderObjectId(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private ClusterPatch updateCluster; + + public ClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Cluster create() { + this.innerObject = serviceManager.serviceClient() + .getClusters() + .createWithResponse(resourceGroupName, clusterName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Cluster create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getClusters() + .createWithResponse(resourceGroupName, clusterName, this.innerModel(), context) + .getValue(); + return this; + } + + ClusterImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new ClusterInner(); + this.serviceManager = serviceManager; + this.clusterName = name; + } + + public ClusterImpl update() { + this.updateCluster = new ClusterPatch(); + return this; + } + + public Cluster apply() { + this.innerObject = serviceManager.serviceClient() + .getClusters() + .updateWithResponse(resourceGroupName, clusterName, updateCluster, Context.NONE) + .getValue(); + return this; + } + + public Cluster apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getClusters() + .updateWithResponse(resourceGroupName, clusterName, updateCluster, context) + .getValue(); + return this; + } + + ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + } + + public Cluster refresh() { + this.innerObject = serviceManager.serviceClient() + .getClusters() + .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE) + .getValue(); + return this; + } + + public Cluster refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getClusters() + .getByResourceGroupWithResponse(resourceGroupName, clusterName, context) + .getValue(); + return this; + } + + public void uploadCertificate(UploadCertificateRequest uploadCertificateRequest) { + serviceManager.clusters().uploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest); + } + + public void uploadCertificate(UploadCertificateRequest uploadCertificateRequest, Context context) { + serviceManager.clusters().uploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest, context); + } + + public ClusterIdentityResponse createIdentity() { + return serviceManager.clusters().createIdentity(resourceGroupName, clusterName); + } + + public ClusterIdentityResponse createIdentity(Context context) { + return serviceManager.clusters().createIdentity(resourceGroupName, clusterName, context); + } + + public Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + return serviceManager.clusters() + .extendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest); + } + + public Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, + Context context) { + return serviceManager.clusters() + .extendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest, context); + } + + public ClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateCluster.withTags(tags); + return this; + } + } + + public ClusterImpl withTypeIdentityType(ManagedServiceIdentityType typeIdentityType) { + this.innerModel().withTypeIdentityType(typeIdentityType); + return this; + } + + public ClusterImpl withUserAssignedIdentities(Map userAssignedIdentities) { + if (isInCreateMode()) { + this.innerModel().withUserAssignedIdentities(userAssignedIdentities); + return this; + } else { + this.updateCluster.withUserAssignedIdentities(userAssignedIdentities); + return this; + } + } + + public ClusterImpl withCloudManagementEndpoint(String cloudManagementEndpoint) { + if (isInCreateMode()) { + this.innerModel().withCloudManagementEndpoint(cloudManagementEndpoint); + return this; + } else { + this.updateCluster.withCloudManagementEndpoint(cloudManagementEndpoint); + return this; + } + } + + public ClusterImpl withAadClientId(String aadClientId) { + if (isInCreateMode()) { + this.innerModel().withAadClientId(aadClientId); + return this; + } else { + this.updateCluster.withAadClientId(aadClientId); + return this; + } + } + + public ClusterImpl withAadTenantId(String aadTenantId) { + if (isInCreateMode()) { + this.innerModel().withAadTenantId(aadTenantId); + return this; + } else { + this.updateCluster.withAadTenantId(aadTenantId); + return this; + } + } + + public ClusterImpl withAadApplicationObjectId(String aadApplicationObjectId) { + this.innerModel().withAadApplicationObjectId(aadApplicationObjectId); + return this; + } + + public ClusterImpl withAadServicePrincipalObjectId(String aadServicePrincipalObjectId) { + this.innerModel().withAadServicePrincipalObjectId(aadServicePrincipalObjectId); + return this; + } + + public ClusterImpl withSoftwareAssuranceProperties(SoftwareAssuranceProperties softwareAssuranceProperties) { + this.innerModel().withSoftwareAssuranceProperties(softwareAssuranceProperties); + return this; + } + + public ClusterImpl withDesiredProperties(ClusterDesiredProperties desiredProperties) { + if (isInCreateMode()) { + this.innerModel().withDesiredProperties(desiredProperties); + return this; + } else { + this.updateCluster.withDesiredProperties(desiredProperties); + return this; + } + } + + public ClusterImpl withType(ManagedServiceIdentityType type) { + this.updateCluster.withType(type); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java new file mode 100644 index 0000000000000..c02adcaa2fa34 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersClientImpl.java @@ -0,0 +1,1800 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; +import com.azure.resourcemanager.azurestackhci.models.ClusterList; +import com.azure.resourcemanager.azurestackhci.models.ClusterPatch; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; +import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ +public final class ClustersClientImpl implements ClustersClient { + /** + * The proxy service used to perform REST calls. + */ + private final ClustersService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of ClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClustersClientImpl(AzureStackHciClientImpl client) { + this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientClusters to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientC") + public interface ClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ClusterInner cluster, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ClusterPatch cluster, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> uploadCertificate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UploadCertificateRequest uploadCertificateRequest, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createIdentity(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/extendSoftwareAssuranceBenefit") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> extendSoftwareAssuranceBenefit(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List all HCI clusters in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all HCI clusters in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all HCI clusters in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all HCI clusters in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List all HCI clusters in a subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List all HCI clusters in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hCI cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hCI cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), accept, context); + } + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hCI cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hCI cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hCI cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + } + + /** + * Create an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, + ClusterInner cluster) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (cluster == null) { + return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); + } else { + cluster.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), cluster, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync(String resourceGroupName, String clusterName, + ClusterInner cluster, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (cluster == null) { + return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); + } else { + cluster.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), cluster, accept, context); + } + + /** + * Create an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String clusterName, ClusterInner cluster) { + return createWithResponseAsync(resourceGroupName, clusterName, cluster) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String resourceGroupName, String clusterName, ClusterInner cluster, + Context context) { + return createWithResponseAsync(resourceGroupName, clusterName, cluster, context).block(); + } + + /** + * Create an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner create(String resourceGroupName, String clusterName, ClusterInner cluster) { + return createWithResponse(resourceGroupName, clusterName, cluster, Context.NONE).getValue(); + } + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, + ClusterPatch cluster) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (cluster == null) { + return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); + } else { + cluster.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), cluster, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName, + ClusterPatch cluster, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (cluster == null) { + return Mono.error(new IllegalArgumentException("Parameter cluster is required and cannot be null.")); + } else { + cluster.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), cluster, accept, context); + } + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, ClusterPatch cluster) { + return updateWithResponseAsync(resourceGroupName, clusterName, cluster) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String clusterName, ClusterPatch cluster, + Context context) { + return updateWithResponseAsync(resourceGroupName, clusterName, cluster, context).block(); + } + + /** + * Update an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param cluster Details of the HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch cluster) { + return updateWithResponse(resourceGroupName, clusterName, cluster, Context.NONE).getValue(); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { + return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName) { + deleteAsync(resourceGroupName, clusterName).block(); + } + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, Context context) { + deleteAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> uploadCertificateWithResponseAsync(String resourceGroupName, + String clusterName, UploadCertificateRequest uploadCertificateRequest) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (uploadCertificateRequest == null) { + return Mono.error( + new IllegalArgumentException("Parameter uploadCertificateRequest is required and cannot be null.")); + } else { + uploadCertificateRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.uploadCertificate(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, this.client.getApiVersion(), + uploadCertificateRequest, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> uploadCertificateWithResponseAsync(String resourceGroupName, + String clusterName, UploadCertificateRequest uploadCertificateRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (uploadCertificateRequest == null) { + return Mono.error( + new IllegalArgumentException("Parameter uploadCertificateRequest is required and cannot be null.")); + } else { + uploadCertificateRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.uploadCertificate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), uploadCertificateRequest, accept, context); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUploadCertificateAsync(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest) { + Mono>> mono + = uploadCertificateWithResponseAsync(resourceGroupName, clusterName, uploadCertificateRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUploadCertificateAsync(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = uploadCertificateWithResponseAsync(resourceGroupName, clusterName, uploadCertificateRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest) { + return this.beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest) + .getSyncPoller(); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context) { + return this.beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest, context) + .getSyncPoller(); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono uploadCertificateAsync(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest) { + return beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono uploadCertificateAsync(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context) { + return beginUploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest) { + uploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest).block(); + } + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context) { + uploadCertificateAsync(resourceGroupName, clusterName, uploadCertificateRequest, context).block(); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster Identity details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createIdentityWithResponseAsync(String resourceGroupName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster Identity details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createIdentityWithResponseAsync(String resourceGroupName, + String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createIdentity(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), accept, context); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterIdentityResponseInner> + beginCreateIdentityAsync(String resourceGroupName, String clusterName) { + Mono>> mono = createIdentityWithResponseAsync(resourceGroupName, clusterName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, + this.client.getContext()); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterIdentityResponseInner> + beginCreateIdentityAsync(String resourceGroupName, String clusterName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createIdentityWithResponseAsync(resourceGroupName, clusterName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ClusterIdentityResponseInner.class, ClusterIdentityResponseInner.class, + context); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName) { + return this.beginCreateIdentityAsync(resourceGroupName, clusterName).getSyncPoller(); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterIdentityResponseInner> + beginCreateIdentity(String resourceGroupName, String clusterName, Context context) { + return this.beginCreateIdentityAsync(resourceGroupName, clusterName, context).getSyncPoller(); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster Identity details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createIdentityAsync(String resourceGroupName, String clusterName) { + return beginCreateIdentityAsync(resourceGroupName, clusterName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster Identity details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createIdentityAsync(String resourceGroupName, String clusterName, + Context context) { + return beginCreateIdentityAsync(resourceGroupName, clusterName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName) { + return createIdentityAsync(resourceGroupName, clusterName).block(); + } + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster Identity details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterIdentityResponseInner createIdentity(String resourceGroupName, String clusterName, Context context) { + return createIdentityAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> extendSoftwareAssuranceBenefitWithResponseAsync(String resourceGroupName, + String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (softwareAssuranceChangeRequest == null) { + return Mono.error(new IllegalArgumentException( + "Parameter softwareAssuranceChangeRequest is required and cannot be null.")); + } else { + softwareAssuranceChangeRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.extendSoftwareAssuranceBenefit(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, this.client.getApiVersion(), + softwareAssuranceChangeRequest, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> extendSoftwareAssuranceBenefitWithResponseAsync(String resourceGroupName, + String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (softwareAssuranceChangeRequest == null) { + return Mono.error(new IllegalArgumentException( + "Parameter softwareAssuranceChangeRequest is required and cannot be null.")); + } else { + softwareAssuranceChangeRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.extendSoftwareAssuranceBenefit(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), softwareAssuranceChangeRequest, accept, + context); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of cluster details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginExtendSoftwareAssuranceBenefitAsync( + String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + Mono>> mono = extendSoftwareAssuranceBenefitWithResponseAsync(resourceGroupName, + clusterName, softwareAssuranceChangeRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of cluster details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginExtendSoftwareAssuranceBenefitAsync( + String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = extendSoftwareAssuranceBenefitWithResponseAsync(resourceGroupName, + clusterName, softwareAssuranceChangeRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of cluster details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit( + String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + return this + .beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest) + .getSyncPoller(); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of cluster details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginExtendSoftwareAssuranceBenefit( + String resourceGroupName, String clusterName, SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, + Context context) { + return this + .beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest, + context) + .getSyncPoller(); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono extendSoftwareAssuranceBenefitAsync(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + return beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono extendSoftwareAssuranceBenefitAsync(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { + return beginExtendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + return extendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest) + .block(); + } + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { + return extendSoftwareAssuranceBenefitAsync(resourceGroupName, clusterName, softwareAssuranceChangeRequest, + context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java new file mode 100644 index 0000000000000..65e96c549f1a0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ClustersImpl.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.ClustersClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; +import com.azure.resourcemanager.azurestackhci.models.Cluster; +import com.azure.resourcemanager.azurestackhci.models.ClusterIdentityResponse; +import com.azure.resourcemanager.azurestackhci.models.Clusters; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; +import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; + +public final class ClustersImpl implements Clusters { + private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); + + private final ClustersClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public ClustersImpl(ClustersClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Cluster getByResourceGroup(String resourceGroupName, String clusterName) { + ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String clusterName) { + this.serviceClient().delete(resourceGroupName, clusterName); + } + + public void delete(String resourceGroupName, String clusterName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, context); + } + + public void uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest) { + this.serviceClient().uploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest); + } + + public void uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context) { + this.serviceClient().uploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest, context); + } + + public ClusterIdentityResponse createIdentity(String resourceGroupName, String clusterName) { + ClusterIdentityResponseInner inner = this.serviceClient().createIdentity(resourceGroupName, clusterName); + if (inner != null) { + return new ClusterIdentityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ClusterIdentityResponse createIdentity(String resourceGroupName, String clusterName, Context context) { + ClusterIdentityResponseInner inner + = this.serviceClient().createIdentity(resourceGroupName, clusterName, context); + if (inner != null) { + return new ClusterIdentityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest) { + ClusterInner inner = this.serviceClient() + .extendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context) { + ClusterInner inner = this.serviceClient() + .extendSoftwareAssuranceBenefit(resourceGroupName, clusterName, softwareAssuranceChangeRequest, context); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cluster getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + this.delete(resourceGroupName, clusterName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + this.delete(resourceGroupName, clusterName, context); + } + + private ClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public ClusterImpl define(String name) { + return new ClusterImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java new file mode 100644 index 0000000000000..3df5c0776c2b1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingImpl.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner; +import com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.DeploymentSetting; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.ReportedProperties; +import java.util.Collections; +import java.util.List; + +public final class DeploymentSettingImpl + implements DeploymentSetting, DeploymentSetting.Definition, DeploymentSetting.Update { + private DeploymentSettingInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List arcNodeResourceIds() { + List inner = this.innerModel().arcNodeResourceIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DeploymentMode deploymentMode() { + return this.innerModel().deploymentMode(); + } + + public DeploymentConfiguration deploymentConfiguration() { + return this.innerModel().deploymentConfiguration(); + } + + public ReportedProperties reportedProperties() { + return this.innerModel().reportedProperties(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DeploymentSettingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String deploymentSettingsName; + + public DeploymentSettingImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public DeploymentSetting create() { + this.innerObject = serviceManager.serviceClient() + .getDeploymentSettings() + .createOrUpdate(resourceGroupName, clusterName, deploymentSettingsName, this.innerModel(), Context.NONE); + return this; + } + + public DeploymentSetting create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDeploymentSettings() + .createOrUpdate(resourceGroupName, clusterName, deploymentSettingsName, this.innerModel(), context); + return this; + } + + DeploymentSettingImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new DeploymentSettingInner(); + this.serviceManager = serviceManager; + this.deploymentSettingsName = name; + } + + public DeploymentSettingImpl update() { + return this; + } + + public DeploymentSetting apply() { + this.innerObject = serviceManager.serviceClient() + .getDeploymentSettings() + .createOrUpdate(resourceGroupName, clusterName, deploymentSettingsName, this.innerModel(), Context.NONE); + return this; + } + + public DeploymentSetting apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDeploymentSettings() + .createOrUpdate(resourceGroupName, clusterName, deploymentSettingsName, this.innerModel(), context); + return this; + } + + DeploymentSettingImpl(DeploymentSettingInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.deploymentSettingsName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deploymentSettings"); + } + + public DeploymentSetting refresh() { + this.innerObject = serviceManager.serviceClient() + .getDeploymentSettings() + .getWithResponse(resourceGroupName, clusterName, deploymentSettingsName, Context.NONE) + .getValue(); + return this; + } + + public DeploymentSetting refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getDeploymentSettings() + .getWithResponse(resourceGroupName, clusterName, deploymentSettingsName, context) + .getValue(); + return this; + } + + public DeploymentSettingImpl withProvisioningState(ProvisioningState provisioningState) { + this.innerModel().withProvisioningState(provisioningState); + return this; + } + + public DeploymentSettingImpl withArcNodeResourceIds(List arcNodeResourceIds) { + this.innerModel().withArcNodeResourceIds(arcNodeResourceIds); + return this; + } + + public DeploymentSettingImpl withDeploymentMode(DeploymentMode deploymentMode) { + this.innerModel().withDeploymentMode(deploymentMode); + return this; + } + + public DeploymentSettingImpl withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration) { + this.innerModel().withDeploymentConfiguration(deploymentConfiguration); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java new file mode 100644 index 0000000000000..3100c3c74f91d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsClientImpl.java @@ -0,0 +1,934 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner; +import com.azure.resourcemanager.azurestackhci.models.DeploymentSettingListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DeploymentSettingsClient. + */ +public final class DeploymentSettingsClientImpl implements DeploymentSettingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DeploymentSettingsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of DeploymentSettingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeploymentSettingsClientImpl(AzureStackHciClientImpl client) { + this.service = RestProxy.create(DeploymentSettingsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientDeploymentSettings to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientD") + public interface DeploymentSettingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClusters(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("deploymentSettingsName") String deploymentSettingsName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("deploymentSettingsName") String deploymentSettingsName, + @BodyParam("application/json") DeploymentSettingInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/deploymentSettings/{deploymentSettingsName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("deploymentSettingsName") String deploymentSettingsName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClustersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a DeploymentSetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersSinglePageAsync(String resourceGroupName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a DeploymentSetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a DeploymentSetting list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByClustersNextSinglePageAsync(nextLink)); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a DeploymentSetting list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listByClustersNextSinglePageAsync(nextLink, context)); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByClusters(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listByClustersAsync(resourceGroupName, clusterName)); + } + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByClusters(String resourceGroupName, String clusterName, + Context context) { + return new PagedIterable<>(listByClustersAsync(resourceGroupName, clusterName, context)); + } + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DeploymentSetting along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (deploymentSettingsName == null) { + return Mono.error( + new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DeploymentSetting along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (deploymentSettingsName == null) { + return Mono.error( + new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, deploymentSettingsName, accept, context); + } + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DeploymentSetting on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName) { + return getWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DeploymentSetting along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName, context).block(); + } + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DeploymentSetting. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentSettingInner get(String resourceGroupName, String clusterName, String deploymentSettingsName) { + return getWithResponse(resourceGroupName, clusterName, deploymentSettingsName, Context.NONE).getValue(); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String deploymentSettingsName, DeploymentSettingInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (deploymentSettingsName == null) { + return Mono.error( + new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, resource, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String deploymentSettingsName, DeploymentSettingInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (deploymentSettingsName == null) { + return Mono.error( + new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, resource, accept, + context); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DeploymentSettingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentSettingInner.class, DeploymentSettingInner.class, + this.client.getContext()); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DeploymentSettingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, + deploymentSettingsName, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DeploymentSettingInner.class, DeploymentSettingInner.class, context); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentSettingInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource) + .getSyncPoller(); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DeploymentSettingInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, String deploymentSettingsName, DeploymentSettingInner resource, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource, context) + .getSyncPoller(); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName, DeploymentSettingInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName, DeploymentSettingInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentSettingInner createOrUpdate(String resourceGroupName, String clusterName, + String deploymentSettingsName, DeploymentSettingInner resource) { + return createOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource).block(); + } + + /** + * Create a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentSettingInner createOrUpdate(String resourceGroupName, String clusterName, + String deploymentSettingsName, DeploymentSettingInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, clusterName, deploymentSettingsName, resource, context).block(); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (deploymentSettingsName == null) { + return Mono.error( + new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, deploymentSettingsName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (deploymentSettingsName == null) { + return Mono.error( + new IllegalArgumentException("Parameter deploymentSettingsName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, deploymentSettingsName, accept, context); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, deploymentSettingsName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String deploymentSettingsName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, deploymentSettingsName).getSyncPoller(); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, deploymentSettingsName, context).getSyncPoller(); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String deploymentSettingsName) { + return beginDeleteAsync(resourceGroupName, clusterName, deploymentSettingsName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String deploymentSettingsName, + Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, deploymentSettingsName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String deploymentSettingsName) { + deleteAsync(resourceGroupName, clusterName, deploymentSettingsName).block(); + } + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context) { + deleteAsync(resourceGroupName, clusterName, deploymentSettingsName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a DeploymentSetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClustersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a DeploymentSetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByClustersNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java new file mode 100644 index 0000000000000..67cf3f75119c9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/DeploymentSettingsImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.DeploymentSettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner; +import com.azure.resourcemanager.azurestackhci.models.DeploymentSetting; +import com.azure.resourcemanager.azurestackhci.models.DeploymentSettings; + +public final class DeploymentSettingsImpl implements DeploymentSettings { + private static final ClientLogger LOGGER = new ClientLogger(DeploymentSettingsImpl.class); + + private final DeploymentSettingsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public DeploymentSettingsImpl(DeploymentSettingsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByClusters(String resourceGroupName, String clusterName) { + PagedIterable inner + = this.serviceClient().listByClusters(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentSettingImpl(inner1, this.manager())); + } + + public PagedIterable listByClusters(String resourceGroupName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByClusters(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DeploymentSettingImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, deploymentSettingsName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeploymentSettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeploymentSetting get(String resourceGroupName, String clusterName, String deploymentSettingsName) { + DeploymentSettingInner inner = this.serviceClient().get(resourceGroupName, clusterName, deploymentSettingsName); + if (inner != null) { + return new DeploymentSettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String deploymentSettingsName) { + this.serviceClient().delete(resourceGroupName, clusterName, deploymentSettingsName); + } + + public void delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, deploymentSettingsName, context); + } + + public DeploymentSetting getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String deploymentSettingsName = ResourceManagerUtils.getValueFromIdByName(id, "deploymentSettings"); + if (deploymentSettingsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentSettings'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, deploymentSettingsName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String deploymentSettingsName = ResourceManagerUtils.getValueFromIdByName(id, "deploymentSettings"); + if (deploymentSettingsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentSettings'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, deploymentSettingsName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String deploymentSettingsName = ResourceManagerUtils.getValueFromIdByName(id, "deploymentSettings"); + if (deploymentSettingsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentSettings'.", id))); + } + this.delete(resourceGroupName, clusterName, deploymentSettingsName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String deploymentSettingsName = ResourceManagerUtils.getValueFromIdByName(id, "deploymentSettings"); + if (deploymentSettingsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deploymentSettings'.", id))); + } + this.delete(resourceGroupName, clusterName, deploymentSettingsName, context); + } + + private DeploymentSettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public DeploymentSettingImpl define(String name) { + return new DeploymentSettingImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java new file mode 100644 index 0000000000000..41844602ffb02 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDeviceImpl.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; +import com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.EdgeDevice; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; +import com.azure.resourcemanager.azurestackhci.models.ValidateResponse; + +public final class EdgeDeviceImpl implements EdgeDevice, EdgeDevice.Definition, EdgeDevice.Update { + private EdgeDeviceInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DeviceConfiguration deviceConfiguration() { + return this.innerModel().deviceConfiguration(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public EdgeDeviceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceUri; + + private String edgeDeviceName; + + public EdgeDeviceImpl withExistingResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + public EdgeDevice create() { + this.innerObject = serviceManager.serviceClient() + .getEdgeDevices() + .createOrUpdate(resourceUri, edgeDeviceName, this.innerModel(), Context.NONE); + return this; + } + + public EdgeDevice create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeDevices() + .createOrUpdate(resourceUri, edgeDeviceName, this.innerModel(), context); + return this; + } + + EdgeDeviceImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new EdgeDeviceInner(); + this.serviceManager = serviceManager; + this.edgeDeviceName = name; + } + + public EdgeDeviceImpl update() { + return this; + } + + public EdgeDevice apply() { + this.innerObject = serviceManager.serviceClient() + .getEdgeDevices() + .createOrUpdate(resourceUri, edgeDeviceName, this.innerModel(), Context.NONE); + return this; + } + + public EdgeDevice apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeDevices() + .createOrUpdate(resourceUri, edgeDeviceName, this.innerModel(), context); + return this; + } + + EdgeDeviceImpl(EdgeDeviceInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceUri = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "resourceUri"); + this.edgeDeviceName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "edgeDeviceName"); + } + + public EdgeDevice refresh() { + this.innerObject = serviceManager.serviceClient() + .getEdgeDevices() + .getWithResponse(resourceUri, edgeDeviceName, Context.NONE) + .getValue(); + return this; + } + + public EdgeDevice refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEdgeDevices() + .getWithResponse(resourceUri, edgeDeviceName, context) + .getValue(); + return this; + } + + public ValidateResponse validate(ValidateRequest validateRequest) { + return serviceManager.edgeDevices().validate(resourceUri, edgeDeviceName, validateRequest); + } + + public ValidateResponse validate(ValidateRequest validateRequest, Context context) { + return serviceManager.edgeDevices().validate(resourceUri, edgeDeviceName, validateRequest, context); + } + + public EdgeDeviceImpl withDeviceConfiguration(DeviceConfiguration deviceConfiguration) { + this.innerModel().withDeviceConfiguration(deviceConfiguration); + return this; + } + + public EdgeDeviceImpl withProvisioningState(ProvisioningState provisioningState) { + this.innerModel().withProvisioningState(provisioningState); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java new file mode 100644 index 0000000000000..447edba02480d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesClientImpl.java @@ -0,0 +1,1038 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeDeviceListResult; +import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in EdgeDevicesClient. + */ +public final class EdgeDevicesClientImpl implements EdgeDevicesClient { + /** + * The proxy service used to perform REST calls. + */ + private final EdgeDevicesService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of EdgeDevicesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EdgeDevicesClientImpl(AzureStackHciClientImpl client) { + this.service + = RestProxy.create(EdgeDevicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientEdgeDevices to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientE") + public interface EdgeDevicesService { + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @BodyParam("application/json") EdgeDeviceInner resource, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/validate") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam(value = "resourceUri", encoded = true) String resourceUri, + @PathParam("edgeDeviceName") String edgeDeviceName, + @BodyParam("application/json") ValidateRequest validateRequest, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EdgeDevice list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceUri) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EdgeDevice list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceUri, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EdgeDevice list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceUri) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EdgeDevice list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceUri, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceUri) { + return new PagedIterable<>(listAsync(resourceUri)); + } + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceUri, Context context) { + return new PagedIterable<>(listAsync(resourceUri, context)); + } + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDevice along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceUri, String edgeDeviceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (edgeDeviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDevice along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceUri, String edgeDeviceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (edgeDeviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, accept, + context); + } + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDevice on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceUri, String edgeDeviceName) { + return getWithResponseAsync(resourceUri, edgeDeviceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDevice along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceUri, String edgeDeviceName, Context context) { + return getWithResponseAsync(resourceUri, edgeDeviceName, context).block(); + } + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a EdgeDevice. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeDeviceInner get(String resourceUri, String edgeDeviceName) { + return getWithResponse(resourceUri, edgeDeviceName, Context.NONE).getValue(); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceUri, String edgeDeviceName, + EdgeDeviceInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (edgeDeviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, edgeDeviceName, resource, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceUri, String edgeDeviceName, + EdgeDeviceInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (edgeDeviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, resource, accept, context); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EdgeDeviceInner> beginCreateOrUpdateAsync(String resourceUri, + String edgeDeviceName, EdgeDeviceInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceUri, edgeDeviceName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + EdgeDeviceInner.class, EdgeDeviceInner.class, this.client.getContext()); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EdgeDeviceInner> beginCreateOrUpdateAsync(String resourceUri, + String edgeDeviceName, EdgeDeviceInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceUri, edgeDeviceName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + EdgeDeviceInner.class, EdgeDeviceInner.class, context); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeDeviceInner> beginCreateOrUpdate(String resourceUri, + String edgeDeviceName, EdgeDeviceInner resource) { + return this.beginCreateOrUpdateAsync(resourceUri, edgeDeviceName, resource).getSyncPoller(); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of edge device resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EdgeDeviceInner> beginCreateOrUpdate(String resourceUri, + String edgeDeviceName, EdgeDeviceInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceUri, edgeDeviceName, resource, context).getSyncPoller(); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceUri, String edgeDeviceName, + EdgeDeviceInner resource) { + return beginCreateOrUpdateAsync(resourceUri, edgeDeviceName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceUri, String edgeDeviceName, + EdgeDeviceInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceUri, edgeDeviceName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource) { + return createOrUpdateAsync(resourceUri, edgeDeviceName, resource).block(); + } + + /** + * Create a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return edge device resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EdgeDeviceInner createOrUpdate(String resourceUri, String edgeDeviceName, EdgeDeviceInner resource, + Context context) { + return createOrUpdateAsync(resourceUri, edgeDeviceName, resource, context).block(); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceUri, String edgeDeviceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (edgeDeviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, + edgeDeviceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceUri, String edgeDeviceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (edgeDeviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + accept, context); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceUri, String edgeDeviceName) { + Mono>> mono = deleteWithResponseAsync(resourceUri, edgeDeviceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceUri, String edgeDeviceName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceUri, edgeDeviceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceUri, String edgeDeviceName) { + return this.beginDeleteAsync(resourceUri, edgeDeviceName).getSyncPoller(); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceUri, String edgeDeviceName, Context context) { + return this.beginDeleteAsync(resourceUri, edgeDeviceName, context).getSyncPoller(); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceUri, String edgeDeviceName) { + return beginDeleteAsync(resourceUri, edgeDeviceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceUri, String edgeDeviceName, Context context) { + return beginDeleteAsync(resourceUri, edgeDeviceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceUri, String edgeDeviceName) { + deleteAsync(resourceUri, edgeDeviceName).block(); + } + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceUri, String edgeDeviceName, Context context) { + deleteAsync(resourceUri, edgeDeviceName, context).block(); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Accepted response with an Operation-Location header along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateWithResponseAsync(String resourceUri, String edgeDeviceName, + ValidateRequest validateRequest) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (edgeDeviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); + } + if (validateRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter validateRequest is required and cannot be null.")); + } else { + validateRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), + resourceUri, edgeDeviceName, validateRequest, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Accepted response with an Operation-Location header along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateWithResponseAsync(String resourceUri, String edgeDeviceName, + ValidateRequest validateRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceUri == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); + } + if (edgeDeviceName == null) { + return Mono.error(new IllegalArgumentException("Parameter edgeDeviceName is required and cannot be null.")); + } + if (validateRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter validateRequest is required and cannot be null.")); + } else { + validateRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.validate(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, edgeDeviceName, + validateRequest, accept, context); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateResponseInner> beginValidateAsync(String resourceUri, + String edgeDeviceName, ValidateRequest validateRequest) { + Mono>> mono = validateWithResponseAsync(resourceUri, edgeDeviceName, validateRequest); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ValidateResponseInner.class, ValidateResponseInner.class, + this.client.getContext()); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ValidateResponseInner> beginValidateAsync(String resourceUri, + String edgeDeviceName, ValidateRequest validateRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = validateWithResponseAsync(resourceUri, edgeDeviceName, validateRequest, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ValidateResponseInner.class, ValidateResponseInner.class, context); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateResponseInner> beginValidate(String resourceUri, + String edgeDeviceName, ValidateRequest validateRequest) { + return this.beginValidateAsync(resourceUri, edgeDeviceName, validateRequest).getSyncPoller(); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ValidateResponseInner> beginValidate(String resourceUri, + String edgeDeviceName, ValidateRequest validateRequest, Context context) { + return this.beginValidateAsync(resourceUri, edgeDeviceName, validateRequest, context).getSyncPoller(); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Accepted response with an Operation-Location header on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateAsync(String resourceUri, String edgeDeviceName, + ValidateRequest validateRequest) { + return beginValidateAsync(resourceUri, edgeDeviceName, validateRequest).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Accepted response with an Operation-Location header on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateAsync(String resourceUri, String edgeDeviceName, + ValidateRequest validateRequest, Context context) { + return beginValidateAsync(resourceUri, edgeDeviceName, validateRequest, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateResponseInner validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest) { + return validateAsync(resourceUri, edgeDeviceName, validateRequest).block(); + } + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Accepted response with an Operation-Location header. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateResponseInner validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest, + Context context) { + return validateAsync(resourceUri, edgeDeviceName, validateRequest, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EdgeDevice list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a EdgeDevice list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java new file mode 100644 index 0000000000000..c84b7d6abd029 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/EdgeDevicesImpl.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.EdgeDevicesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner; +import com.azure.resourcemanager.azurestackhci.models.EdgeDevice; +import com.azure.resourcemanager.azurestackhci.models.EdgeDevices; +import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; +import com.azure.resourcemanager.azurestackhci.models.ValidateResponse; + +public final class EdgeDevicesImpl implements EdgeDevices { + private static final ClientLogger LOGGER = new ClientLogger(EdgeDevicesImpl.class); + + private final EdgeDevicesClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public EdgeDevicesImpl(EdgeDevicesClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceUri) { + PagedIterable inner = this.serviceClient().list(resourceUri); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeDeviceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceUri, Context context) { + PagedIterable inner = this.serviceClient().list(resourceUri, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EdgeDeviceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceUri, String edgeDeviceName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceUri, edgeDeviceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EdgeDeviceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EdgeDevice get(String resourceUri, String edgeDeviceName) { + EdgeDeviceInner inner = this.serviceClient().get(resourceUri, edgeDeviceName); + if (inner != null) { + return new EdgeDeviceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceUri, String edgeDeviceName) { + this.serviceClient().delete(resourceUri, edgeDeviceName); + } + + public void delete(String resourceUri, String edgeDeviceName, Context context) { + this.serviceClient().delete(resourceUri, edgeDeviceName, context); + } + + public ValidateResponse validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest) { + ValidateResponseInner inner = this.serviceClient().validate(resourceUri, edgeDeviceName, validateRequest); + if (inner != null) { + return new ValidateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ValidateResponse validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest, + Context context) { + ValidateResponseInner inner + = this.serviceClient().validate(resourceUri, edgeDeviceName, validateRequest, context); + if (inner != null) { + return new ValidateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public EdgeDevice getById(String id) { + String resourceUri = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "resourceUri"); + if (resourceUri == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id))); + } + String edgeDeviceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "edgeDeviceName"); + if (edgeDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeDevices'.", id))); + } + return this.getWithResponse(resourceUri, edgeDeviceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceUri = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "resourceUri"); + if (resourceUri == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id))); + } + String edgeDeviceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "edgeDeviceName"); + if (edgeDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeDevices'.", id))); + } + return this.getWithResponse(resourceUri, edgeDeviceName, context); + } + + public void deleteById(String id) { + String resourceUri = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "resourceUri"); + if (resourceUri == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id))); + } + String edgeDeviceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "edgeDeviceName"); + if (edgeDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeDevices'.", id))); + } + this.delete(resourceUri, edgeDeviceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceUri = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "resourceUri"); + if (resourceUri == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id))); + } + String edgeDeviceName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}", "edgeDeviceName"); + if (edgeDeviceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'edgeDevices'.", id))); + } + this.delete(resourceUri, edgeDeviceName, context); + } + + private EdgeDevicesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public EdgeDeviceImpl define(String name) { + return new EdgeDeviceImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java new file mode 100644 index 0000000000000..4e2708793046b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionImpl.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner; +import com.azure.resourcemanager.azurestackhci.models.Extension; +import com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState; +import com.azure.resourcemanager.azurestackhci.models.ExtensionManagedBy; +import com.azure.resourcemanager.azurestackhci.models.ExtensionPatch; +import com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters; +import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; +import com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class ExtensionImpl implements Extension, Extension.Definition, Extension.Update { + private ExtensionInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public ExtensionAggregateState aggregateState() { + return this.innerModel().aggregateState(); + } + + public List perNodeExtensionDetails() { + List inner = this.innerModel().perNodeExtensionDetails(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ExtensionManagedBy managedBy() { + return this.innerModel().managedBy(); + } + + public String forceUpdateTag() { + return this.innerModel().forceUpdateTag(); + } + + public String publisher() { + return this.innerModel().publisher(); + } + + public String typePropertiesType() { + return this.innerModel().typePropertiesType(); + } + + public String typeHandlerVersion() { + return this.innerModel().typeHandlerVersion(); + } + + public Boolean autoUpgradeMinorVersion() { + return this.innerModel().autoUpgradeMinorVersion(); + } + + public Object settings() { + return this.innerModel().settings(); + } + + public Object protectedSettings() { + return this.innerModel().protectedSettings(); + } + + public Boolean enableAutomaticUpgrade() { + return this.innerModel().enableAutomaticUpgrade(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ExtensionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String arcSettingName; + + private String extensionName; + + private ExtensionPatch updateExtension; + + public ExtensionImpl withExistingArcSetting(String resourceGroupName, String clusterName, String arcSettingName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + this.arcSettingName = arcSettingName; + return this; + } + + public Extension create() { + this.innerObject = serviceManager.serviceClient() + .getExtensions() + .create(resourceGroupName, clusterName, arcSettingName, extensionName, this.innerModel(), Context.NONE); + return this; + } + + public Extension create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExtensions() + .create(resourceGroupName, clusterName, arcSettingName, extensionName, this.innerModel(), context); + return this; + } + + ExtensionImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new ExtensionInner(); + this.serviceManager = serviceManager; + this.extensionName = name; + } + + public ExtensionImpl update() { + this.updateExtension = new ExtensionPatch(); + return this; + } + + public Extension apply() { + this.innerObject = serviceManager.serviceClient() + .getExtensions() + .update(resourceGroupName, clusterName, arcSettingName, extensionName, updateExtension, Context.NONE); + return this; + } + + public Extension apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExtensions() + .update(resourceGroupName, clusterName, arcSettingName, extensionName, updateExtension, context); + return this; + } + + ExtensionImpl(ExtensionInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.arcSettingName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "arcSettings"); + this.extensionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "extensions"); + } + + public Extension refresh() { + this.innerObject = serviceManager.serviceClient() + .getExtensions() + .getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, Context.NONE) + .getValue(); + return this; + } + + public Extension refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExtensions() + .getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, context) + .getValue(); + return this; + } + + public void upgrade(ExtensionUpgradeParameters extensionUpgradeParameters) { + serviceManager.extensions() + .upgrade(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters); + } + + public void upgrade(ExtensionUpgradeParameters extensionUpgradeParameters, Context context) { + serviceManager.extensions() + .upgrade(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters, + context); + } + + public ExtensionImpl withForceUpdateTag(String forceUpdateTag) { + this.innerModel().withForceUpdateTag(forceUpdateTag); + return this; + } + + public ExtensionImpl withPublisher(String publisher) { + this.innerModel().withPublisher(publisher); + return this; + } + + public ExtensionImpl withTypePropertiesType(String typePropertiesType) { + this.innerModel().withTypePropertiesType(typePropertiesType); + return this; + } + + public ExtensionImpl withTypeHandlerVersion(String typeHandlerVersion) { + this.innerModel().withTypeHandlerVersion(typeHandlerVersion); + return this; + } + + public ExtensionImpl withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.innerModel().withAutoUpgradeMinorVersion(autoUpgradeMinorVersion); + return this; + } + + public ExtensionImpl withSettings(Object settings) { + this.innerModel().withSettings(settings); + return this; + } + + public ExtensionImpl withProtectedSettings(Object protectedSettings) { + this.innerModel().withProtectedSettings(protectedSettings); + return this; + } + + public ExtensionImpl withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + this.innerModel().withEnableAutomaticUpgrade(enableAutomaticUpgrade); + return this; + } + + public ExtensionImpl withExtensionParameters(ExtensionPatchParameters extensionParameters) { + this.updateExtension.withExtensionParameters(extensionParameters); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java new file mode 100644 index 0000000000000..f739a70f18415 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsClientImpl.java @@ -0,0 +1,1565 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner; +import com.azure.resourcemanager.azurestackhci.models.ExtensionList; +import com.azure.resourcemanager.azurestackhci.models.ExtensionPatch; +import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ExtensionsClient. + */ +public final class ExtensionsClientImpl implements ExtensionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExtensionsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of ExtensionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExtensionsClientImpl(AzureStackHciClientImpl client) { + this.service + = RestProxy.create(ExtensionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientExtensions to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientE") + public interface ExtensionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByArcSetting(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ExtensionInner extension, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ExtensionPatch extension, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/extensions/{extensionName}/upgrade") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> upgrade(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("arcSettingName") String arcSettingName, @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ExtensionUpgradeParameters extensionUpgradeParameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByArcSettingNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByArcSettingSinglePageAsync(String resourceGroupName, + String clusterName, String arcSettingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByArcSetting(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByArcSettingSinglePageAsync(String resourceGroupName, + String clusterName, String arcSettingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByArcSetting(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByArcSettingAsync(String resourceGroupName, String clusterName, + String arcSettingName) { + return new PagedFlux<>(() -> listByArcSettingSinglePageAsync(resourceGroupName, clusterName, arcSettingName), + nextLink -> listByArcSettingNextSinglePageAsync(nextLink)); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByArcSettingAsync(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return new PagedFlux<>( + () -> listByArcSettingSinglePageAsync(resourceGroupName, clusterName, arcSettingName, context), + nextLink -> listByArcSettingNextSinglePageAsync(nextLink, context)); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, + String arcSettingName) { + return new PagedIterable<>(listByArcSettingAsync(resourceGroupName, clusterName, arcSettingName)); + } + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + return new PagedIterable<>(listByArcSettingAsync(resourceGroupName, clusterName, arcSettingName, context)); + } + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return particular Arc Extension of HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, extensionName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return particular Arc Extension of HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + arcSettingName, extensionName, this.client.getApiVersion(), accept, context); + } + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return particular Arc Extension of HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName) { + return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return particular Arc Extension of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).block(); + } + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return particular Arc Extension of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionInner get(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName) { + return getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, Context.NONE).getValue(); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionInner extension) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (extension == null) { + return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); + } else { + extension.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extension, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionInner extension, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (extension == null) { + return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); + } else { + extension.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extension, accept, context); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExtensionInner> beginCreateAsync(String resourceGroupName, + String clusterName, String arcSettingName, String extensionName, ExtensionInner extension) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExtensionInner.class, ExtensionInner.class, this.client.getContext()); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExtensionInner> beginCreateAsync(String resourceGroupName, + String clusterName, String arcSettingName, String extensionName, ExtensionInner extension, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, clusterName, arcSettingName, + extensionName, extension, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExtensionInner.class, ExtensionInner.class, context); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExtensionInner> beginCreate(String resourceGroupName, + String clusterName, String arcSettingName, String extensionName, ExtensionInner extension) { + return this.beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension) + .getSyncPoller(); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExtensionInner> beginCreate(String resourceGroupName, + String clusterName, String arcSettingName, String extensionName, ExtensionInner extension, Context context) { + return this.beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) + .getSyncPoller(); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionInner extension) { + return beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionInner extension, Context context) { + return beginCreateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionInner create(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionInner extension) { + return createAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension).block(); + } + + /** + * Create Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionInner create(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionInner extension, Context context) { + return createAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context).block(); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionPatch extension) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (extension == null) { + return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); + } else { + extension.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extension, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionPatch extension, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (extension == null) { + return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); + } else { + extension.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extension, accept, context); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExtensionInner> beginUpdateAsync(String resourceGroupName, + String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExtensionInner.class, ExtensionInner.class, this.client.getContext()); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExtensionInner> beginUpdateAsync(String resourceGroupName, + String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, arcSettingName, + extensionName, extension, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExtensionInner.class, ExtensionInner.class, context); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExtensionInner> beginUpdate(String resourceGroupName, + String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension) { + return this.beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension) + .getSyncPoller(); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExtensionInner> beginUpdate(String resourceGroupName, + String clusterName, String arcSettingName, String extensionName, ExtensionPatch extension, Context context) { + return this.beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) + .getSyncPoller(); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionPatch extension) { + return beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionPatch extension, Context context) { + return beginUpdateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionInner update(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionPatch extension) { + return updateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension).block(); + } + + /** + * Update Extension for HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extension Details of the Machine Extension to be created. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of a particular extension in HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionInner update(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionPatch extension, Context context) { + return updateAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extension, context).block(); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, extensionName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, extensionName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName).getSyncPoller(); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context) + .getSyncPoller(); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName) { + return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) { + deleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName).block(); + } + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + Context context) { + deleteAsync(resourceGroupName, clusterName, arcSettingName, extensionName, context).block(); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (extensionUpgradeParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter extensionUpgradeParameters is required and cannot be null.")); + } else { + extensionUpgradeParameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, arcSettingName, extensionName, this.client.getApiVersion(), + extensionUpgradeParameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (arcSettingName == null) { + return Mono.error(new IllegalArgumentException("Parameter arcSettingName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (extensionUpgradeParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter extensionUpgradeParameters is required and cannot be null.")); + } else { + extensionUpgradeParameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.upgrade(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, arcSettingName, extensionName, this.client.getApiVersion(), extensionUpgradeParameters, accept, + context); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpgradeAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, clusterName, arcSettingName, + extensionName, extensionUpgradeParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginUpgradeAsync(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = upgradeWithResponseAsync(resourceGroupName, clusterName, arcSettingName, + extensionName, extensionUpgradeParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpgrade(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { + return this + .beginUpgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, + extensionUpgradeParameters) + .getSyncPoller(); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginUpgrade(String resourceGroupName, String clusterName, + String arcSettingName, String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, + Context context) { + return this + .beginUpgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, + extensionUpgradeParameters, context) + .getSyncPoller(); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters) { + return beginUpgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, + extensionUpgradeParameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, ExtensionUpgradeParameters extensionUpgradeParameters, Context context) { + return beginUpgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, + extensionUpgradeParameters, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionUpgradeParameters extensionUpgradeParameters) { + upgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters).block(); + } + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionUpgradeParameters extensionUpgradeParameters, Context context) { + upgradeAsync(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByArcSettingNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByArcSettingNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Extensions in HCI cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByArcSettingNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByArcSettingNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java new file mode 100644 index 0000000000000..996d03e657448 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ExtensionsImpl.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.ExtensionsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner; +import com.azure.resourcemanager.azurestackhci.models.Extension; +import com.azure.resourcemanager.azurestackhci.models.Extensions; +import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; + +public final class ExtensionsImpl implements Extensions { + private static final ClientLogger LOGGER = new ClientLogger(ExtensionsImpl.class); + + private final ExtensionsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public ExtensionsImpl(ExtensionsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, + String arcSettingName) { + PagedIterable inner + = this.serviceClient().listByArcSetting(resourceGroupName, clusterName, arcSettingName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager())); + } + + public PagedIterable listByArcSetting(String resourceGroupName, String clusterName, + String arcSettingName, Context context) { + PagedIterable inner + = this.serviceClient().listByArcSetting(resourceGroupName, clusterName, arcSettingName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExtensionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Extension get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) { + ExtensionInner inner = this.serviceClient().get(resourceGroupName, clusterName, arcSettingName, extensionName); + if (inner != null) { + return new ExtensionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName) { + this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, extensionName); + } + + public void delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, arcSettingName, extensionName, context); + } + + public void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionUpgradeParameters extensionUpgradeParameters) { + this.serviceClient() + .upgrade(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters); + } + + public void upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionUpgradeParameters extensionUpgradeParameters, Context context) { + this.serviceClient() + .upgrade(resourceGroupName, clusterName, arcSettingName, extensionName, extensionUpgradeParameters, + context); + } + + public Extension getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String arcSettingName = ResourceManagerUtils.getValueFromIdByName(id, "arcSettings"); + if (arcSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id))); + } + String extensionName = ResourceManagerUtils.getValueFromIdByName(id, "extensions"); + if (extensionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String arcSettingName = ResourceManagerUtils.getValueFromIdByName(id, "arcSettings"); + if (arcSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id))); + } + String extensionName = ResourceManagerUtils.getValueFromIdByName(id, "extensions"); + if (extensionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, arcSettingName, extensionName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String arcSettingName = ResourceManagerUtils.getValueFromIdByName(id, "arcSettings"); + if (arcSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id))); + } + String extensionName = ResourceManagerUtils.getValueFromIdByName(id, "extensions"); + if (extensionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); + } + this.delete(resourceGroupName, clusterName, arcSettingName, extensionName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String arcSettingName = ResourceManagerUtils.getValueFromIdByName(id, "arcSettings"); + if (arcSettingName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'arcSettings'.", id))); + } + String extensionName = ResourceManagerUtils.getValueFromIdByName(id, "extensions"); + if (extensionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); + } + this.delete(resourceGroupName, clusterName, arcSettingName, extensionName, context); + } + + private ExtensionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public ExtensionImpl define(String name) { + return new ExtensionImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesImpl.java index 8bf29ac11b7e5..ce43e7a72c719 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesImpl.java @@ -11,10 +11,10 @@ import com.azure.resourcemanager.azurestackhci.models.CloudInitDataSource; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.GalleryImageIdentifier; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageStatus; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersion; import com.azure.resourcemanager.azurestackhci.models.GalleryImages; +import com.azure.resourcemanager.azurestackhci.models.GalleryImageStatus; import com.azure.resourcemanager.azurestackhci.models.GalleryImagesUpdateRequest; +import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersion; import com.azure.resourcemanager.azurestackhci.models.HyperVGeneration; import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum; @@ -127,20 +127,16 @@ public GalleryImagesImpl withExistingResourceGroup(String resourceGroupName) { } public GalleryImages create() { - this.innerObject = - serviceManager - .serviceClient() - .getGalleryImagesOperations() - .createOrUpdate(resourceGroupName, galleryImageName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getGalleryImagesOperations() + .createOrUpdate(resourceGroupName, galleryImageName, this.innerModel(), Context.NONE); return this; } public GalleryImages create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGalleryImagesOperations() - .createOrUpdate(resourceGroupName, galleryImageName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getGalleryImagesOperations() + .createOrUpdate(resourceGroupName, galleryImageName, this.innerModel(), context); return this; } @@ -156,48 +152,40 @@ public GalleryImagesImpl update() { } public GalleryImages apply() { - this.innerObject = - serviceManager - .serviceClient() - .getGalleryImagesOperations() - .update(resourceGroupName, galleryImageName, updateGalleryImages, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getGalleryImagesOperations() + .update(resourceGroupName, galleryImageName, updateGalleryImages, Context.NONE); return this; } public GalleryImages apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGalleryImagesOperations() - .update(resourceGroupName, galleryImageName, updateGalleryImages, context); + this.innerObject = serviceManager.serviceClient() + .getGalleryImagesOperations() + .update(resourceGroupName, galleryImageName, updateGalleryImages, context); return this; } - GalleryImagesImpl( - GalleryImagesInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + GalleryImagesImpl(GalleryImagesInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.galleryImageName = Utils.getValueFromIdByName(innerObject.id(), "galleryImages"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.galleryImageName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "galleryImages"); } public GalleryImages refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getGalleryImagesOperations() - .getByResourceGroupWithResponse(resourceGroupName, galleryImageName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getGalleryImagesOperations() + .getByResourceGroupWithResponse(resourceGroupName, galleryImageName, Context.NONE) + .getValue(); return this; } public GalleryImages refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGalleryImagesOperations() - .getByResourceGroupWithResponse(resourceGroupName, galleryImageName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getGalleryImagesOperations() + .getByResourceGroupWithResponse(resourceGroupName, galleryImageName, context) + .getValue(); return this; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesOperationsClientImpl.java index 9a81faad20aba..7f639253eab86 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesOperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesOperationsClientImpl.java @@ -40,23 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in GalleryImagesOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in GalleryImagesOperationsClient. + */ public final class GalleryImagesOperationsClientImpl implements GalleryImagesOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final GalleryImagesOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of GalleryImagesOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ GalleryImagesOperationsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create(GalleryImagesOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(GalleryImagesOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -67,112 +72,84 @@ public final class GalleryImagesOperationsClientImpl implements GalleryImagesOpe @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientG") public interface GalleryImagesOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryImageName") String galleryImageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("galleryImageName") String galleryImageName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryImageName") String galleryImageName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GalleryImagesInner galleryImages, - @HeaderParam("Accept") String accept, + @PathParam("galleryImageName") String galleryImageName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") GalleryImagesInner galleryImages, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryImageName") String galleryImageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("galleryImageName") String galleryImageName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("galleryImageName") String galleryImageName, - @QueryParam("api-version") String apiVersion, + @PathParam("galleryImageName") String galleryImageName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") GalleryImagesUpdateRequest galleryImages, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/galleryImages") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,19 +158,15 @@ Mono> listAllNext( * @return a gallery image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String galleryImageName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String galleryImageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -206,22 +179,14 @@ private Mono> getByResourceGroupWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryImageName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryImageName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -231,19 +196,15 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a gallery image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String galleryImageName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String galleryImageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -255,20 +216,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryImageName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryImageName, this.client.getApiVersion(), accept, context); } /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,7 +238,7 @@ private Mono getByResourceGroupAsync(String resourceGroupNam /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -294,14 +248,14 @@ private Mono getByResourceGroupAsync(String resourceGroupNam * @return a gallery image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String galleryImageName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String galleryImageName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, galleryImageName, context).block(); } /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -317,30 +271,26 @@ public GalleryImagesInner getByResourceGroup(String resourceGroupName, String ga /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gallery images resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the gallery images resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String galleryImageName, GalleryImagesInner galleryImages) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -357,25 +307,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryImageName, - this.client.getApiVersion(), - galleryImages, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryImageName, this.client.getApiVersion(), galleryImages, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -383,23 +323,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gallery images resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the gallery images resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String galleryImageName, GalleryImagesInner galleryImages, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -416,22 +352,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryImageName, - this.client.getApiVersion(), - galleryImages, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryImageName, this.client.getApiVersion(), galleryImages, accept, context); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -441,24 +369,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GalleryImagesInner> beginCreateOrUpdateAsync( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, galleryImageName, galleryImages); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - GalleryImagesInner.class, - GalleryImagesInner.class, - this.client.getContext()); + private PollerFlux, GalleryImagesInner> + beginCreateOrUpdateAsync(String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, galleryImageName, galleryImages); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GalleryImagesInner.class, GalleryImagesInner.class, this.client.getContext()); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -472,18 +394,16 @@ private PollerFlux, GalleryImagesInner> beginCrea private PollerFlux, GalleryImagesInner> beginCreateOrUpdateAsync( String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, galleryImageName, galleryImages, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), GalleryImagesInner.class, GalleryImagesInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, galleryImageName, galleryImages, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GalleryImagesInner.class, GalleryImagesInner.class, context); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -493,15 +413,15 @@ private PollerFlux, GalleryImagesInner> beginCrea * @return the {@link SyncPoller} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GalleryImagesInner> beginCreateOrUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages) { + public SyncPoller, GalleryImagesInner> beginCreateOrUpdate(String resourceGroupName, + String galleryImageName, GalleryImagesInner galleryImages) { return this.beginCreateOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages).getSyncPoller(); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -512,17 +432,16 @@ public SyncPoller, GalleryImagesInner> beginCreat * @return the {@link SyncPoller} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GalleryImagesInner> beginCreateOrUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages, context) + public SyncPoller, GalleryImagesInner> beginCreateOrUpdate(String resourceGroupName, + String galleryImageName, GalleryImagesInner galleryImages, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages, context) .getSyncPoller(); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -532,17 +451,16 @@ public SyncPoller, GalleryImagesInner> beginCreat * @return the gallery images resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages) { - return beginCreateOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String galleryImageName, + GalleryImagesInner galleryImages) { + return beginCreateOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -553,17 +471,16 @@ private Mono createOrUpdateAsync( * @return the gallery images resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String galleryImageName, + GalleryImagesInner galleryImages, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -573,15 +490,15 @@ private Mono createOrUpdateAsync( * @return the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImagesInner createOrUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages) { + public GalleryImagesInner createOrUpdate(String resourceGroupName, String galleryImageName, + GalleryImagesInner galleryImages) { return createOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages).block(); } /** * The operation to create or update a gallery image. Please note some properties can be set only during gallery * image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource definition. @@ -592,14 +509,14 @@ public GalleryImagesInner createOrUpdate( * @return the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImagesInner createOrUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesInner galleryImages, Context context) { + public GalleryImagesInner createOrUpdate(String resourceGroupName, String galleryImageName, + GalleryImagesInner galleryImages, Context context) { return createOrUpdateAsync(resourceGroupName, galleryImageName, galleryImages, context).block(); } /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -608,19 +525,15 @@ public GalleryImagesInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String galleryImageName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String galleryImageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -632,23 +545,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryImageName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryImageName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -658,19 +562,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String galleryImageName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String galleryImageName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -682,20 +582,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryImageName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryImageName, this.client.getApiVersion(), accept, context); } /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -706,15 +599,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String galleryImageName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, galleryImageName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -724,18 +615,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String galleryImageName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String galleryImageName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, galleryImageName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -750,7 +640,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -760,14 +650,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String galleryImageName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String galleryImageName, + Context context) { return this.beginDeleteAsync(resourceGroupName, galleryImageName, context).getSyncPoller(); } /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -777,14 +667,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String galleryImageName) { - return beginDeleteAsync(resourceGroupName, galleryImageName) - .last() + return beginDeleteAsync(resourceGroupName, galleryImageName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -795,14 +684,13 @@ private Mono deleteAsync(String resourceGroupName, String galleryImageName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String galleryImageName, Context context) { - return beginDeleteAsync(resourceGroupName, galleryImageName, context) - .last() + return beginDeleteAsync(resourceGroupName, galleryImageName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -816,7 +704,7 @@ public void delete(String resourceGroupName, String galleryImageName) { /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -831,30 +719,26 @@ public void delete(String resourceGroupName, String galleryImageName, Context co /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gallery images resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the gallery images resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String galleryImageName, + GalleryImagesUpdateRequest galleryImages) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -871,24 +755,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryImageName, - this.client.getApiVersion(), - galleryImages, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, galleryImageName, this.client.getApiVersion(), galleryImages, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -896,23 +770,19 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 gallery images resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the gallery images resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String galleryImageName, + GalleryImagesUpdateRequest galleryImages, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -929,21 +799,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - galleryImageName, - this.client.getApiVersion(), - galleryImages, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + galleryImageName, this.client.getApiVersion(), galleryImages, accept, context); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -953,23 +815,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GalleryImagesInner> beginUpdateAsync( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, galleryImageName, galleryImages); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - GalleryImagesInner.class, - GalleryImagesInner.class, - this.client.getContext()); + private PollerFlux, GalleryImagesInner> beginUpdateAsync(String resourceGroupName, + String galleryImageName, GalleryImagesUpdateRequest galleryImages) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, galleryImageName, galleryImages); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GalleryImagesInner.class, GalleryImagesInner.class, this.client.getContext()); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -980,20 +836,18 @@ private PollerFlux, GalleryImagesInner> beginUpda * @return the {@link PollerFlux} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GalleryImagesInner> beginUpdateAsync( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context) { + private PollerFlux, GalleryImagesInner> beginUpdateAsync(String resourceGroupName, + String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, galleryImageName, galleryImages, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), GalleryImagesInner.class, GalleryImagesInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, galleryImageName, galleryImages, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GalleryImagesInner.class, GalleryImagesInner.class, context); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -1003,14 +857,14 @@ private PollerFlux, GalleryImagesInner> beginUpda * @return the {@link SyncPoller} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GalleryImagesInner> beginUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages) { + public SyncPoller, GalleryImagesInner> beginUpdate(String resourceGroupName, + String galleryImageName, GalleryImagesUpdateRequest galleryImages) { return this.beginUpdateAsync(resourceGroupName, galleryImageName, galleryImages).getSyncPoller(); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -1021,14 +875,14 @@ public SyncPoller, GalleryImagesInner> beginUpdat * @return the {@link SyncPoller} for polling of the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GalleryImagesInner> beginUpdate( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context) { + public SyncPoller, GalleryImagesInner> beginUpdate(String resourceGroupName, + String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context) { return this.beginUpdateAsync(resourceGroupName, galleryImageName, galleryImages, context).getSyncPoller(); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -1038,16 +892,15 @@ public SyncPoller, GalleryImagesInner> beginUpdat * @return the gallery images resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages) { - return beginUpdateAsync(resourceGroupName, galleryImageName, galleryImages) - .last() + private Mono updateAsync(String resourceGroupName, String galleryImageName, + GalleryImagesUpdateRequest galleryImages) { + return beginUpdateAsync(resourceGroupName, galleryImageName, galleryImages).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -1058,16 +911,15 @@ private Mono updateAsync( * @return the gallery images resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context) { - return beginUpdateAsync(resourceGroupName, galleryImageName, galleryImages, context) - .last() + private Mono updateAsync(String resourceGroupName, String galleryImageName, + GalleryImagesUpdateRequest galleryImages, Context context) { + return beginUpdateAsync(resourceGroupName, galleryImageName, galleryImages, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -1077,14 +929,14 @@ private Mono updateAsync( * @return the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImagesInner update( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages) { + public GalleryImagesInner update(String resourceGroupName, String galleryImageName, + GalleryImagesUpdateRequest galleryImages) { return updateAsync(resourceGroupName, galleryImageName, galleryImages).block(); } /** * The operation to update a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param galleryImages The gallery images resource patch definition. @@ -1095,15 +947,15 @@ public GalleryImagesInner update( * @return the gallery images resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GalleryImagesInner update( - String resourceGroupName, String galleryImageName, GalleryImagesUpdateRequest galleryImages, Context context) { + public GalleryImagesInner update(String resourceGroupName, String galleryImageName, + GalleryImagesUpdateRequest galleryImages, Context context) { return updateAsync(resourceGroupName, galleryImageName, galleryImages, context).block(); } /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1113,16 +965,12 @@ public GalleryImagesInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1130,32 +978,17 @@ private Mono> listByResourceGroupSinglePageAsy } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1164,19 +997,15 @@ private Mono> listByResourceGroupSinglePageAsy * @return list of gallery images along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1185,28 +1014,16 @@ private Mono> listByResourceGroupSinglePageAsy final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1215,14 +1032,14 @@ private Mono> listByResourceGroupSinglePageAsy */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1232,15 +1049,14 @@ private PagedFlux listByResourceGroupAsync(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1255,7 +1071,7 @@ public PagedIterable listByResourceGroup(String resourceGrou /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1271,7 +1087,7 @@ public PagedIterable listByResourceGroup(String resourceGrou /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of gallery images along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -1279,44 +1095,26 @@ public PagedIterable listByResourceGroup(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1326,41 +1124,26 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of gallery images as paginated response with {@link PagedFlux}. @@ -1373,7 +1156,7 @@ private PagedFlux listAsync() { /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1382,14 +1165,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of gallery images as paginated response with {@link PagedIterable}. @@ -1402,7 +1185,7 @@ public PagedIterable list() { /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1416,9 +1199,10 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1430,31 +1214,22 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1467,31 +1242,22 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1503,31 +1269,23 @@ private Mono> listAllNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1540,23 +1298,13 @@ private Mono> listAllNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesOperationsImpl.java index 9a34ef3484cc3..444ba6d5dab10 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesOperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GalleryImagesOperationsImpl.java @@ -21,22 +21,18 @@ public final class GalleryImagesOperationsImpl implements GalleryImagesOperation private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public GalleryImagesOperationsImpl( - GalleryImagesOperationsClient innerClient, + public GalleryImagesOperationsImpl(GalleryImagesOperationsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String galleryImageName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, galleryImageName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String galleryImageName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, galleryImageName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new GalleryImagesImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,96 +58,76 @@ public void delete(String resourceGroupName, String galleryImageName, Context co public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new GalleryImagesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GalleryImagesImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new GalleryImagesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GalleryImagesImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new GalleryImagesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GalleryImagesImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new GalleryImagesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GalleryImagesImpl(inner1, this.manager())); } public GalleryImages getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String galleryImageName = Utils.getValueFromIdByName(id, "galleryImages"); + String galleryImageName = ResourceManagerUtils.getValueFromIdByName(id, "galleryImages"); if (galleryImageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'galleryImages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'galleryImages'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, galleryImageName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String galleryImageName = Utils.getValueFromIdByName(id, "galleryImages"); + String galleryImageName = ResourceManagerUtils.getValueFromIdByName(id, "galleryImages"); if (galleryImageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'galleryImages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'galleryImages'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, galleryImageName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String galleryImageName = Utils.getValueFromIdByName(id, "galleryImages"); + String galleryImageName = ResourceManagerUtils.getValueFromIdByName(id, "galleryImages"); if (galleryImageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'galleryImages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'galleryImages'.", id))); } this.delete(resourceGroupName, galleryImageName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String galleryImageName = Utils.getValueFromIdByName(id, "galleryImages"); + String galleryImageName = ResourceManagerUtils.getValueFromIdByName(id, "galleryImages"); if (galleryImageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'galleryImages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'galleryImages'.", id))); } this.delete(resourceGroupName, galleryImageName, context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentImpl.java index fbe30fe3331fe..3fef803dcb65d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentImpl.java @@ -15,8 +15,8 @@ public final class GuestAgentImpl implements GuestAgent { private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - GuestAgentImpl( - GuestAgentInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + GuestAgentImpl(GuestAgentInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsClientImpl.java index a3d3039baec56..bb7a35b92923d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsClientImpl.java @@ -33,22 +33,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in GuestAgentsClient. */ +/** + * An instance of this class provides access to all the operations defined in GuestAgentsClient. + */ public final class GuestAgentsClientImpl implements GuestAgentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final GuestAgentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of GuestAgentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ GuestAgentsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy.create(GuestAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(GuestAgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,48 +65,39 @@ public final class GuestAgentsClientImpl implements GuestAgentsClient { @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientG") public interface GuestAgentsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, + Mono>> create(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GuestAgentInner body, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") GuestAgentInner body, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents/default") - @ExpectedResponses({202, 204}) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -110,10 +107,8 @@ Mono>> delete( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceUri, GuestAgentInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -123,21 +118,18 @@ private Mono>> createWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,13 +138,11 @@ private Mono>> createWithResponseAsync(String resource * @return defines the GuestAgent along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceUri, GuestAgentInner body, Context context) { + private Mono>> createWithResponseAsync(String resourceUri, GuestAgentInner body, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -162,17 +152,17 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), body, accept, context); + return service.create(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), body, accept, + context); } /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -180,26 +170,20 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of defines the GuestAgent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GuestAgentInner> beginCreateAsync( - String resourceUri, GuestAgentInner body) { + private PollerFlux, GuestAgentInner> beginCreateAsync(String resourceUri, + GuestAgentInner body) { Mono>> mono = createWithResponseAsync(resourceUri, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - GuestAgentInner.class, - GuestAgentInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GuestAgentInner.class, GuestAgentInner.class, this.client.getContext()); } /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -209,23 +193,17 @@ private PollerFlux, GuestAgentInner> beginCreateAsyn private PollerFlux, GuestAgentInner> beginCreateAsync(String resourceUri) { final GuestAgentInner body = null; Mono>> mono = createWithResponseAsync(resourceUri, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - GuestAgentInner.class, - GuestAgentInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GuestAgentInner.class, GuestAgentInner.class, this.client.getContext()); } /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -234,23 +212,21 @@ private PollerFlux, GuestAgentInner> beginCreateAsyn * @return the {@link PollerFlux} for polling of defines the GuestAgent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, GuestAgentInner> beginCreateAsync( - String resourceUri, GuestAgentInner body, Context context) { + private PollerFlux, GuestAgentInner> beginCreateAsync(String resourceUri, + GuestAgentInner body, Context context) { context = this.client.mergeContext(context); Mono>> mono = createWithResponseAsync(resourceUri, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), GuestAgentInner.class, GuestAgentInner.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GuestAgentInner.class, GuestAgentInner.class, context); } /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -264,11 +240,11 @@ public SyncPoller, GuestAgentInner> beginCreate(Stri /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,18 +253,18 @@ public SyncPoller, GuestAgentInner> beginCreate(Stri * @return the {@link SyncPoller} for polling of defines the GuestAgent. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, GuestAgentInner> beginCreate( - String resourceUri, GuestAgentInner body, Context context) { + public SyncPoller, GuestAgentInner> beginCreate(String resourceUri, + GuestAgentInner body, Context context) { return this.beginCreateAsync(resourceUri, body, context).getSyncPoller(); } /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -302,11 +278,11 @@ private Mono createAsync(String resourceUri, GuestAgentInner bo /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -320,11 +296,11 @@ private Mono createAsync(String resourceUri) { /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -339,11 +315,11 @@ private Mono createAsync(String resourceUri, GuestAgentInner bo /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -357,11 +333,11 @@ public GuestAgentInner create(String resourceUri) { /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -376,11 +352,11 @@ public GuestAgentInner create(String resourceUri, GuestAgentInner body, Context /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -389,29 +365,26 @@ public GuestAgentInner create(String resourceUri, GuestAgentInner body, Context @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -421,10 +394,8 @@ private Mono> getWithResponseAsync(String resourceUri) @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -436,11 +407,11 @@ private Mono> getWithResponseAsync(String resourceUri, /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -453,11 +424,11 @@ private Mono getAsync(String resourceUri) { /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -471,11 +442,11 @@ public Response getWithResponse(String resourceUri, Context con /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -488,11 +459,11 @@ public GuestAgentInner get(String resourceUri) { /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -501,30 +472,26 @@ public GuestAgentInner get(String resourceUri) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -534,10 +501,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -549,11 +514,11 @@ private Mono>> deleteWithResponseAsync(String resource /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -562,19 +527,17 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceUri) { Mono>> mono = deleteWithResponseAsync(resourceUri); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -585,18 +548,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceUri) private PollerFlux, Void> beginDeleteAsync(String resourceUri, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceUri, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -609,11 +571,11 @@ public SyncPoller, Void> beginDelete(String resourceUri) { /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -627,11 +589,11 @@ public SyncPoller, Void> beginDelete(String resourceUri, Contex /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -644,11 +606,11 @@ private Mono deleteAsync(String resourceUri) { /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -662,11 +624,11 @@ private Mono deleteAsync(String resourceUri, Context context) { /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -678,11 +640,11 @@ public void delete(String resourceUri) { /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsImpl.java index 9e73baba26567..aeb6c16b20e51 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsImpl.java @@ -20,8 +20,8 @@ public final class GuestAgentsImpl implements GuestAgents { private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public GuestAgentsImpl( - GuestAgentsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + public GuestAgentsImpl(GuestAgentsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -47,10 +47,7 @@ public GuestAgent create(String resourceUri, GuestAgentInner body, Context conte public Response getWithResponse(String resourceUri, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new GuestAgentImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsOperationsClientImpl.java index 85442299b69fc..e3897ac7d31cd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsOperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsOperationsClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.azurestackhci.models.GuestAgentList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in GuestAgentsOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in GuestAgentsOperationsClient. + */ public final class GuestAgentsOperationsClientImpl implements GuestAgentsOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final GuestAgentsOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of GuestAgentsOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ GuestAgentsOperationsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create(GuestAgentsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(GuestAgentsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,35 +62,29 @@ public final class GuestAgentsOperationsClientImpl implements GuestAgentsOperati @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientG") public interface GuestAgentsOperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -94,38 +93,28 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -135,36 +124,26 @@ private Mono> listSinglePageAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -177,11 +156,11 @@ private PagedFlux listAsync(String resourceUri) { /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -190,17 +169,17 @@ private PagedFlux listAsync(String resourceUri) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceUri, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceUri, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -213,11 +192,11 @@ public PagedIterable list(String resourceUri) { /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -231,9 +210,10 @@ public PagedIterable list(String resourceUri, Context context) /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -245,31 +225,22 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -282,23 +253,13 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsOperationsImpl.java index 18c2360cc8e9a..93ceb22218242 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsOperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/GuestAgentsOperationsImpl.java @@ -19,8 +19,7 @@ public final class GuestAgentsOperationsImpl implements GuestAgentsOperations { private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public GuestAgentsOperationsImpl( - GuestAgentsOperationsClient innerClient, + public GuestAgentsOperationsImpl(GuestAgentsOperationsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public GuestAgentsOperationsImpl( public PagedIterable list(String resourceUri) { PagedIterable inner = this.serviceClient().list(resourceUri); - return Utils.mapPage(inner, inner1 -> new GuestAgentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GuestAgentImpl(inner1, this.manager())); } public PagedIterable list(String resourceUri, Context context) { PagedIterable inner = this.serviceClient().list(resourceUri, context); - return Utils.mapPage(inner, inner1 -> new GuestAgentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GuestAgentImpl(inner1, this.manager())); } private GuestAgentsOperationsClient serviceClient() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java new file mode 100644 index 0000000000000..33a21d035448e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HciUpdateImpl.java @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner; +import com.azure.resourcemanager.azurestackhci.models.AvailabilityType; +import com.azure.resourcemanager.azurestackhci.models.HciUpdate; +import com.azure.resourcemanager.azurestackhci.models.HealthState; +import com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo; +import com.azure.resourcemanager.azurestackhci.models.PrecheckResult; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.RebootRequirement; +import com.azure.resourcemanager.azurestackhci.models.State; +import com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class HciUpdateImpl implements HciUpdate, HciUpdate.Definition, HciUpdate.Update { + private HciUpdateInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public OffsetDateTime installedDate() { + return this.innerModel().installedDate(); + } + + public String description() { + return this.innerModel().description(); + } + + public State state() { + return this.innerModel().state(); + } + + public List prerequisites() { + List inner = this.innerModel().prerequisites(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List componentVersions() { + List inner = this.innerModel().componentVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public RebootRequirement rebootRequired() { + return this.innerModel().rebootRequired(); + } + + public HealthState healthState() { + return this.innerModel().healthState(); + } + + public List healthCheckResult() { + List inner = this.innerModel().healthCheckResult(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OffsetDateTime healthCheckDate() { + return this.innerModel().healthCheckDate(); + } + + public String packagePath() { + return this.innerModel().packagePath(); + } + + public Float packageSizeInMb() { + return this.innerModel().packageSizeInMb(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String version() { + return this.innerModel().version(); + } + + public String publisher() { + return this.innerModel().publisher(); + } + + public String releaseLink() { + return this.innerModel().releaseLink(); + } + + public AvailabilityType availabilityType() { + return this.innerModel().availabilityType(); + } + + public String packageType() { + return this.innerModel().packageType(); + } + + public String additionalProperties() { + return this.innerModel().additionalProperties(); + } + + public Float progressPercentage() { + return this.innerModel().progressPercentage(); + } + + public String notifyMessage() { + return this.innerModel().notifyMessage(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public HciUpdateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String updateName; + + public HciUpdateImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public HciUpdate create() { + this.innerObject = serviceManager.serviceClient() + .getUpdates() + .putWithResponse(resourceGroupName, clusterName, updateName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public HciUpdate create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getUpdates() + .putWithResponse(resourceGroupName, clusterName, updateName, this.innerModel(), context) + .getValue(); + return this; + } + + HciUpdateImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new HciUpdateInner(); + this.serviceManager = serviceManager; + this.updateName = name; + } + + public HciUpdateImpl update() { + return this; + } + + public HciUpdate apply() { + this.innerObject = serviceManager.serviceClient() + .getUpdates() + .putWithResponse(resourceGroupName, clusterName, updateName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public HciUpdate apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getUpdates() + .putWithResponse(resourceGroupName, clusterName, updateName, this.innerModel(), context) + .getValue(); + return this; + } + + HciUpdateImpl(HciUpdateInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.updateName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "updates"); + } + + public HciUpdate refresh() { + this.innerObject = serviceManager.serviceClient() + .getUpdates() + .getWithResponse(resourceGroupName, clusterName, updateName, Context.NONE) + .getValue(); + return this; + } + + public HciUpdate refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getUpdates() + .getWithResponse(resourceGroupName, clusterName, updateName, context) + .getValue(); + return this; + } + + public void post() { + serviceManager.updates().post(resourceGroupName, clusterName, updateName); + } + + public void post(Context context) { + serviceManager.updates().post(resourceGroupName, clusterName, updateName, context); + } + + public HciUpdateImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public HciUpdateImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public HciUpdateImpl withInstalledDate(OffsetDateTime installedDate) { + this.innerModel().withInstalledDate(installedDate); + return this; + } + + public HciUpdateImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public HciUpdateImpl withState(State state) { + this.innerModel().withState(state); + return this; + } + + public HciUpdateImpl withPrerequisites(List prerequisites) { + this.innerModel().withPrerequisites(prerequisites); + return this; + } + + public HciUpdateImpl withComponentVersions(List componentVersions) { + this.innerModel().withComponentVersions(componentVersions); + return this; + } + + public HciUpdateImpl withRebootRequired(RebootRequirement rebootRequired) { + this.innerModel().withRebootRequired(rebootRequired); + return this; + } + + public HciUpdateImpl withHealthState(HealthState healthState) { + this.innerModel().withHealthState(healthState); + return this; + } + + public HciUpdateImpl withHealthCheckResult(List healthCheckResult) { + this.innerModel().withHealthCheckResult(healthCheckResult); + return this; + } + + public HciUpdateImpl withHealthCheckDate(OffsetDateTime healthCheckDate) { + this.innerModel().withHealthCheckDate(healthCheckDate); + return this; + } + + public HciUpdateImpl withPackagePath(String packagePath) { + this.innerModel().withPackagePath(packagePath); + return this; + } + + public HciUpdateImpl withPackageSizeInMb(Float packageSizeInMb) { + this.innerModel().withPackageSizeInMb(packageSizeInMb); + return this; + } + + public HciUpdateImpl withDisplayName(String displayName) { + this.innerModel().withDisplayName(displayName); + return this; + } + + public HciUpdateImpl withVersion(String version) { + this.innerModel().withVersion(version); + return this; + } + + public HciUpdateImpl withPublisher(String publisher) { + this.innerModel().withPublisher(publisher); + return this; + } + + public HciUpdateImpl withReleaseLink(String releaseLink) { + this.innerModel().withReleaseLink(releaseLink); + return this; + } + + public HciUpdateImpl withAvailabilityType(AvailabilityType availabilityType) { + this.innerModel().withAvailabilityType(availabilityType); + return this; + } + + public HciUpdateImpl withPackageType(String packageType) { + this.innerModel().withPackageType(packageType); + return this; + } + + public HciUpdateImpl withAdditionalProperties(String additionalProperties) { + this.innerModel().withAdditionalProperties(additionalProperties); + return this; + } + + public HciUpdateImpl withProgressPercentage(Float progressPercentage) { + this.innerModel().withProgressPercentage(progressPercentage); + return this; + } + + public HciUpdateImpl withNotifyMessage(String notifyMessage) { + this.innerModel().withNotifyMessage(notifyMessage); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadataImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadataImpl.java index ec64a1173c038..fd0f5433e610b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadataImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadataImpl.java @@ -14,8 +14,7 @@ public final class HybridIdentityMetadataImpl implements HybridIdentityMetadata private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - HybridIdentityMetadataImpl( - HybridIdentityMetadataInner innerObject, + HybridIdentityMetadataImpl(HybridIdentityMetadataInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadatasClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadatasClientImpl.java index 764f508fc1d2e..0993b36f137a0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadatasClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadatasClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.azurestackhci.models.HybridIdentityMetadataList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in HybridIdentityMetadatasClient. */ +/** + * An instance of this class provides access to all the operations defined in HybridIdentityMetadatasClient. + */ public final class HybridIdentityMetadatasClientImpl implements HybridIdentityMetadatasClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final HybridIdentityMetadatasService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of HybridIdentityMetadatasClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ HybridIdentityMetadatasClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create(HybridIdentityMetadatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(HybridIdentityMetadatasService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,47 +62,38 @@ public final class HybridIdentityMetadatasClientImpl implements HybridIdentityMe @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientH") public interface HybridIdentityMetadatasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata/default") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata/default") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -106,29 +102,26 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -138,10 +131,8 @@ private Mono> getWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -153,11 +144,11 @@ private Mono> getWithResponseAsync(String /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -170,11 +161,11 @@ private Mono getAsync(String resourceUri) { /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -188,11 +179,11 @@ public Response getWithResponse(String resourceUri, /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -205,11 +196,11 @@ public HybridIdentityMetadataInner get(String resourceUri) { /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -218,38 +209,28 @@ public HybridIdentityMetadataInner get(String resourceUri) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -259,36 +240,26 @@ private Mono> listSinglePageAsync(Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -301,11 +272,11 @@ private PagedFlux listAsync(String resourceUri) { /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -314,17 +285,17 @@ private PagedFlux listAsync(String resourceUri) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceUri, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceUri, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -337,11 +308,11 @@ public PagedIterable list(String resourceUri) { /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -355,9 +326,10 @@ public PagedIterable list(String resourceUri, Conte /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -369,31 +341,22 @@ private Mono> listNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -406,23 +369,13 @@ private Mono> listNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadatasImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadatasImpl.java index 4220582fd36d7..402eb800d2243 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadatasImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/HybridIdentityMetadatasImpl.java @@ -21,8 +21,7 @@ public final class HybridIdentityMetadatasImpl implements HybridIdentityMetadata private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public HybridIdentityMetadatasImpl( - HybridIdentityMetadatasClient innerClient, + public HybridIdentityMetadatasImpl(HybridIdentityMetadatasClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,10 +30,7 @@ public HybridIdentityMetadatasImpl( public Response getWithResponse(String resourceUri, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new HybridIdentityMetadataImpl(inner.getValue(), this.manager())); } else { return null; @@ -52,12 +48,12 @@ public HybridIdentityMetadata get(String resourceUri) { public PagedIterable list(String resourceUri) { PagedIterable inner = this.serviceClient().list(resourceUri); - return Utils.mapPage(inner, inner1 -> new HybridIdentityMetadataImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HybridIdentityMetadataImpl(inner1, this.manager())); } public PagedIterable list(String resourceUri, Context context) { PagedIterable inner = this.serviceClient().list(resourceUri, context); - return Utils.mapPage(inner, inner1 -> new HybridIdentityMetadataImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HybridIdentityMetadataImpl(inner1, this.manager())); } private HybridIdentityMetadatasClient serviceClient() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksImpl.java index aae244b6f701f..acaf3c79573a1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksImpl.java @@ -10,8 +10,8 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.LogicalNetworksInner; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.LogicalNetworkPropertiesDhcpOptions; -import com.azure.resourcemanager.azurestackhci.models.LogicalNetworkStatus; import com.azure.resourcemanager.azurestackhci.models.LogicalNetworks; +import com.azure.resourcemanager.azurestackhci.models.LogicalNetworkStatus; import com.azure.resourcemanager.azurestackhci.models.LogicalNetworksUpdateRequest; import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum; import com.azure.resourcemanager.azurestackhci.models.Subnet; @@ -114,20 +114,16 @@ public LogicalNetworksImpl withExistingResourceGroup(String resourceGroupName) { } public LogicalNetworks create() { - this.innerObject = - serviceManager - .serviceClient() - .getLogicalNetworksOperations() - .createOrUpdate(resourceGroupName, logicalNetworkName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getLogicalNetworksOperations() + .createOrUpdate(resourceGroupName, logicalNetworkName, this.innerModel(), Context.NONE); return this; } public LogicalNetworks create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLogicalNetworksOperations() - .createOrUpdate(resourceGroupName, logicalNetworkName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getLogicalNetworksOperations() + .createOrUpdate(resourceGroupName, logicalNetworkName, this.innerModel(), context); return this; } @@ -143,48 +139,40 @@ public LogicalNetworksImpl update() { } public LogicalNetworks apply() { - this.innerObject = - serviceManager - .serviceClient() - .getLogicalNetworksOperations() - .update(resourceGroupName, logicalNetworkName, updateLogicalNetworks, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getLogicalNetworksOperations() + .update(resourceGroupName, logicalNetworkName, updateLogicalNetworks, Context.NONE); return this; } public LogicalNetworks apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLogicalNetworksOperations() - .update(resourceGroupName, logicalNetworkName, updateLogicalNetworks, context); + this.innerObject = serviceManager.serviceClient() + .getLogicalNetworksOperations() + .update(resourceGroupName, logicalNetworkName, updateLogicalNetworks, context); return this; } - LogicalNetworksImpl( - LogicalNetworksInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + LogicalNetworksImpl(LogicalNetworksInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.logicalNetworkName = Utils.getValueFromIdByName(innerObject.id(), "logicalNetworks"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.logicalNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "logicalNetworks"); } public LogicalNetworks refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getLogicalNetworksOperations() - .getByResourceGroupWithResponse(resourceGroupName, logicalNetworkName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getLogicalNetworksOperations() + .getByResourceGroupWithResponse(resourceGroupName, logicalNetworkName, Context.NONE) + .getValue(); return this; } public LogicalNetworks refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLogicalNetworksOperations() - .getByResourceGroupWithResponse(resourceGroupName, logicalNetworkName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getLogicalNetworksOperations() + .getByResourceGroupWithResponse(resourceGroupName, logicalNetworkName, context) + .getValue(); return this; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksOperationsClientImpl.java index 64646c8b705bf..a411bab973c95 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksOperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksOperationsClientImpl.java @@ -40,24 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LogicalNetworksOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LogicalNetworksOperationsClient. + */ public final class LogicalNetworksOperationsClientImpl implements LogicalNetworksOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LogicalNetworksOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of LogicalNetworksOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LogicalNetworksOperationsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create( - LogicalNetworksOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(LogicalNetworksOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -68,134 +72,103 @@ public final class LogicalNetworksOperationsClientImpl implements LogicalNetwork @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientL") public interface LogicalNetworksOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("logicalNetworkName") String logicalNetworkName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("logicalNetworkName") String logicalNetworkName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("logicalNetworkName") String logicalNetworkName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LogicalNetworksInner logicalNetworks, - @HeaderParam("Accept") String accept, + @PathParam("logicalNetworkName") String logicalNetworkName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LogicalNetworksInner logicalNetworks, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("logicalNetworkName") String logicalNetworkName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("logicalNetworkName") String logicalNetworkName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("logicalNetworkName") String logicalNetworkName, - @QueryParam("api-version") String apiVersion, + @PathParam("logicalNetworkName") String logicalNetworkName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LogicalNetworksUpdateRequest logicalNetworks, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/logicalNetworks") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 logical network resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the logical network resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String logicalNetworkName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String logicalNetworkName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -208,45 +181,33 @@ private Mono> getByResourceGroupWithResponseAsync final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - logicalNetworkName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, logicalNetworkName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 logical network resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the logical network resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String logicalNetworkName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String logicalNetworkName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -258,20 +219,13 @@ private Mono> getByResourceGroupWithResponseAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - logicalNetworkName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + logicalNetworkName, this.client.getApiVersion(), accept, context); } /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -287,7 +241,7 @@ private Mono getByResourceGroupAsync(String resourceGroupN /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -297,14 +251,14 @@ private Mono getByResourceGroupAsync(String resourceGroupN * @return the logical network resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String logicalNetworkName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String logicalNetworkName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, logicalNetworkName, context).block(); } /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,30 +274,26 @@ public LogicalNetworksInner getByResourceGroup(String resourceGroupName, String /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 logical network resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the logical network resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String logicalNetworkName, LogicalNetworksInner logicalNetworks) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -361,25 +311,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - logicalNetworkName, - this.client.getApiVersion(), - logicalNetworks, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, logicalNetworkName, this.client.getApiVersion(), logicalNetworks, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -387,23 +327,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 logical network resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the logical network resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -421,22 +357,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - logicalNetworkName, - this.client.getApiVersion(), - logicalNetworks, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + logicalNetworkName, this.client.getApiVersion(), logicalNetworks, accept, context); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -448,22 +376,16 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogicalNetworksInner> beginCreateOrUpdateAsync( String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, logicalNetworkName, logicalNetworks); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogicalNetworksInner.class, - LogicalNetworksInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, logicalNetworkName, logicalNetworks); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LogicalNetworksInner.class, LogicalNetworksInner.class, this.client.getContext()); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -477,18 +399,16 @@ private PollerFlux, LogicalNetworksInner> begin private PollerFlux, LogicalNetworksInner> beginCreateOrUpdateAsync( String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LogicalNetworksInner.class, LogicalNetworksInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LogicalNetworksInner.class, LogicalNetworksInner.class, context); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -498,15 +418,15 @@ private PollerFlux, LogicalNetworksInner> begin * @return the {@link SyncPoller} for polling of the logical network resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LogicalNetworksInner> beginCreateOrUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks) { + public SyncPoller, LogicalNetworksInner> + beginCreateOrUpdate(String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks) { return this.beginCreateOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks).getSyncPoller(); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -519,15 +439,14 @@ public SyncPoller, LogicalNetworksInner> beginC @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogicalNetworksInner> beginCreateOrUpdate( String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context) .getSyncPoller(); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -537,17 +456,16 @@ public SyncPoller, LogicalNetworksInner> beginC * @return the logical network resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks) { - return beginCreateOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String logicalNetworkName, + LogicalNetworksInner logicalNetworks) { + return beginCreateOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -558,17 +476,16 @@ private Mono createOrUpdateAsync( * @return the logical network resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String logicalNetworkName, + LogicalNetworksInner logicalNetworks, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -578,15 +495,15 @@ private Mono createOrUpdateAsync( * @return the logical network resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalNetworksInner createOrUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks) { + public LogicalNetworksInner createOrUpdate(String resourceGroupName, String logicalNetworkName, + LogicalNetworksInner logicalNetworks) { return createOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks).block(); } /** * The operation to create or update a logical network. Please note some properties can be set only during logical * network creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource definition. @@ -597,14 +514,14 @@ public LogicalNetworksInner createOrUpdate( * @return the logical network resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalNetworksInner createOrUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksInner logicalNetworks, Context context) { + public LogicalNetworksInner createOrUpdate(String resourceGroupName, String logicalNetworkName, + LogicalNetworksInner logicalNetworks, Context context) { return createOrUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context).block(); } /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -613,19 +530,15 @@ public LogicalNetworksInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String logicalNetworkName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String logicalNetworkName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -637,23 +550,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - logicalNetworkName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, logicalNetworkName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -663,19 +567,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String logicalNetworkName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String logicalNetworkName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -687,20 +587,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - logicalNetworkName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + logicalNetworkName, this.client.getApiVersion(), accept, context); } /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -711,15 +604,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String logicalNetworkName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, logicalNetworkName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -729,18 +620,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String logicalNetworkName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String logicalNetworkName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, logicalNetworkName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -755,7 +645,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -765,14 +655,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String logicalNetworkName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String logicalNetworkName, + Context context) { return this.beginDeleteAsync(resourceGroupName, logicalNetworkName, context).getSyncPoller(); } /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -782,14 +672,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String logicalNetworkName) { - return beginDeleteAsync(resourceGroupName, logicalNetworkName) - .last() + return beginDeleteAsync(resourceGroupName, logicalNetworkName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -800,14 +689,13 @@ private Mono deleteAsync(String resourceGroupName, String logicalNetworkNa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String logicalNetworkName, Context context) { - return beginDeleteAsync(resourceGroupName, logicalNetworkName, context) - .last() + return beginDeleteAsync(resourceGroupName, logicalNetworkName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -821,7 +709,7 @@ public void delete(String resourceGroupName, String logicalNetworkName) { /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -836,30 +724,26 @@ public void delete(String resourceGroupName, String logicalNetworkName, Context /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 logical network resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the logical network resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -877,24 +761,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - logicalNetworkName, - this.client.getApiVersion(), - logicalNetworks, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, logicalNetworkName, this.client.getApiVersion(), logicalNetworks, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -902,26 +776,19 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 logical network resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the logical network resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String logicalNetworkName, - LogicalNetworksUpdateRequest logicalNetworks, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -939,21 +806,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - logicalNetworkName, - this.client.getApiVersion(), - logicalNetworks, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + logicalNetworkName, this.client.getApiVersion(), logicalNetworks, accept, context); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -965,21 +824,15 @@ private Mono>> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogicalNetworksInner> beginUpdateAsync( String resourceGroupName, String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, logicalNetworkName, logicalNetworks); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogicalNetworksInner.class, - LogicalNetworksInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, logicalNetworkName, logicalNetworks); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LogicalNetworksInner.class, LogicalNetworksInner.class, this.client.getContext()); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -991,22 +844,18 @@ private PollerFlux, LogicalNetworksInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogicalNetworksInner> beginUpdateAsync( - String resourceGroupName, - String logicalNetworkName, - LogicalNetworksUpdateRequest logicalNetworks, + String resourceGroupName, String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LogicalNetworksInner.class, LogicalNetworksInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LogicalNetworksInner.class, LogicalNetworksInner.class, context); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -1016,14 +865,14 @@ private PollerFlux, LogicalNetworksInner> begin * @return the {@link SyncPoller} for polling of the logical network resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LogicalNetworksInner> beginUpdate( - String resourceGroupName, String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks) { + public SyncPoller, LogicalNetworksInner> beginUpdate(String resourceGroupName, + String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks) { return this.beginUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks).getSyncPoller(); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -1034,17 +883,14 @@ public SyncPoller, LogicalNetworksInner> beginU * @return the {@link SyncPoller} for polling of the logical network resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LogicalNetworksInner> beginUpdate( - String resourceGroupName, - String logicalNetworkName, - LogicalNetworksUpdateRequest logicalNetworks, - Context context) { + public SyncPoller, LogicalNetworksInner> beginUpdate(String resourceGroupName, + String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks, Context context) { return this.beginUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context).getSyncPoller(); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -1054,16 +900,15 @@ public SyncPoller, LogicalNetworksInner> beginU * @return the logical network resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks) { - return beginUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks) - .last() + private Mono updateAsync(String resourceGroupName, String logicalNetworkName, + LogicalNetworksUpdateRequest logicalNetworks) { + return beginUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -1074,19 +919,15 @@ private Mono updateAsync( * @return the logical network resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String logicalNetworkName, - LogicalNetworksUpdateRequest logicalNetworks, - Context context) { - return beginUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context) - .last() + private Mono updateAsync(String resourceGroupName, String logicalNetworkName, + LogicalNetworksUpdateRequest logicalNetworks, Context context) { + return beginUpdateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -1096,14 +937,14 @@ private Mono updateAsync( * @return the logical network resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalNetworksInner update( - String resourceGroupName, String logicalNetworkName, LogicalNetworksUpdateRequest logicalNetworks) { + public LogicalNetworksInner update(String resourceGroupName, String logicalNetworkName, + LogicalNetworksUpdateRequest logicalNetworks) { return updateAsync(resourceGroupName, logicalNetworkName, logicalNetworks).block(); } /** * The operation to update a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param logicalNetworks The logical network resource patch definition. @@ -1114,18 +955,15 @@ public LogicalNetworksInner update( * @return the logical network resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogicalNetworksInner update( - String resourceGroupName, - String logicalNetworkName, - LogicalNetworksUpdateRequest logicalNetworks, - Context context) { + public LogicalNetworksInner update(String resourceGroupName, String logicalNetworkName, + LogicalNetworksUpdateRequest logicalNetworks, Context context) { return updateAsync(resourceGroupName, logicalNetworkName, logicalNetworks, context).block(); } /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1135,16 +973,12 @@ public LogicalNetworksInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1152,32 +986,17 @@ private Mono> listByResourceGroupSinglePageA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1186,19 +1005,15 @@ private Mono> listByResourceGroupSinglePageA * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1207,28 +1022,16 @@ private Mono> listByResourceGroupSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1237,14 +1040,14 @@ private Mono> listByResourceGroupSinglePageA */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1254,15 +1057,14 @@ private PagedFlux listByResourceGroupAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1277,7 +1079,7 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1293,7 +1095,7 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @throws 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 PagedResponse} on successful completion of {@link Mono}. @@ -1301,44 +1103,26 @@ public PagedIterable listByResourceGroup(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1348,41 +1132,26 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @throws 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 paginated response with {@link PagedFlux}. @@ -1395,7 +1164,7 @@ private PagedFlux listAsync() { /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1404,14 +1173,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @throws 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 paginated response with {@link PagedIterable}. @@ -1424,7 +1193,7 @@ public PagedIterable list() { /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1438,9 +1207,10 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1452,31 +1222,22 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1489,31 +1250,22 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1525,31 +1277,23 @@ private Mono> listAllNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1562,23 +1306,13 @@ private Mono> listAllNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksOperationsImpl.java index 3c1421450fb72..3d3cd65268134 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksOperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/LogicalNetworksOperationsImpl.java @@ -21,22 +21,18 @@ public final class LogicalNetworksOperationsImpl implements LogicalNetworksOpera private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public LogicalNetworksOperationsImpl( - LogicalNetworksOperationsClient innerClient, + public LogicalNetworksOperationsImpl(LogicalNetworksOperationsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String logicalNetworkName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, logicalNetworkName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String logicalNetworkName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, logicalNetworkName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new LogicalNetworksImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,101 +58,77 @@ public void delete(String resourceGroupName, String logicalNetworkName, Context public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new LogicalNetworksImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogicalNetworksImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new LogicalNetworksImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogicalNetworksImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new LogicalNetworksImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogicalNetworksImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new LogicalNetworksImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LogicalNetworksImpl(inner1, this.manager())); } public LogicalNetworks getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String logicalNetworkName = Utils.getValueFromIdByName(id, "logicalNetworks"); + String logicalNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "logicalNetworks"); if (logicalNetworkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'logicalNetworks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'logicalNetworks'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, logicalNetworkName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String logicalNetworkName = Utils.getValueFromIdByName(id, "logicalNetworks"); + String logicalNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "logicalNetworks"); if (logicalNetworkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'logicalNetworks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'logicalNetworks'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, logicalNetworkName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String logicalNetworkName = Utils.getValueFromIdByName(id, "logicalNetworks"); + String logicalNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "logicalNetworks"); if (logicalNetworkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'logicalNetworks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'logicalNetworks'.", id))); } this.delete(resourceGroupName, logicalNetworkName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String logicalNetworkName = Utils.getValueFromIdByName(id, "logicalNetworks"); + String logicalNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "logicalNetworks"); if (logicalNetworkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'logicalNetworks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'logicalNetworks'.", id))); } this.delete(resourceGroupName, logicalNetworkName, context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesImpl.java index a2b1def6a4a6b..373bd518e9c02 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesImpl.java @@ -13,8 +13,8 @@ import com.azure.resourcemanager.azurestackhci.models.GalleryImageIdentifier; import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersion; import com.azure.resourcemanager.azurestackhci.models.HyperVGeneration; -import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImageStatus; import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImages; +import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImageStatus; import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImagesUpdateRequest; import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum; @@ -124,25 +124,21 @@ public MarketplaceGalleryImagesImpl withExistingResourceGroup(String resourceGro } public MarketplaceGalleryImages create() { - this.innerObject = - serviceManager - .serviceClient() - .getMarketplaceGalleryImagesOperations() - .createOrUpdate(resourceGroupName, marketplaceGalleryImageName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getMarketplaceGalleryImagesOperations() + .createOrUpdate(resourceGroupName, marketplaceGalleryImageName, this.innerModel(), Context.NONE); return this; } public MarketplaceGalleryImages create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMarketplaceGalleryImagesOperations() - .createOrUpdate(resourceGroupName, marketplaceGalleryImageName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getMarketplaceGalleryImagesOperations() + .createOrUpdate(resourceGroupName, marketplaceGalleryImageName, this.innerModel(), context); return this; } - MarketplaceGalleryImagesImpl( - String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + MarketplaceGalleryImagesImpl(String name, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = new MarketplaceGalleryImagesInner(); this.serviceManager = serviceManager; this.marketplaceGalleryImageName = name; @@ -154,49 +150,41 @@ public MarketplaceGalleryImagesImpl update() { } public MarketplaceGalleryImages apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMarketplaceGalleryImagesOperations() - .update(resourceGroupName, marketplaceGalleryImageName, updateMarketplaceGalleryImages, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getMarketplaceGalleryImagesOperations() + .update(resourceGroupName, marketplaceGalleryImageName, updateMarketplaceGalleryImages, Context.NONE); return this; } public MarketplaceGalleryImages apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMarketplaceGalleryImagesOperations() - .update(resourceGroupName, marketplaceGalleryImageName, updateMarketplaceGalleryImages, context); + this.innerObject = serviceManager.serviceClient() + .getMarketplaceGalleryImagesOperations() + .update(resourceGroupName, marketplaceGalleryImageName, updateMarketplaceGalleryImages, context); return this; } - MarketplaceGalleryImagesImpl( - MarketplaceGalleryImagesInner innerObject, + MarketplaceGalleryImagesImpl(MarketplaceGalleryImagesInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.marketplaceGalleryImageName = Utils.getValueFromIdByName(innerObject.id(), "marketplaceGalleryImages"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.marketplaceGalleryImageName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "marketplaceGalleryImages"); } public MarketplaceGalleryImages refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getMarketplaceGalleryImagesOperations() - .getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMarketplaceGalleryImagesOperations() + .getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, Context.NONE) + .getValue(); return this; } public MarketplaceGalleryImages refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMarketplaceGalleryImagesOperations() - .getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMarketplaceGalleryImagesOperations() + .getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, context) + .getValue(); return this; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesOperationsClientImpl.java index bc5a7428dce92..4e274681a5687 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesOperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesOperationsClientImpl.java @@ -44,24 +44,24 @@ * An instance of this class provides access to all the operations defined in MarketplaceGalleryImagesOperationsClient. */ public final class MarketplaceGalleryImagesOperationsClientImpl implements MarketplaceGalleryImagesOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MarketplaceGalleryImagesOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of MarketplaceGalleryImagesOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MarketplaceGalleryImagesOperationsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create( - MarketplaceGalleryImagesOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(MarketplaceGalleryImagesOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -72,112 +72,87 @@ public final class MarketplaceGalleryImagesOperationsClientImpl implements Marke @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientM") public interface MarketplaceGalleryImagesOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("marketplaceGalleryImageName") String marketplaceGalleryImageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("marketplaceGalleryImageName") String marketplaceGalleryImageName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MarketplaceGalleryImagesInner marketplaceGalleryImages, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("marketplaceGalleryImageName") String marketplaceGalleryImageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/{marketplaceGalleryImageName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("marketplaceGalleryImageName") String marketplaceGalleryImageName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -186,49 +161,35 @@ Mono> listAllNext( * @return a marketplace gallery image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String marketplaceGalleryImageName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String marketplaceGalleryImageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (marketplaceGalleryImageName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter marketplaceGalleryImageName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImageName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - marketplaceGalleryImageName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, marketplaceGalleryImageName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -238,46 +199,33 @@ private Mono> getByResourceGroupWithResp * @return a marketplace gallery image along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String marketplaceGalleryImageName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String marketplaceGalleryImageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (marketplaceGalleryImageName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter marketplaceGalleryImageName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImageName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - marketplaceGalleryImageName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + marketplaceGalleryImageName, this.client.getApiVersion(), accept, context); } /** * Gets a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,15 +234,15 @@ private Mono> getByResourceGroupWithResp * @return a marketplace gallery image on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String marketplaceGalleryImageName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String marketplaceGalleryImageName) { return getByResourceGroupWithResponseAsync(resourceGroupName, marketplaceGalleryImageName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -304,14 +252,14 @@ private Mono getByResourceGroupAsync( * @return a marketplace gallery image along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String marketplaceGalleryImageName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String marketplaceGalleryImageName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, context).block(); } /** * Gets a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -320,15 +268,15 @@ public Response getByResourceGroupWithResponse( * @return a marketplace gallery image. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceGalleryImagesInner getByResourceGroup( - String resourceGroupName, String marketplaceGalleryImageName) { + public MarketplaceGalleryImagesInner getByResourceGroup(String resourceGroupName, + String marketplaceGalleryImageName) { return getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, Context.NONE).getValue(); } /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -336,63 +284,45 @@ public MarketplaceGalleryImagesInner getByResourceGroup( * @throws 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 marketplace gallery image resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (marketplaceGalleryImageName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter marketplaceGalleryImageName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImageName is required and cannot be null.")); } if (marketplaceGalleryImages == null) { - return Mono - .error( - new IllegalArgumentException("Parameter marketplaceGalleryImages is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImages is required and cannot be null.")); } else { marketplaceGalleryImages.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - marketplaceGalleryImageName, - this.client.getApiVersion(), - marketplaceGalleryImages, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, marketplaceGalleryImageName, this.client.getApiVersion(), marketplaceGalleryImages, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -401,61 +331,43 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws 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 marketplace gallery image resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (marketplaceGalleryImageName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter marketplaceGalleryImageName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImageName is required and cannot be null.")); } if (marketplaceGalleryImages == null) { - return Mono - .error( - new IllegalArgumentException("Parameter marketplaceGalleryImages is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImages is required and cannot be null.")); } else { marketplaceGalleryImages.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - marketplaceGalleryImageName, - this.client.getApiVersion(), - marketplaceGalleryImages, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + marketplaceGalleryImageName, this.client.getApiVersion(), marketplaceGalleryImages, accept, context); } /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -466,26 +378,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MarketplaceGalleryImagesInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String marketplaceGalleryImageName, + beginCreateOrUpdateAsync(String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MarketplaceGalleryImagesInner.class, - MarketplaceGalleryImagesInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MarketplaceGalleryImagesInner.class, MarketplaceGalleryImagesInner.class, + this.client.getContext()); } /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -497,29 +402,20 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MarketplaceGalleryImagesInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesInner marketplaceGalleryImages, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MarketplaceGalleryImagesInner.class, - MarketplaceGalleryImagesInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + marketplaceGalleryImageName, marketplaceGalleryImages, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MarketplaceGalleryImagesInner.class, MarketplaceGalleryImagesInner.class, + context); } /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -530,18 +426,16 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MarketplaceGalleryImagesInner> beginCreateOrUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, + String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages) + return this.beginCreateOrUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages) .getSyncPoller(); } /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -553,10 +447,8 @@ public SyncPoller, MarketplaceGalleryI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MarketplaceGalleryImagesInner> beginCreateOrUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages, - Context context) { + String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesInner marketplaceGalleryImages, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context) .getSyncPoller(); @@ -565,7 +457,7 @@ public SyncPoller, MarketplaceGalleryI /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -575,19 +467,16 @@ public SyncPoller, MarketplaceGalleryI * @return the marketplace gallery image resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages) { - return beginCreateOrUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, + String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages) { + return beginCreateOrUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -598,21 +487,16 @@ private Mono createOrUpdateAsync( * @return the marketplace gallery image resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, + String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -622,9 +506,7 @@ private Mono createOrUpdateAsync( * @return the marketplace gallery image resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceGalleryImagesInner createOrUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, + public MarketplaceGalleryImagesInner createOrUpdate(String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesInner marketplaceGalleryImages) { return createOrUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages).block(); } @@ -632,7 +514,7 @@ public MarketplaceGalleryImagesInner createOrUpdate( /** * The operation to create or update a marketplace gallery image. Please note some properties can be set only during * marketplace gallery image creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource definition. @@ -643,18 +525,15 @@ public MarketplaceGalleryImagesInner createOrUpdate( * @return the marketplace gallery image resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceGalleryImagesInner createOrUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesInner marketplaceGalleryImages, - Context context) { + public MarketplaceGalleryImagesInner createOrUpdate(String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesInner marketplaceGalleryImages, Context context) { return createOrUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context) .block(); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -663,49 +542,34 @@ public MarketplaceGalleryImagesInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String marketplaceGalleryImageName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String marketplaceGalleryImageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (marketplaceGalleryImageName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter marketplaceGalleryImageName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImageName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - marketplaceGalleryImageName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, marketplaceGalleryImageName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -715,46 +579,33 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String marketplaceGalleryImageName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String marketplaceGalleryImageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (marketplaceGalleryImageName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter marketplaceGalleryImageName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImageName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - marketplaceGalleryImageName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + marketplaceGalleryImageName, this.client.getApiVersion(), accept, context); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -763,18 +614,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String marketplaceGalleryImageName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String marketplaceGalleryImageName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, marketplaceGalleryImageName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -784,19 +633,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String marketplaceGalleryImageName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String marketplaceGalleryImageName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -805,14 +653,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String marketplaceGalleryImageName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, + String marketplaceGalleryImageName) { return this.beginDeleteAsync(resourceGroupName, marketplaceGalleryImageName).getSyncPoller(); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -822,14 +670,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String marketplaceGalleryImageName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String marketplaceGalleryImageName, + Context context) { return this.beginDeleteAsync(resourceGroupName, marketplaceGalleryImageName, context).getSyncPoller(); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -839,14 +687,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String marketplaceGalleryImageName) { - return beginDeleteAsync(resourceGroupName, marketplaceGalleryImageName) - .last() + return beginDeleteAsync(resourceGroupName, marketplaceGalleryImageName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -857,14 +704,13 @@ private Mono deleteAsync(String resourceGroupName, String marketplaceGalle */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String marketplaceGalleryImageName, Context context) { - return beginDeleteAsync(resourceGroupName, marketplaceGalleryImageName, context) - .last() + return beginDeleteAsync(resourceGroupName, marketplaceGalleryImageName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -878,7 +724,7 @@ public void delete(String resourceGroupName, String marketplaceGalleryImageName) /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -893,7 +739,7 @@ public void delete(String resourceGroupName, String marketplaceGalleryImageName, /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -901,62 +747,44 @@ public void delete(String resourceGroupName, String marketplaceGalleryImageName, * @throws 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 marketplace gallery image resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (marketplaceGalleryImageName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter marketplaceGalleryImageName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImageName is required and cannot be null.")); } if (marketplaceGalleryImages == null) { - return Mono - .error( - new IllegalArgumentException("Parameter marketplaceGalleryImages is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImages is required and cannot be null.")); } else { marketplaceGalleryImages.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - marketplaceGalleryImageName, - this.client.getApiVersion(), - marketplaceGalleryImages, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, marketplaceGalleryImageName, this.client.getApiVersion(), marketplaceGalleryImages, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -965,60 +793,43 @@ private Mono>> updateWithResponseAsync( * @throws 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 marketplace gallery image resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, + private Mono>> updateWithResponseAsync(String resourceGroupName, + String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (marketplaceGalleryImageName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter marketplaceGalleryImageName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImageName is required and cannot be null.")); } if (marketplaceGalleryImages == null) { - return Mono - .error( - new IllegalArgumentException("Parameter marketplaceGalleryImages is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter marketplaceGalleryImages is required and cannot be null.")); } else { marketplaceGalleryImages.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - marketplaceGalleryImageName, - this.client.getApiVersion(), - marketplaceGalleryImages, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + marketplaceGalleryImageName, this.client.getApiVersion(), marketplaceGalleryImages, accept, context); } /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -1029,24 +840,18 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MarketplaceGalleryImagesInner> beginUpdateAsync( - String resourceGroupName, - String marketplaceGalleryImageName, + String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MarketplaceGalleryImagesInner.class, - MarketplaceGalleryImagesInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MarketplaceGalleryImagesInner.class, MarketplaceGalleryImagesInner.class, + this.client.getContext()); } /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -1058,26 +863,19 @@ private PollerFlux, MarketplaceGallery */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MarketplaceGalleryImagesInner> beginUpdateAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, - Context context) { + String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MarketplaceGalleryImagesInner.class, - MarketplaceGalleryImagesInner.class, - context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, marketplaceGalleryImageName, + marketplaceGalleryImages, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MarketplaceGalleryImagesInner.class, MarketplaceGalleryImagesInner.class, + context); } /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -1088,17 +886,15 @@ private PollerFlux, MarketplaceGallery */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MarketplaceGalleryImagesInner> beginUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, + String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages) { - return this - .beginUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages) + return this.beginUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages) .getSyncPoller(); } /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -1110,18 +906,15 @@ public SyncPoller, MarketplaceGalleryI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MarketplaceGalleryImagesInner> beginUpdate( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context) + String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, Context context) { + return this.beginUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context) .getSyncPoller(); } /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -1131,18 +924,15 @@ public SyncPoller, MarketplaceGalleryI * @return the marketplace gallery image resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages) { - return beginUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages) - .last() + private Mono updateAsync(String resourceGroupName, + String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages) { + return beginUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -1153,10 +943,8 @@ private Mono updateAsync( * @return the marketplace gallery image resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, + private Mono updateAsync(String resourceGroupName, + String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, Context context) { return beginUpdateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context) .last() @@ -1165,7 +953,7 @@ private Mono updateAsync( /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -1175,16 +963,14 @@ private Mono updateAsync( * @return the marketplace gallery image resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceGalleryImagesInner update( - String resourceGroupName, - String marketplaceGalleryImageName, + public MarketplaceGalleryImagesInner update(String resourceGroupName, String marketplaceGalleryImageName, MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages) { return updateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages).block(); } /** * The operation to update a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param marketplaceGalleryImages The marketplace gallery image resource patch definition. @@ -1195,18 +981,15 @@ public MarketplaceGalleryImagesInner update( * @return the marketplace gallery image resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceGalleryImagesInner update( - String resourceGroupName, - String marketplaceGalleryImageName, - MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, - Context context) { + public MarketplaceGalleryImagesInner update(String resourceGroupName, String marketplaceGalleryImageName, + MarketplaceGalleryImagesUpdateRequest marketplaceGalleryImages, Context context) { return updateAsync(resourceGroupName, marketplaceGalleryImageName, marketplaceGalleryImages, context).block(); } /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1214,19 +997,15 @@ public MarketplaceGalleryImagesInner update( * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1234,32 +1013,17 @@ private Mono> listByResourceGroupSi } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1268,19 +1032,15 @@ private Mono> listByResourceGroupSi * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1289,28 +1049,16 @@ private Mono> listByResourceGroupSi final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1319,14 +1067,14 @@ private Mono> listByResourceGroupSi */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1335,17 +1083,16 @@ private PagedFlux listByResourceGroupAsync(String * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1360,7 +1107,7 @@ public PagedIterable listByResourceGroup(String r /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1376,7 +1123,7 @@ public PagedIterable listByResourceGroup(String r /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @throws 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 PagedResponse} on successful completion of {@link Mono}. @@ -1384,44 +1131,26 @@ public PagedIterable listByResourceGroup(String r @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1431,41 +1160,26 @@ private Mono> listSinglePageAsync() @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @throws 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 paginated response with {@link PagedFlux}. @@ -1478,7 +1192,7 @@ private PagedFlux listAsync() { /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1487,14 +1201,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @throws 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 paginated response with {@link PagedIterable}. @@ -1507,7 +1221,7 @@ public PagedIterable list() { /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1521,9 +1235,10 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1535,31 +1250,22 @@ private Mono> listNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1567,37 +1273,28 @@ private Mono> listNextSinglePageAsy * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1609,31 +1306,23 @@ private Mono> listAllNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1641,29 +1330,19 @@ private Mono> listAllNextSinglePage * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAllNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listAllNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesOperationsImpl.java index 895590ed08068..253aa77719c51 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesOperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/MarketplaceGalleryImagesOperationsImpl.java @@ -21,24 +21,18 @@ public final class MarketplaceGalleryImagesOperationsImpl implements Marketplace private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public MarketplaceGalleryImagesOperationsImpl( - MarketplaceGalleryImagesOperationsClient innerClient, + public MarketplaceGalleryImagesOperationsImpl(MarketplaceGalleryImagesOperationsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String marketplaceGalleryImageName, Context context) { - Response inner = - this - .serviceClient() - .getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String marketplaceGalleryImageName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MarketplaceGalleryImagesImpl(inner.getValue(), this.manager())); } else { return null; @@ -46,8 +40,8 @@ public Response getByResourceGroupWithResponse( } public MarketplaceGalleryImages getByResourceGroup(String resourceGroupName, String marketplaceGalleryImageName) { - MarketplaceGalleryImagesInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, marketplaceGalleryImageName); + MarketplaceGalleryImagesInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, marketplaceGalleryImageName); if (inner != null) { return new MarketplaceGalleryImagesImpl(inner, this.manager()); } else { @@ -64,113 +58,80 @@ public void delete(String resourceGroupName, String marketplaceGalleryImageName, } public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new MarketplaceGalleryImagesImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceGalleryImagesImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new MarketplaceGalleryImagesImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceGalleryImagesImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new MarketplaceGalleryImagesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceGalleryImagesImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new MarketplaceGalleryImagesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceGalleryImagesImpl(inner1, this.manager())); } public MarketplaceGalleryImages getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String marketplaceGalleryImageName = Utils.getValueFromIdByName(id, "marketplaceGalleryImages"); + String marketplaceGalleryImageName = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceGalleryImages"); if (marketplaceGalleryImageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'marketplaceGalleryImages'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceGalleryImages'.", id))); } - return this - .getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, Context.NONE) + return this.getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String marketplaceGalleryImageName = Utils.getValueFromIdByName(id, "marketplaceGalleryImages"); + String marketplaceGalleryImageName = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceGalleryImages"); if (marketplaceGalleryImageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'marketplaceGalleryImages'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceGalleryImages'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, marketplaceGalleryImageName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String marketplaceGalleryImageName = Utils.getValueFromIdByName(id, "marketplaceGalleryImages"); + String marketplaceGalleryImageName = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceGalleryImages"); if (marketplaceGalleryImageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'marketplaceGalleryImages'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceGalleryImages'.", id))); } this.delete(resourceGroupName, marketplaceGalleryImageName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String marketplaceGalleryImageName = Utils.getValueFromIdByName(id, "marketplaceGalleryImages"); + String marketplaceGalleryImageName = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceGalleryImages"); if (marketplaceGalleryImageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'marketplaceGalleryImages'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceGalleryImages'.", id))); } this.delete(resourceGroupName, marketplaceGalleryImageName, context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesImpl.java index 3d4a8fab6f371..861245ba9e7e8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesImpl.java @@ -11,8 +11,8 @@ import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.InterfaceDnsSettings; import com.azure.resourcemanager.azurestackhci.models.IpConfiguration; -import com.azure.resourcemanager.azurestackhci.models.NetworkInterfaceStatus; import com.azure.resourcemanager.azurestackhci.models.NetworkInterfaces; +import com.azure.resourcemanager.azurestackhci.models.NetworkInterfaceStatus; import com.azure.resourcemanager.azurestackhci.models.NetworkInterfacesUpdateRequest; import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum; import java.util.Collections; @@ -115,20 +115,16 @@ public NetworkInterfacesImpl withExistingResourceGroup(String resourceGroupName) } public NetworkInterfaces create() { - this.innerObject = - serviceManager - .serviceClient() - .getNetworkInterfacesOperations() - .createOrUpdate(resourceGroupName, networkInterfaceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getNetworkInterfacesOperations() + .createOrUpdate(resourceGroupName, networkInterfaceName, this.innerModel(), Context.NONE); return this; } public NetworkInterfaces create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getNetworkInterfacesOperations() - .createOrUpdate(resourceGroupName, networkInterfaceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getNetworkInterfacesOperations() + .createOrUpdate(resourceGroupName, networkInterfaceName, this.innerModel(), context); return this; } @@ -144,49 +140,40 @@ public NetworkInterfacesImpl update() { } public NetworkInterfaces apply() { - this.innerObject = - serviceManager - .serviceClient() - .getNetworkInterfacesOperations() - .update(resourceGroupName, networkInterfaceName, updateNetworkInterfaces, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getNetworkInterfacesOperations() + .update(resourceGroupName, networkInterfaceName, updateNetworkInterfaces, Context.NONE); return this; } public NetworkInterfaces apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getNetworkInterfacesOperations() - .update(resourceGroupName, networkInterfaceName, updateNetworkInterfaces, context); + this.innerObject = serviceManager.serviceClient() + .getNetworkInterfacesOperations() + .update(resourceGroupName, networkInterfaceName, updateNetworkInterfaces, context); return this; } - NetworkInterfacesImpl( - NetworkInterfacesInner innerObject, + NetworkInterfacesImpl(NetworkInterfacesInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.networkInterfaceName = Utils.getValueFromIdByName(innerObject.id(), "networkInterfaces"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.networkInterfaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "networkInterfaces"); } public NetworkInterfaces refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getNetworkInterfacesOperations() - .getByResourceGroupWithResponse(resourceGroupName, networkInterfaceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getNetworkInterfacesOperations() + .getByResourceGroupWithResponse(resourceGroupName, networkInterfaceName, Context.NONE) + .getValue(); return this; } public NetworkInterfaces refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getNetworkInterfacesOperations() - .getByResourceGroupWithResponse(resourceGroupName, networkInterfaceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getNetworkInterfacesOperations() + .getByResourceGroupWithResponse(resourceGroupName, networkInterfaceName, context) + .getValue(); return this; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesOperationsClientImpl.java index cbe151fc07907..f3d0df31366b9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesOperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesOperationsClientImpl.java @@ -40,24 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in NetworkInterfacesOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in NetworkInterfacesOperationsClient. + */ public final class NetworkInterfacesOperationsClientImpl implements NetworkInterfacesOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final NetworkInterfacesOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of NetworkInterfacesOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ NetworkInterfacesOperationsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create( - NetworkInterfacesOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(NetworkInterfacesOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -68,112 +72,87 @@ public final class NetworkInterfacesOperationsClientImpl implements NetworkInter @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientN") public interface NetworkInterfacesOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkInterfaceName") String networkInterfaceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkInterfaceName") String networkInterfaceName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") NetworkInterfacesInner networkInterfaces, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkInterfaceName") String networkInterfaceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("networkInterfaceName") String networkInterfaceName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") NetworkInterfacesUpdateRequest networkInterfaces, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/networkInterfaces") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,19 +161,15 @@ Mono> listAllNext( * @return a network interface along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String networkInterfaceName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkInterfaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -207,22 +182,14 @@ private Mono> getByResourceGroupWithResponseAsy final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - networkInterfaceName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, networkInterfaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -232,19 +199,15 @@ private Mono> getByResourceGroupWithResponseAsy * @return a network interface along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String networkInterfaceName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String networkInterfaceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -256,20 +219,13 @@ private Mono> getByResourceGroupWithResponseAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - networkInterfaceName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + networkInterfaceName, this.client.getApiVersion(), accept, context); } /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -278,15 +234,15 @@ private Mono> getByResourceGroupWithResponseAsy * @return a network interface on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String networkInterfaceName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String networkInterfaceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, networkInterfaceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -296,14 +252,14 @@ private Mono getByResourceGroupAsync( * @return a network interface along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String networkInterfaceName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkInterfaceName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, networkInterfaceName, context).block(); } /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,30 +275,26 @@ public NetworkInterfacesInner getByResourceGroup(String resourceGroupName, Strin /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 network interface resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the network interface resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesInner networkInterfaces) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -360,25 +312,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - networkInterfaceName, - this.client.getApiVersion(), - networkInterfaces, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, networkInterfaceName, this.client.getApiVersion(), networkInterfaces, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -386,26 +329,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 network interface resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the network interface resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesInner networkInterfaces, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesInner networkInterfaces, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -423,22 +359,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - networkInterfaceName, - this.client.getApiVersion(), - networkInterfaces, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + networkInterfaceName, this.client.getApiVersion(), networkInterfaces, accept, context); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -450,22 +378,17 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkInterfacesInner> beginCreateOrUpdateAsync( String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, networkInterfaceName, networkInterfaces); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NetworkInterfacesInner.class, - NetworkInterfacesInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, networkInterfaceName, networkInterfaces); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkInterfacesInner.class, NetworkInterfacesInner.class, + this.client.getContext()); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -477,27 +400,19 @@ private PollerFlux, NetworkInterfacesInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkInterfacesInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesInner networkInterfaces, + String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NetworkInterfacesInner.class, - NetworkInterfacesInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkInterfacesInner.class, NetworkInterfacesInner.class, context); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -509,15 +424,14 @@ private PollerFlux, NetworkInterfacesInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkInterfacesInner> beginCreateOrUpdate( String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces) + return this.beginCreateOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces) .getSyncPoller(); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -529,19 +443,16 @@ public SyncPoller, NetworkInterfacesInner> be */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkInterfacesInner> beginCreateOrUpdate( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesInner networkInterfaces, + String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context) .getSyncPoller(); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -551,17 +462,16 @@ public SyncPoller, NetworkInterfacesInner> be * @return the network interface resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces) { - return beginCreateOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesInner networkInterfaces) { + return beginCreateOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -572,20 +482,16 @@ private Mono createOrUpdateAsync( * @return the network interface resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesInner networkInterfaces, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesInner networkInterfaces, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -595,15 +501,15 @@ private Mono createOrUpdateAsync( * @return the network interface resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfacesInner createOrUpdate( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesInner networkInterfaces) { + public NetworkInterfacesInner createOrUpdate(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesInner networkInterfaces) { return createOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces).block(); } /** * The operation to create or update a network interface. Please note some properties can be set only during network * interface creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource definition. @@ -614,17 +520,14 @@ public NetworkInterfacesInner createOrUpdate( * @return the network interface resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfacesInner createOrUpdate( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesInner networkInterfaces, - Context context) { + public NetworkInterfacesInner createOrUpdate(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesInner networkInterfaces, Context context) { return createOrUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context).block(); } /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -633,19 +536,15 @@ public NetworkInterfacesInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String networkInterfaceName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String networkInterfaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -657,23 +556,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - networkInterfaceName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, networkInterfaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -683,19 +573,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String networkInterfaceName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String networkInterfaceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -707,20 +593,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - networkInterfaceName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + networkInterfaceName, this.client.getApiVersion(), accept, context); } /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -731,15 +610,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkInterfaceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, networkInterfaceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -749,19 +626,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String networkInterfaceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String networkInterfaceName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, networkInterfaceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, networkInterfaceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -776,7 +652,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -786,14 +662,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String networkInterfaceName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String networkInterfaceName, + Context context) { return this.beginDeleteAsync(resourceGroupName, networkInterfaceName, context).getSyncPoller(); } /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -803,14 +679,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String networkInterfaceName) { - return beginDeleteAsync(resourceGroupName, networkInterfaceName) - .last() + return beginDeleteAsync(resourceGroupName, networkInterfaceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -821,14 +696,13 @@ private Mono deleteAsync(String resourceGroupName, String networkInterface */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String networkInterfaceName, Context context) { - return beginDeleteAsync(resourceGroupName, networkInterfaceName, context) - .last() + return beginDeleteAsync(resourceGroupName, networkInterfaceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -842,7 +716,7 @@ public void delete(String resourceGroupName, String networkInterfaceName) { /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -857,30 +731,26 @@ public void delete(String resourceGroupName, String networkInterfaceName, Contex /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 network interface resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the network interface resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -899,23 +769,14 @@ private Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - networkInterfaceName, - this.client.getApiVersion(), - networkInterfaces, - accept, - context)) + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + networkInterfaceName, this.client.getApiVersion(), networkInterfaces, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -923,26 +784,19 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 network interface resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the network interface resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesUpdateRequest networkInterfaces, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -960,21 +814,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - networkInterfaceName, - this.client.getApiVersion(), - networkInterfaces, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + networkInterfaceName, this.client.getApiVersion(), networkInterfaces, accept, context); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -986,21 +832,16 @@ private Mono>> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkInterfacesInner> beginUpdateAsync( String resourceGroupName, String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, networkInterfaceName, networkInterfaces); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NetworkInterfacesInner.class, - NetworkInterfacesInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, networkInterfaceName, networkInterfaces); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkInterfacesInner.class, NetworkInterfacesInner.class, + this.client.getContext()); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -1012,26 +853,18 @@ private PollerFlux, NetworkInterfacesInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NetworkInterfacesInner> beginUpdateAsync( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesUpdateRequest networkInterfaces, + String resourceGroupName, String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NetworkInterfacesInner.class, - NetworkInterfacesInner.class, - context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NetworkInterfacesInner.class, NetworkInterfacesInner.class, context); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -1041,14 +874,14 @@ private PollerFlux, NetworkInterfacesInner> b * @return the {@link SyncPoller} for polling of the network interface resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkInterfacesInner> beginUpdate( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces) { + public SyncPoller, NetworkInterfacesInner> beginUpdate(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces) { return this.beginUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces).getSyncPoller(); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -1059,19 +892,15 @@ public SyncPoller, NetworkInterfacesInner> be * @return the {@link SyncPoller} for polling of the network interface resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NetworkInterfacesInner> beginUpdate( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesUpdateRequest networkInterfaces, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context) + public SyncPoller, NetworkInterfacesInner> beginUpdate(String resourceGroupName, + String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces, Context context) { + return this.beginUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context) .getSyncPoller(); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -1081,16 +910,15 @@ public SyncPoller, NetworkInterfacesInner> be * @return the network interface resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces) { - return beginUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces) - .last() + private Mono updateAsync(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesUpdateRequest networkInterfaces) { + return beginUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -1101,19 +929,15 @@ private Mono updateAsync( * @return the network interface resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesUpdateRequest networkInterfaces, - Context context) { - return beginUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context) - .last() + private Mono updateAsync(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesUpdateRequest networkInterfaces, Context context) { + return beginUpdateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -1123,14 +947,14 @@ private Mono updateAsync( * @return the network interface resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfacesInner update( - String resourceGroupName, String networkInterfaceName, NetworkInterfacesUpdateRequest networkInterfaces) { + public NetworkInterfacesInner update(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesUpdateRequest networkInterfaces) { return updateAsync(resourceGroupName, networkInterfaceName, networkInterfaces).block(); } /** * The operation to update a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param networkInterfaces The network interface resource patch definition. @@ -1141,18 +965,15 @@ public NetworkInterfacesInner update( * @return the network interface resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkInterfacesInner update( - String resourceGroupName, - String networkInterfaceName, - NetworkInterfacesUpdateRequest networkInterfaces, - Context context) { + public NetworkInterfacesInner update(String resourceGroupName, String networkInterfaceName, + NetworkInterfacesUpdateRequest networkInterfaces, Context context) { return updateAsync(resourceGroupName, networkInterfaceName, networkInterfaces, context).block(); } /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1162,16 +983,12 @@ public NetworkInterfacesInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1179,32 +996,17 @@ private Mono> listByResourceGroupSinglePag } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1213,19 +1015,15 @@ private Mono> listByResourceGroupSinglePag * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1234,28 +1032,16 @@ private Mono> listByResourceGroupSinglePag final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1264,14 +1050,14 @@ private Mono> listByResourceGroupSinglePag */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1281,15 +1067,14 @@ private PagedFlux listByResourceGroupAsync(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1304,7 +1089,7 @@ public PagedIterable listByResourceGroup(String resource /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1320,7 +1105,7 @@ public PagedIterable listByResourceGroup(String resource /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @throws 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 PagedResponse} on successful completion of {@link Mono}. @@ -1328,44 +1113,26 @@ public PagedIterable listByResourceGroup(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1375,41 +1142,26 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @throws 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 paginated response with {@link PagedFlux}. @@ -1422,7 +1174,7 @@ private PagedFlux listAsync() { /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1431,14 +1183,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @throws 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 paginated response with {@link PagedIterable}. @@ -1451,7 +1203,7 @@ public PagedIterable list() { /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1465,9 +1217,10 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1479,31 +1232,22 @@ private Mono> listNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1516,31 +1260,22 @@ private Mono> listNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1552,31 +1287,23 @@ private Mono> listAllNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1589,23 +1316,13 @@ private Mono> listAllNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesOperationsImpl.java index b84e1939d5239..2176c18cf58df 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesOperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/NetworkInterfacesOperationsImpl.java @@ -21,22 +21,18 @@ public final class NetworkInterfacesOperationsImpl implements NetworkInterfacesO private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public NetworkInterfacesOperationsImpl( - NetworkInterfacesOperationsClient innerClient, + public NetworkInterfacesOperationsImpl(NetworkInterfacesOperationsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String networkInterfaceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkInterfaceName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String networkInterfaceName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, networkInterfaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new NetworkInterfacesImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,105 +58,77 @@ public void delete(String resourceGroupName, String networkInterfaceName, Contex public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new NetworkInterfacesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkInterfacesImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new NetworkInterfacesImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkInterfacesImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new NetworkInterfacesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkInterfacesImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new NetworkInterfacesImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetworkInterfacesImpl(inner1, this.manager())); } public NetworkInterfaces getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String networkInterfaceName = Utils.getValueFromIdByName(id, "networkInterfaces"); + String networkInterfaceName = ResourceManagerUtils.getValueFromIdByName(id, "networkInterfaces"); if (networkInterfaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'networkInterfaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkInterfaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, networkInterfaceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String networkInterfaceName = Utils.getValueFromIdByName(id, "networkInterfaces"); + String networkInterfaceName = ResourceManagerUtils.getValueFromIdByName(id, "networkInterfaces"); if (networkInterfaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'networkInterfaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkInterfaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, networkInterfaceName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String networkInterfaceName = Utils.getValueFromIdByName(id, "networkInterfaces"); + String networkInterfaceName = ResourceManagerUtils.getValueFromIdByName(id, "networkInterfaces"); if (networkInterfaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'networkInterfaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkInterfaces'.", id))); } this.delete(resourceGroupName, networkInterfaceName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String networkInterfaceName = Utils.getValueFromIdByName(id, "networkInterfaces"); + String networkInterfaceName = ResourceManagerUtils.getValueFromIdByName(id, "networkInterfaces"); if (networkInterfaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'networkInterfaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'networkInterfaces'.", id))); } this.delete(resourceGroupName, networkInterfaceName, context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java new file mode 100644 index 0000000000000..2b1ebff07b918 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OfferImpl.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner; +import com.azure.resourcemanager.azurestackhci.models.Offer; +import com.azure.resourcemanager.azurestackhci.models.SkuMappings; +import java.util.Collections; +import java.util.List; + +public final class OfferImpl implements Offer { + private OfferInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + OfferImpl(OfferInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public String publisherId() { + return this.innerModel().publisherId(); + } + + public String content() { + return this.innerModel().content(); + } + + public String contentVersion() { + return this.innerModel().contentVersion(); + } + + public List skuMappings() { + List inner = this.innerModel().skuMappings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OfferInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java new file mode 100644 index 0000000000000..a87c8e94f2a04 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersClientImpl.java @@ -0,0 +1,740 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azurestackhci.fluent.OffersClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner; +import com.azure.resourcemanager.azurestackhci.models.OfferList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OffersClient. + */ +public final class OffersClientImpl implements OffersClient { + /** + * The proxy service used to perform REST calls. + */ + private final OffersService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of OffersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OffersClientImpl(AzureStackHciClientImpl client) { + this.service = RestProxy.create(OffersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientOffers to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientO") + public interface OffersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPublisher(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("publisherName") String publisherName, @QueryParam("api-version") String apiVersion, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/offers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @QueryParam("$expand") String expand, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, + @QueryParam("api-version") String apiVersion, @QueryParam("$expand") String expand, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPublisherNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClusterNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPublisherSinglePageAsync(String resourceGroupName, String clusterName, + String publisherName, String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByPublisher(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, publisherName, this.client.getApiVersion(), expand, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPublisherSinglePageAsync(String resourceGroupName, String clusterName, + String publisherName, String expand, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPublisher(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + publisherName, this.client.getApiVersion(), expand, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPublisherAsync(String resourceGroupName, String clusterName, + String publisherName, String expand) { + return new PagedFlux<>( + () -> listByPublisherSinglePageAsync(resourceGroupName, clusterName, publisherName, expand), + nextLink -> listByPublisherNextSinglePageAsync(nextLink)); + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPublisherAsync(String resourceGroupName, String clusterName, + String publisherName) { + final String expand = null; + return new PagedFlux<>( + () -> listByPublisherSinglePageAsync(resourceGroupName, clusterName, publisherName, expand), + nextLink -> listByPublisherNextSinglePageAsync(nextLink)); + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPublisherAsync(String resourceGroupName, String clusterName, + String publisherName, String expand, Context context) { + return new PagedFlux<>( + () -> listByPublisherSinglePageAsync(resourceGroupName, clusterName, publisherName, expand, context), + nextLink -> listByPublisherNextSinglePageAsync(nextLink, context)); + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPublisher(String resourceGroupName, String clusterName, + String publisherName) { + final String expand = null; + return new PagedIterable<>(listByPublisherAsync(resourceGroupName, clusterName, publisherName, expand)); + } + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, + String expand, Context context) { + return new PagedIterable<>( + listByPublisherAsync(resourceGroupName, clusterName, publisherName, expand, context)); + } + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, String clusterName, + String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), expand, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, String clusterName, + String expand, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), expand, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, String expand) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + final String expand = null; + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, String expand, + Context context) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, expand, context), + nextLink -> listByClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + final String expand = null; + return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, expand)); + } + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, + Context context) { + return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, expand, context)); + } + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return offer resource details within a publisher of HCI Cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + if (offerName == null) { + return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, publisherName, offerName, this.client.getApiVersion(), expand, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return offer resource details within a publisher of HCI Cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String expand, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + if (offerName == null) { + return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + publisherName, offerName, this.client.getApiVersion(), expand, accept, context); + } + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return offer resource details within a publisher of HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName) { + final String expand = null; + return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, expand) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return offer resource details within a publisher of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context).block(); + } + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return offer resource details within a publisher of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OfferInner get(String resourceGroupName, String clusterName, String publisherName, String offerName) { + final String expand = null; + return getWithResponse(resourceGroupName, clusterName, publisherName, offerName, expand, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPublisherNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByPublisherNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPublisherNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByPublisherNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Offer proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java new file mode 100644 index 0000000000000..7fb259cdce4c7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OffersImpl.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.OffersClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner; +import com.azure.resourcemanager.azurestackhci.models.Offer; +import com.azure.resourcemanager.azurestackhci.models.Offers; + +public final class OffersImpl implements Offers { + private static final ClientLogger LOGGER = new ClientLogger(OffersImpl.class); + + private final OffersClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public OffersImpl(OffersClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName) { + PagedIterable inner + = this.serviceClient().listByPublisher(resourceGroupName, clusterName, publisherName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager())); + } + + public PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, + String expand, Context context) { + PagedIterable inner + = this.serviceClient().listByPublisher(resourceGroupName, clusterName, publisherName, expand, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, + Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, expand, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, clusterName, publisherName, offerName, expand, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OfferImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Offer get(String resourceGroupName, String clusterName, String publisherName, String offerName) { + OfferInner inner = this.serviceClient().get(resourceGroupName, clusterName, publisherName, offerName); + if (inner != null) { + return new OfferImpl(inner, this.manager()); + } else { + return null; + } + } + + private OffersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java deleted file mode 100644 index d118208f0f8cb..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.implementation; - -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; -import com.azure.resourcemanager.azurestackhci.models.ActionType; -import com.azure.resourcemanager.azurestackhci.models.Operation; -import com.azure.resourcemanager.azurestackhci.models.OperationDisplay; -import com.azure.resourcemanager.azurestackhci.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - - OperationImpl( - OperationInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java new file mode 100644 index 0000000000000..27426092a831e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationListResultImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; +import com.azure.resourcemanager.azurestackhci.models.Operation; +import com.azure.resourcemanager.azurestackhci.models.OperationListResult; +import java.util.Collections; +import java.util.List; + +public final class OperationListResultImpl implements OperationListResult { + private OperationListResultInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + OperationListResultImpl(OperationListResultInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public OperationListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java index 388474afc1284..b46ba730b853c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsClientImpl.java @@ -10,42 +10,42 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; -import com.azure.resourcemanager.azurestackhci.models.OperationListResult; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,221 +56,92 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientO") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AzureStackHCI/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** - * List all the supported operations. - * + * List all available Microsoft.AzureStackHCI provider operations. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> listWithResponseAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the supported operations. - * + * List all available Microsoft.AzureStackHCI provider operations. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + private Mono> listWithResponseAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); } /** - * List all the supported operations. - * + * List all available Microsoft.AzureStackHCI provider operations. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all the supported operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List all the supported operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync() { + return listWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List all the supported operations. - * + * List all available Microsoft.AzureStackHCI provider operations. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public Response listWithResponse(Context context) { + return listWithResponseAsync(context).block(); } /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List all available Microsoft.AzureStackHCI provider operations. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + public OperationListResultInner list() { + return listWithResponse(Context.NONE).getValue(); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java index e3113f3f3b1c2..55554d78e9b3b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/OperationsImpl.java @@ -4,12 +4,13 @@ package com.azure.resourcemanager.azurestackhci.implementation; -import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.azurestackhci.fluent.OperationsClient; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; -import com.azure.resourcemanager.azurestackhci.models.Operation; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; +import com.azure.resourcemanager.azurestackhci.models.OperationListResult; import com.azure.resourcemanager.azurestackhci.models.Operations; public final class OperationsImpl implements Operations { @@ -19,20 +20,29 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + public Response listWithResponse(Context context) { + Response inner = this.serviceClient().listWithResponse(context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OperationListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + public OperationListResult list() { + OperationListResultInner inner = this.serviceClient().list(); + if (inner != null) { + return new OperationListResultImpl(inner, this.manager()); + } else { + return null; + } } private OperationsClient serviceClient() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java new file mode 100644 index 0000000000000..f58a4556f483f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PasswordCredentialImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner; +import com.azure.resourcemanager.azurestackhci.models.PasswordCredential; +import java.time.OffsetDateTime; + +public final class PasswordCredentialImpl implements PasswordCredential { + private PasswordCredentialInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + PasswordCredentialImpl(PasswordCredentialInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String secretText() { + return this.innerModel().secretText(); + } + + public String keyId() { + return this.innerModel().keyId(); + } + + public OffsetDateTime startDateTime() { + return this.innerModel().startDateTime(); + } + + public OffsetDateTime endDateTime() { + return this.innerModel().endDateTime(); + } + + public PasswordCredentialInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java new file mode 100644 index 0000000000000..412046443c03a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublisherImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; +import com.azure.resourcemanager.azurestackhci.models.Publisher; + +public final class PublisherImpl implements Publisher { + private PublisherInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + PublisherImpl(PublisherInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public PublisherInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java new file mode 100644 index 0000000000000..ee068997375ee --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersClientImpl.java @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azurestackhci.fluent.PublishersClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; +import com.azure.resourcemanager.azurestackhci.models.PublisherList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PublishersClient. + */ +public final class PublishersClientImpl implements PublishersClient { + /** + * The proxy service used to perform REST calls. + */ + private final PublishersService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of PublishersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PublishersClientImpl(AzureStackHciClientImpl client) { + this.service + = RestProxy.create(PublishersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientPublishers to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientP") + public interface PublishersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCluster(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("publisherName") String publisherName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClusterNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCluster(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByClusterNextSinglePageAsync(nextLink)); + } + + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listByClusterSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listByClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName)); + } + + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(listByClusterAsync(resourceGroupName, clusterName, context)); + } + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publisher resource details of HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, publisherName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publisher resource details of HCI Cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + publisherName, this.client.getApiVersion(), accept, context); + } + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publisher resource details of HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String publisherName) { + return getWithResponseAsync(resourceGroupName, clusterName, publisherName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publisher resource details of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, publisherName, context).block(); + } + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publisher resource details of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublisherInner get(String resourceGroupName, String clusterName, String publisherName) { + return getWithResponse(resourceGroupName, clusterName, publisherName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Publisher proxy resources for the HCI cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClusterNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java new file mode 100644 index 0000000000000..633fca2b64243 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/PublishersImpl.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.PublishersClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; +import com.azure.resourcemanager.azurestackhci.models.Publisher; +import com.azure.resourcemanager.azurestackhci.models.Publishers; + +public final class PublishersImpl implements Publishers { + private static final ClientLogger LOGGER = new ClientLogger(PublishersImpl.class); + + private final PublishersClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public PublishersImpl(PublishersClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().listByCluster(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager())); + } + + public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) { + PagedIterable inner + = this.serviceClient().listByCluster(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, publisherName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PublisherImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Publisher get(String resourceGroupName, String clusterName, String publisherName) { + PublisherInner inner = this.serviceClient().get(resourceGroupName, clusterName, publisherName); + if (inner != null) { + return new PublisherImpl(inner, this.manager()); + } else { + return null; + } + } + + private PublishersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/Utils.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java similarity index 90% rename from sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/Utils.java rename to sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java index 60dd8ee20f6f1..f691c2e09a2e9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/Utils.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { @@ -87,26 +87,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java new file mode 100644 index 0000000000000..068a79ff7f067 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingImpl.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; +import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.SecurityComplianceStatus; +import com.azure.resourcemanager.azurestackhci.models.SecuritySetting; + +public final class SecuritySettingImpl implements SecuritySetting, SecuritySetting.Definition, SecuritySetting.Update { + private SecuritySettingInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ComplianceAssignmentType securedCoreComplianceAssignment() { + return this.innerModel().securedCoreComplianceAssignment(); + } + + public SecurityComplianceStatus securityComplianceStatus() { + return this.innerModel().securityComplianceStatus(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SecuritySettingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String securitySettingsName; + + public SecuritySettingImpl withExistingCluster(String resourceGroupName, String clusterName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + return this; + } + + public SecuritySetting create() { + this.innerObject = serviceManager.serviceClient() + .getSecuritySettings() + .createOrUpdate(resourceGroupName, clusterName, securitySettingsName, this.innerModel(), Context.NONE); + return this; + } + + public SecuritySetting create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSecuritySettings() + .createOrUpdate(resourceGroupName, clusterName, securitySettingsName, this.innerModel(), context); + return this; + } + + SecuritySettingImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new SecuritySettingInner(); + this.serviceManager = serviceManager; + this.securitySettingsName = name; + } + + public SecuritySettingImpl update() { + return this; + } + + public SecuritySetting apply() { + this.innerObject = serviceManager.serviceClient() + .getSecuritySettings() + .createOrUpdate(resourceGroupName, clusterName, securitySettingsName, this.innerModel(), Context.NONE); + return this; + } + + public SecuritySetting apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSecuritySettings() + .createOrUpdate(resourceGroupName, clusterName, securitySettingsName, this.innerModel(), context); + return this; + } + + SecuritySettingImpl(SecuritySettingInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.securitySettingsName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "securitySettings"); + } + + public SecuritySetting refresh() { + this.innerObject = serviceManager.serviceClient() + .getSecuritySettings() + .getWithResponse(resourceGroupName, clusterName, securitySettingsName, Context.NONE) + .getValue(); + return this; + } + + public SecuritySetting refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getSecuritySettings() + .getWithResponse(resourceGroupName, clusterName, securitySettingsName, context) + .getValue(); + return this; + } + + public SecuritySettingImpl + withSecuredCoreComplianceAssignment(ComplianceAssignmentType securedCoreComplianceAssignment) { + this.innerModel().withSecuredCoreComplianceAssignment(securedCoreComplianceAssignment); + return this; + } + + public SecuritySettingImpl withProvisioningState(ProvisioningState provisioningState) { + this.innerModel().withProvisioningState(provisioningState); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java new file mode 100644 index 0000000000000..d48b7f5c20906 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsClientImpl.java @@ -0,0 +1,934 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; +import com.azure.resourcemanager.azurestackhci.models.SecuritySettingListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SecuritySettingsClient. + */ +public final class SecuritySettingsClientImpl implements SecuritySettingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SecuritySettingsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of SecuritySettingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SecuritySettingsClientImpl(AzureStackHciClientImpl client) { + this.service + = RestProxy.create(SecuritySettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientSecuritySettings to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientS") + public interface SecuritySettingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClusters(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("securitySettingsName") String securitySettingsName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("securitySettingsName") String securitySettingsName, + @BodyParam("application/json") SecuritySettingInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/securitySettings/{securitySettingsName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("securitySettingsName") String securitySettingsName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByClustersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a SecuritySetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersSinglePageAsync(String resourceGroupName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a SecuritySetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersSinglePageAsync(String resourceGroupName, + String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByClusters(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a SecuritySetting list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listByClustersNextSinglePageAsync(nextLink)); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a SecuritySetting list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByClustersAsync(String resourceGroupName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listByClustersSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listByClustersNextSinglePageAsync(nextLink, context)); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByClusters(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listByClustersAsync(resourceGroupName, clusterName)); + } + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByClusters(String resourceGroupName, String clusterName, + Context context) { + return new PagedIterable<>(listByClustersAsync(resourceGroupName, clusterName, context)); + } + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a SecuritySetting along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String securitySettingsName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (securitySettingsName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a SecuritySetting along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String securitySettingsName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (securitySettingsName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, securitySettingsName, accept, context); + } + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a SecuritySetting on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, + String securitySettingsName) { + return getWithResponseAsync(resourceGroupName, clusterName, securitySettingsName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a SecuritySetting along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + String securitySettingsName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, context).block(); + } + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a SecuritySetting. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SecuritySettingInner get(String resourceGroupName, String clusterName, String securitySettingsName) { + return getWithResponse(resourceGroupName, clusterName, securitySettingsName, Context.NONE).getValue(); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security settings proxy resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String securitySettingsName, SecuritySettingInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (securitySettingsName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, resource, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security settings proxy resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterName, String securitySettingsName, SecuritySettingInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (securitySettingsName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, resource, accept, + context); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SecuritySettingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SecuritySettingInner.class, SecuritySettingInner.class, this.client.getContext()); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SecuritySettingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SecuritySettingInner.class, SecuritySettingInner.class, context); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SecuritySettingInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource) + .getSyncPoller(); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SecuritySettingInner> beginCreateOrUpdate( + String resourceGroupName, String clusterName, String securitySettingsName, SecuritySettingInner resource, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource, context) + .getSyncPoller(); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security settings proxy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String securitySettingsName, SecuritySettingInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security settings proxy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String clusterName, + String securitySettingsName, SecuritySettingInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SecuritySettingInner createOrUpdate(String resourceGroupName, String clusterName, + String securitySettingsName, SecuritySettingInner resource) { + return createOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource).block(); + } + + /** + * Create a security setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return security settings proxy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SecuritySettingInner createOrUpdate(String resourceGroupName, String clusterName, + String securitySettingsName, SecuritySettingInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, clusterName, securitySettingsName, resource, context).block(); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String securitySettingsName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (securitySettingsName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, clusterName, securitySettingsName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String securitySettingsName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (securitySettingsName == null) { + return Mono + .error(new IllegalArgumentException("Parameter securitySettingsName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, securitySettingsName, accept, context); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String securitySettingsName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, securitySettingsName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String securitySettingsName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, securitySettingsName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String securitySettingsName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, securitySettingsName).getSyncPoller(); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String securitySettingsName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, securitySettingsName, context).getSyncPoller(); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String securitySettingsName) { + return beginDeleteAsync(resourceGroupName, clusterName, securitySettingsName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String securitySettingsName, + Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, securitySettingsName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String securitySettingsName) { + deleteAsync(resourceGroupName, clusterName, securitySettingsName).block(); + } + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context) { + deleteAsync(resourceGroupName, clusterName, securitySettingsName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a SecuritySetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByClustersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of a SecuritySetting list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByClustersNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByClustersNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java new file mode 100644 index 0000000000000..82420589dfaba --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SecuritySettingsImpl.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.SecuritySettingsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; +import com.azure.resourcemanager.azurestackhci.models.SecuritySetting; +import com.azure.resourcemanager.azurestackhci.models.SecuritySettings; + +public final class SecuritySettingsImpl implements SecuritySettings { + private static final ClientLogger LOGGER = new ClientLogger(SecuritySettingsImpl.class); + + private final SecuritySettingsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public SecuritySettingsImpl(SecuritySettingsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByClusters(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().listByClusters(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySettingImpl(inner1, this.manager())); + } + + public PagedIterable listByClusters(String resourceGroupName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByClusters(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SecuritySettingImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, + String securitySettingsName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, securitySettingsName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SecuritySettingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SecuritySetting get(String resourceGroupName, String clusterName, String securitySettingsName) { + SecuritySettingInner inner = this.serviceClient().get(resourceGroupName, clusterName, securitySettingsName); + if (inner != null) { + return new SecuritySettingImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String clusterName, String securitySettingsName) { + this.serviceClient().delete(resourceGroupName, clusterName, securitySettingsName); + } + + public void delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, securitySettingsName, context); + } + + public SecuritySetting getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String securitySettingsName = ResourceManagerUtils.getValueFromIdByName(id, "securitySettings"); + if (securitySettingsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securitySettings'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, securitySettingsName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String securitySettingsName = ResourceManagerUtils.getValueFromIdByName(id, "securitySettings"); + if (securitySettingsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securitySettings'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, securitySettingsName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String securitySettingsName = ResourceManagerUtils.getValueFromIdByName(id, "securitySettings"); + if (securitySettingsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securitySettings'.", id))); + } + this.delete(resourceGroupName, clusterName, securitySettingsName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String securitySettingsName = ResourceManagerUtils.getValueFromIdByName(id, "securitySettings"); + if (securitySettingsName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'securitySettings'.", id))); + } + this.delete(resourceGroupName, clusterName, securitySettingsName, context); + } + + private SecuritySettingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public SecuritySettingImpl define(String name) { + return new SecuritySettingImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java new file mode 100644 index 0000000000000..8a2673751d6ff --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkuImpl.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner; +import com.azure.resourcemanager.azurestackhci.models.Sku; +import com.azure.resourcemanager.azurestackhci.models.SkuMappings; +import java.util.Collections; +import java.util.List; + +public final class SkuImpl implements Sku { + private SkuInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + SkuImpl(SkuInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public String publisherId() { + return this.innerModel().publisherId(); + } + + public String offerId() { + return this.innerModel().offerId(); + } + + public String content() { + return this.innerModel().content(); + } + + public String contentVersion() { + return this.innerModel().contentVersion(); + } + + public List skuMappings() { + List inner = this.innerModel().skuMappings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SkuInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java new file mode 100644 index 0000000000000..1dd4434911d7c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusClientImpl.java @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.azurestackhci.fluent.SkusClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner; +import com.azure.resourcemanager.azurestackhci.models.SkuList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SkusClient. + */ +public final class SkusClientImpl implements SkusClient { + /** + * The proxy service used to perform REST calls. + */ + private final SkusService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of SkusClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SkusClientImpl(AzureStackHciClientImpl client) { + this.service = RestProxy.create(SkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientSkus to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientS") + public interface SkusService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByOffer(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, + @QueryParam("api-version") String apiVersion, @QueryParam("$expand") String expand, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/publishers/{publisherName}/offers/{offerName}/skus/{skuName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("publisherName") String publisherName, @PathParam("offerName") String offerName, + @PathParam("skuName") String skuName, @QueryParam("api-version") String apiVersion, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByOfferNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByOfferSinglePageAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + if (offerName == null) { + return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByOffer(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, publisherName, offerName, this.client.getApiVersion(), expand, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByOfferSinglePageAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String expand, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + if (offerName == null) { + return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByOffer(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + publisherName, offerName, this.client.getApiVersion(), expand, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByOfferAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand) { + return new PagedFlux<>( + () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand), + nextLink -> listByOfferNextSinglePageAsync(nextLink)); + } + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByOfferAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName) { + final String expand = null; + return new PagedFlux<>( + () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand), + nextLink -> listByOfferNextSinglePageAsync(nextLink)); + } + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByOfferAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + return new PagedFlux<>( + () -> listByOfferSinglePageAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context), + nextLink -> listByOfferNextSinglePageAsync(nextLink, context)); + } + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName) { + final String expand = null; + return new PagedIterable<>(listByOfferAsync(resourceGroupName, clusterName, publisherName, offerName, expand)); + } + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + return new PagedIterable<>( + listByOfferAsync(resourceGroupName, clusterName, publisherName, offerName, expand, context)); + } + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sKU resource details within a offer of HCI Cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String skuName, String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + if (offerName == null) { + return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); + } + if (skuName == null) { + return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, publisherName, offerName, skuName, this.client.getApiVersion(), expand, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sKU resource details within a offer of HCI Cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String publisherName, String offerName, String skuName, String expand, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (publisherName == null) { + return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null.")); + } + if (offerName == null) { + return Mono.error(new IllegalArgumentException("Parameter offerName is required and cannot be null.")); + } + if (skuName == null) { + return Mono.error(new IllegalArgumentException("Parameter skuName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + publisherName, offerName, skuName, this.client.getApiVersion(), expand, accept, context); + } + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sKU resource details within a offer of HCI Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String publisherName, + String offerName, String skuName) { + final String expand = null; + return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, skuName, expand) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sKU resource details within a offer of HCI Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String skuName, String expand, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, publisherName, offerName, skuName, expand, context) + .block(); + } + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sKU resource details within a offer of HCI Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SkuInner get(String resourceGroupName, String clusterName, String publisherName, String offerName, + String skuName) { + final String expand = null; + return getWithResponse(resourceGroupName, clusterName, publisherName, offerName, skuName, expand, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByOfferNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByOfferNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of SKU proxy resources for the HCI cluster along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByOfferNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByOfferNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java new file mode 100644 index 0000000000000..e5c630dd246a1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/SkusImpl.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.SkusClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner; +import com.azure.resourcemanager.azurestackhci.models.Sku; +import com.azure.resourcemanager.azurestackhci.models.Skus; + +public final class SkusImpl implements Skus { + private static final ClientLogger LOGGER = new ClientLogger(SkusImpl.class); + + private final SkusClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public SkusImpl(SkusClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName) { + PagedIterable inner + = this.serviceClient().listByOffer(resourceGroupName, clusterName, publisherName, offerName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuImpl(inner1, this.manager())); + } + + public PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context) { + PagedIterable inner = this.serviceClient() + .listByOffer(resourceGroupName, clusterName, publisherName, offerName, expand, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String skuName, String expand, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, clusterName, publisherName, offerName, skuName, expand, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SkuImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Sku get(String resourceGroupName, String clusterName, String publisherName, String offerName, + String skuName) { + SkuInner inner = this.serviceClient().get(resourceGroupName, clusterName, publisherName, offerName, skuName); + if (inner != null) { + return new SkuImpl(inner, this.manager()); + } else { + return null; + } + } + + private SkusClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersImpl.java index abd5a3f5b3ac7..3280dfabb7fc0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersImpl.java @@ -10,8 +10,8 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.StorageContainersInner; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum; -import com.azure.resourcemanager.azurestackhci.models.StorageContainerStatus; import com.azure.resourcemanager.azurestackhci.models.StorageContainers; +import com.azure.resourcemanager.azurestackhci.models.StorageContainerStatus; import com.azure.resourcemanager.azurestackhci.models.StorageContainersUpdateRequest; import java.util.Collections; import java.util.Map; @@ -99,20 +99,16 @@ public StorageContainersImpl withExistingResourceGroup(String resourceGroupName) } public StorageContainers create() { - this.innerObject = - serviceManager - .serviceClient() - .getStorageContainersOperations() - .createOrUpdate(resourceGroupName, storageContainerName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getStorageContainersOperations() + .createOrUpdate(resourceGroupName, storageContainerName, this.innerModel(), Context.NONE); return this; } public StorageContainers create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getStorageContainersOperations() - .createOrUpdate(resourceGroupName, storageContainerName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getStorageContainersOperations() + .createOrUpdate(resourceGroupName, storageContainerName, this.innerModel(), context); return this; } @@ -128,49 +124,40 @@ public StorageContainersImpl update() { } public StorageContainers apply() { - this.innerObject = - serviceManager - .serviceClient() - .getStorageContainersOperations() - .update(resourceGroupName, storageContainerName, updateStorageContainers, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getStorageContainersOperations() + .update(resourceGroupName, storageContainerName, updateStorageContainers, Context.NONE); return this; } public StorageContainers apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getStorageContainersOperations() - .update(resourceGroupName, storageContainerName, updateStorageContainers, context); + this.innerObject = serviceManager.serviceClient() + .getStorageContainersOperations() + .update(resourceGroupName, storageContainerName, updateStorageContainers, context); return this; } - StorageContainersImpl( - StorageContainersInner innerObject, + StorageContainersImpl(StorageContainersInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.storageContainerName = Utils.getValueFromIdByName(innerObject.id(), "storageContainers"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.storageContainerName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "storageContainers"); } public StorageContainers refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getStorageContainersOperations() - .getByResourceGroupWithResponse(resourceGroupName, storageContainerName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getStorageContainersOperations() + .getByResourceGroupWithResponse(resourceGroupName, storageContainerName, Context.NONE) + .getValue(); return this; } public StorageContainers refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getStorageContainersOperations() - .getByResourceGroupWithResponse(resourceGroupName, storageContainerName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getStorageContainersOperations() + .getByResourceGroupWithResponse(resourceGroupName, storageContainerName, context) + .getValue(); return this; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersOperationsClientImpl.java index 2ef81e434cd41..72121f88bda67 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersOperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersOperationsClientImpl.java @@ -40,24 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in StorageContainersOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in StorageContainersOperationsClient. + */ public final class StorageContainersOperationsClientImpl implements StorageContainersOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final StorageContainersOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of StorageContainersOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ StorageContainersOperationsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create( - StorageContainersOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(StorageContainersOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -68,112 +72,87 @@ public final class StorageContainersOperationsClientImpl implements StorageConta @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientS") public interface StorageContainersOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageContainerName") String storageContainerName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageContainerName") String storageContainerName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") StorageContainersInner storageContainers, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageContainerName") String storageContainerName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers/{storageContainerName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storageContainerName") String storageContainerName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") StorageContainersUpdateRequest storageContainers, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/storageContainers") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,19 +161,15 @@ Mono> listAllNext( * @return a storage container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String storageContainerName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String storageContainerName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -207,22 +182,14 @@ private Mono> getByResourceGroupWithResponseAsy final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - storageContainerName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, storageContainerName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -232,19 +199,15 @@ private Mono> getByResourceGroupWithResponseAsy * @return a storage container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String storageContainerName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String storageContainerName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -256,20 +219,13 @@ private Mono> getByResourceGroupWithResponseAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - storageContainerName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + storageContainerName, this.client.getApiVersion(), accept, context); } /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -278,15 +234,15 @@ private Mono> getByResourceGroupWithResponseAsy * @return a storage container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String storageContainerName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String storageContainerName) { return getByResourceGroupWithResponseAsync(resourceGroupName, storageContainerName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -296,14 +252,14 @@ private Mono getByResourceGroupAsync( * @return a storage container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String storageContainerName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String storageContainerName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, storageContainerName, context).block(); } /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,30 +275,26 @@ public StorageContainersInner getByResourceGroup(String resourceGroupName, Strin /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage container resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the storage container resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String storageContainerName, StorageContainersInner storageContainers) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -360,25 +312,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - storageContainerName, - this.client.getApiVersion(), - storageContainers, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, storageContainerName, this.client.getApiVersion(), storageContainers, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -386,26 +329,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage container resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the storage container resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String storageContainerName, - StorageContainersInner storageContainers, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String storageContainerName, StorageContainersInner storageContainers, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -423,22 +359,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - storageContainerName, - this.client.getApiVersion(), - storageContainers, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + storageContainerName, this.client.getApiVersion(), storageContainers, accept, context); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -450,22 +378,17 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageContainersInner> beginCreateOrUpdateAsync( String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, storageContainerName, storageContainers); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - StorageContainersInner.class, - StorageContainersInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, storageContainerName, storageContainers); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), StorageContainersInner.class, StorageContainersInner.class, + this.client.getContext()); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -477,27 +400,19 @@ private PollerFlux, StorageContainersInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageContainersInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String storageContainerName, - StorageContainersInner storageContainers, + String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, storageContainerName, storageContainers, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - StorageContainersInner.class, - StorageContainersInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, storageContainerName, storageContainers, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), StorageContainersInner.class, StorageContainersInner.class, context); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -509,15 +424,14 @@ private PollerFlux, StorageContainersInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageContainersInner> beginCreateOrUpdate( String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers) + return this.beginCreateOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers) .getSyncPoller(); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -529,19 +443,16 @@ public SyncPoller, StorageContainersInner> be */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageContainersInner> beginCreateOrUpdate( - String resourceGroupName, - String storageContainerName, - StorageContainersInner storageContainers, + String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context) .getSyncPoller(); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -551,17 +462,16 @@ public SyncPoller, StorageContainersInner> be * @return the storage container resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers) { - return beginCreateOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String storageContainerName, + StorageContainersInner storageContainers) { + return beginCreateOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -572,20 +482,16 @@ private Mono createOrUpdateAsync( * @return the storage container resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String storageContainerName, - StorageContainersInner storageContainers, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String storageContainerName, + StorageContainersInner storageContainers, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -595,15 +501,15 @@ private Mono createOrUpdateAsync( * @return the storage container resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageContainersInner createOrUpdate( - String resourceGroupName, String storageContainerName, StorageContainersInner storageContainers) { + public StorageContainersInner createOrUpdate(String resourceGroupName, String storageContainerName, + StorageContainersInner storageContainers) { return createOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers).block(); } /** * The operation to create or update a storage container. Please note some properties can be set only during storage * container creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource definition. @@ -614,17 +520,14 @@ public StorageContainersInner createOrUpdate( * @return the storage container resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageContainersInner createOrUpdate( - String resourceGroupName, - String storageContainerName, - StorageContainersInner storageContainers, - Context context) { + public StorageContainersInner createOrUpdate(String resourceGroupName, String storageContainerName, + StorageContainersInner storageContainers, Context context) { return createOrUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context).block(); } /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -633,19 +536,15 @@ public StorageContainersInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String storageContainerName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String storageContainerName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -657,23 +556,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - storageContainerName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, storageContainerName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -683,19 +573,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String storageContainerName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String storageContainerName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -707,20 +593,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - storageContainerName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + storageContainerName, this.client.getApiVersion(), accept, context); } /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -731,15 +610,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String storageContainerName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageContainerName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -749,19 +626,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String storageContainerName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String storageContainerName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, storageContainerName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, storageContainerName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -776,7 +652,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -786,14 +662,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String storageContainerName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String storageContainerName, + Context context) { return this.beginDeleteAsync(resourceGroupName, storageContainerName, context).getSyncPoller(); } /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -803,14 +679,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String storageContainerName) { - return beginDeleteAsync(resourceGroupName, storageContainerName) - .last() + return beginDeleteAsync(resourceGroupName, storageContainerName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -821,14 +696,13 @@ private Mono deleteAsync(String resourceGroupName, String storageContainer */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String storageContainerName, Context context) { - return beginDeleteAsync(resourceGroupName, storageContainerName, context) - .last() + return beginDeleteAsync(resourceGroupName, storageContainerName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -842,7 +716,7 @@ public void delete(String resourceGroupName, String storageContainerName) { /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -857,30 +731,26 @@ public void delete(String resourceGroupName, String storageContainerName, Contex /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage container resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the storage container resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String storageContainerName, StorageContainersUpdateRequest storageContainers) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String storageContainerName, StorageContainersUpdateRequest storageContainers) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -899,23 +769,14 @@ private Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - storageContainerName, - this.client.getApiVersion(), - storageContainers, - accept, - context)) + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + storageContainerName, this.client.getApiVersion(), storageContainers, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -923,26 +784,19 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 storage container resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the storage container resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String storageContainerName, - StorageContainersUpdateRequest storageContainers, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String storageContainerName, StorageContainersUpdateRequest storageContainers, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -960,21 +814,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - storageContainerName, - this.client.getApiVersion(), - storageContainers, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + storageContainerName, this.client.getApiVersion(), storageContainers, accept, context); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -986,21 +832,16 @@ private Mono>> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageContainersInner> beginUpdateAsync( String resourceGroupName, String storageContainerName, StorageContainersUpdateRequest storageContainers) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, storageContainerName, storageContainers); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - StorageContainersInner.class, - StorageContainersInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, storageContainerName, storageContainers); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), StorageContainersInner.class, StorageContainersInner.class, + this.client.getContext()); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -1012,26 +853,18 @@ private PollerFlux, StorageContainersInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageContainersInner> beginUpdateAsync( - String resourceGroupName, - String storageContainerName, - StorageContainersUpdateRequest storageContainers, + String resourceGroupName, String storageContainerName, StorageContainersUpdateRequest storageContainers, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, storageContainerName, storageContainers, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - StorageContainersInner.class, - StorageContainersInner.class, - context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, storageContainerName, storageContainers, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), StorageContainersInner.class, StorageContainersInner.class, context); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -1041,14 +874,14 @@ private PollerFlux, StorageContainersInner> b * @return the {@link SyncPoller} for polling of the storage container resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageContainersInner> beginUpdate( - String resourceGroupName, String storageContainerName, StorageContainersUpdateRequest storageContainers) { + public SyncPoller, StorageContainersInner> beginUpdate(String resourceGroupName, + String storageContainerName, StorageContainersUpdateRequest storageContainers) { return this.beginUpdateAsync(resourceGroupName, storageContainerName, storageContainers).getSyncPoller(); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -1059,19 +892,15 @@ public SyncPoller, StorageContainersInner> be * @return the {@link SyncPoller} for polling of the storage container resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, StorageContainersInner> beginUpdate( - String resourceGroupName, - String storageContainerName, - StorageContainersUpdateRequest storageContainers, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context) + public SyncPoller, StorageContainersInner> beginUpdate(String resourceGroupName, + String storageContainerName, StorageContainersUpdateRequest storageContainers, Context context) { + return this.beginUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context) .getSyncPoller(); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -1081,16 +910,15 @@ public SyncPoller, StorageContainersInner> be * @return the storage container resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String storageContainerName, StorageContainersUpdateRequest storageContainers) { - return beginUpdateAsync(resourceGroupName, storageContainerName, storageContainers) - .last() + private Mono updateAsync(String resourceGroupName, String storageContainerName, + StorageContainersUpdateRequest storageContainers) { + return beginUpdateAsync(resourceGroupName, storageContainerName, storageContainers).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -1101,19 +929,15 @@ private Mono updateAsync( * @return the storage container resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String storageContainerName, - StorageContainersUpdateRequest storageContainers, - Context context) { - return beginUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context) - .last() + private Mono updateAsync(String resourceGroupName, String storageContainerName, + StorageContainersUpdateRequest storageContainers, Context context) { + return beginUpdateAsync(resourceGroupName, storageContainerName, storageContainers, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -1123,14 +947,14 @@ private Mono updateAsync( * @return the storage container resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageContainersInner update( - String resourceGroupName, String storageContainerName, StorageContainersUpdateRequest storageContainers) { + public StorageContainersInner update(String resourceGroupName, String storageContainerName, + StorageContainersUpdateRequest storageContainers) { return updateAsync(resourceGroupName, storageContainerName, storageContainers).block(); } /** * The operation to update a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param storageContainers The storage container resource patch definition. @@ -1141,18 +965,15 @@ public StorageContainersInner update( * @return the storage container resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageContainersInner update( - String resourceGroupName, - String storageContainerName, - StorageContainersUpdateRequest storageContainers, - Context context) { + public StorageContainersInner update(String resourceGroupName, String storageContainerName, + StorageContainersUpdateRequest storageContainers, Context context) { return updateAsync(resourceGroupName, storageContainerName, storageContainers, context).block(); } /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1162,16 +983,12 @@ public StorageContainersInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1179,32 +996,17 @@ private Mono> listByResourceGroupSinglePag } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1213,19 +1015,15 @@ private Mono> listByResourceGroupSinglePag * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1234,28 +1032,16 @@ private Mono> listByResourceGroupSinglePag final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1264,14 +1050,14 @@ private Mono> listByResourceGroupSinglePag */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1281,15 +1067,14 @@ private PagedFlux listByResourceGroupAsync(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1304,7 +1089,7 @@ public PagedIterable listByResourceGroup(String resource /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1320,7 +1105,7 @@ public PagedIterable listByResourceGroup(String resource /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @throws 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 PagedResponse} on successful completion of {@link Mono}. @@ -1328,44 +1113,26 @@ public PagedIterable listByResourceGroup(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1375,41 +1142,26 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @throws 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 paginated response with {@link PagedFlux}. @@ -1422,7 +1174,7 @@ private PagedFlux listAsync() { /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1431,14 +1183,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @throws 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 paginated response with {@link PagedIterable}. @@ -1451,7 +1203,7 @@ public PagedIterable list() { /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1465,9 +1217,10 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1479,31 +1232,22 @@ private Mono> listNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1516,31 +1260,22 @@ private Mono> listNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1552,31 +1287,23 @@ private Mono> listAllNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1589,23 +1316,13 @@ private Mono> listAllNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersOperationsImpl.java index 307033ff61132..300df79793d5e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersOperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/StorageContainersOperationsImpl.java @@ -21,22 +21,18 @@ public final class StorageContainersOperationsImpl implements StorageContainersO private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public StorageContainersOperationsImpl( - StorageContainersOperationsClient innerClient, + public StorageContainersOperationsImpl(StorageContainersOperationsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String storageContainerName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, storageContainerName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String storageContainerName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, storageContainerName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new StorageContainersImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,105 +58,77 @@ public void delete(String resourceGroupName, String storageContainerName, Contex public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new StorageContainersImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageContainersImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new StorageContainersImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageContainersImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new StorageContainersImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageContainersImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new StorageContainersImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageContainersImpl(inner1, this.manager())); } public StorageContainers getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String storageContainerName = Utils.getValueFromIdByName(id, "storageContainers"); + String storageContainerName = ResourceManagerUtils.getValueFromIdByName(id, "storageContainers"); if (storageContainerName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'storageContainers'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storageContainers'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, storageContainerName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String storageContainerName = Utils.getValueFromIdByName(id, "storageContainers"); + String storageContainerName = ResourceManagerUtils.getValueFromIdByName(id, "storageContainers"); if (storageContainerName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'storageContainers'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storageContainers'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, storageContainerName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String storageContainerName = Utils.getValueFromIdByName(id, "storageContainers"); + String storageContainerName = ResourceManagerUtils.getValueFromIdByName(id, "storageContainers"); if (storageContainerName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'storageContainers'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storageContainers'.", id))); } this.delete(resourceGroupName, storageContainerName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String storageContainerName = Utils.getValueFromIdByName(id, "storageContainers"); + String storageContainerName = ResourceManagerUtils.getValueFromIdByName(id, "storageContainers"); if (storageContainerName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'storageContainers'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storageContainers'.", id))); } this.delete(resourceGroupName, storageContainerName, context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java new file mode 100644 index 0000000000000..94215f56b410c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunImpl.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.Step; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.UpdateRun; +import com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class UpdateRunImpl implements UpdateRun, UpdateRun.Definition, UpdateRun.Update { + private UpdateRunInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public OffsetDateTime timeStarted() { + return this.innerModel().timeStarted(); + } + + public OffsetDateTime lastUpdatedTime() { + return this.innerModel().lastUpdatedTime(); + } + + public String duration() { + return this.innerModel().duration(); + } + + public UpdateRunPropertiesState state() { + return this.innerModel().state(); + } + + public String namePropertiesName() { + return this.innerModel().namePropertiesName(); + } + + public String description() { + return this.innerModel().description(); + } + + public String errorMessage() { + return this.innerModel().errorMessage(); + } + + public String status() { + return this.innerModel().status(); + } + + public OffsetDateTime startTimeUtc() { + return this.innerModel().startTimeUtc(); + } + + public OffsetDateTime endTimeUtc() { + return this.innerModel().endTimeUtc(); + } + + public OffsetDateTime lastUpdatedTimeUtc() { + return this.innerModel().lastUpdatedTimeUtc(); + } + + public List steps() { + List inner = this.innerModel().steps(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public UpdateRunInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String clusterName; + + private String updateName; + + private String updateRunName; + + public UpdateRunImpl withExistingUpdate(String resourceGroupName, String clusterName, String updateName) { + this.resourceGroupName = resourceGroupName; + this.clusterName = clusterName; + this.updateName = updateName; + return this; + } + + public UpdateRun create() { + this.innerObject = serviceManager.serviceClient() + .getUpdateRuns() + .putWithResponse(resourceGroupName, clusterName, updateName, updateRunName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public UpdateRun create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getUpdateRuns() + .putWithResponse(resourceGroupName, clusterName, updateName, updateRunName, this.innerModel(), context) + .getValue(); + return this; + } + + UpdateRunImpl(String name, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = new UpdateRunInner(); + this.serviceManager = serviceManager; + this.updateRunName = name; + } + + public UpdateRunImpl update() { + return this; + } + + public UpdateRun apply() { + this.innerObject = serviceManager.serviceClient() + .getUpdateRuns() + .putWithResponse(resourceGroupName, clusterName, updateName, updateRunName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public UpdateRun apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getUpdateRuns() + .putWithResponse(resourceGroupName, clusterName, updateName, updateRunName, this.innerModel(), context) + .getValue(); + return this; + } + + UpdateRunImpl(UpdateRunInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.updateName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "updates"); + this.updateRunName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "updateRuns"); + } + + public UpdateRun refresh() { + this.innerObject = serviceManager.serviceClient() + .getUpdateRuns() + .getWithResponse(resourceGroupName, clusterName, updateName, updateRunName, Context.NONE) + .getValue(); + return this; + } + + public UpdateRun refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getUpdateRuns() + .getWithResponse(resourceGroupName, clusterName, updateName, updateRunName, context) + .getValue(); + return this; + } + + public UpdateRunImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public UpdateRunImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public UpdateRunImpl withTimeStarted(OffsetDateTime timeStarted) { + this.innerModel().withTimeStarted(timeStarted); + return this; + } + + public UpdateRunImpl withLastUpdatedTime(OffsetDateTime lastUpdatedTime) { + this.innerModel().withLastUpdatedTime(lastUpdatedTime); + return this; + } + + public UpdateRunImpl withDuration(String duration) { + this.innerModel().withDuration(duration); + return this; + } + + public UpdateRunImpl withState(UpdateRunPropertiesState state) { + this.innerModel().withState(state); + return this; + } + + public UpdateRunImpl withNamePropertiesName(String namePropertiesName) { + this.innerModel().withNamePropertiesName(namePropertiesName); + return this; + } + + public UpdateRunImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public UpdateRunImpl withErrorMessage(String errorMessage) { + this.innerModel().withErrorMessage(errorMessage); + return this; + } + + public UpdateRunImpl withStatus(String status) { + this.innerModel().withStatus(status); + return this; + } + + public UpdateRunImpl withStartTimeUtc(OffsetDateTime startTimeUtc) { + this.innerModel().withStartTimeUtc(startTimeUtc); + return this; + } + + public UpdateRunImpl withEndTimeUtc(OffsetDateTime endTimeUtc) { + this.innerModel().withEndTimeUtc(endTimeUtc); + return this; + } + + public UpdateRunImpl withLastUpdatedTimeUtc(OffsetDateTime lastUpdatedTimeUtc) { + this.innerModel().withLastUpdatedTimeUtc(lastUpdatedTimeUtc); + return this; + } + + public UpdateRunImpl withSteps(List steps) { + this.innerModel().withSteps(steps); + return this; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java new file mode 100644 index 0000000000000..81b5ac7b56eea --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsClientImpl.java @@ -0,0 +1,878 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateRunList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in UpdateRunsClient. + */ +public final class UpdateRunsClientImpl implements UpdateRunsClient { + /** + * The proxy service used to perform REST calls. + */ + private final UpdateRunsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of UpdateRunsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UpdateRunsClientImpl(AzureStackHciClientImpl client) { + this.service + = RestProxy.create(UpdateRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientUpdateRuns to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientU") + public interface UpdateRunsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> put(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UpdateRunInner updateRunsProperties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @PathParam("updateRunName") String updateRunName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + String updateName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + String updateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + updateName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update runs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName, String updateName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, updateName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update runs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName, String updateName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, updateName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, String updateName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterName, updateName)); + } + + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, String updateName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterName, updateName, context)); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, updateName, updateRunName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, updateName, updateRunName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String updateName, String updateRunName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, updateName, updateRunName).getSyncPoller(); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String updateName, String updateRunName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, updateName, updateRunName, context) + .getSyncPoller(); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String updateName, + String updateRunName) { + return beginDeleteAsync(resourceGroupName, clusterName, updateName, updateRunName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, updateName, updateRunName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName) { + deleteAsync(resourceGroupName, clusterName, updateName, updateRunName).block(); + } + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, + Context context) { + deleteAsync(resourceGroupName, clusterName, updateName, updateRunName, context).block(); + } + + /** + * Put Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of an Update run along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName, UpdateRunInner updateRunsProperties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + if (updateRunsProperties == null) { + return Mono + .error(new IllegalArgumentException("Parameter updateRunsProperties is required and cannot be null.")); + } else { + updateRunsProperties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, updateRunName, this.client.getApiVersion(), + updateRunsProperties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Put Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of an Update run along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName, UpdateRunInner updateRunsProperties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + if (updateRunsProperties == null) { + return Mono + .error(new IllegalArgumentException("Parameter updateRunsProperties is required and cannot be null.")); + } else { + updateRunsProperties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + updateName, updateRunName, this.client.getApiVersion(), updateRunsProperties, accept, context); + } + + /** + * Put Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of an Update run on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono putAsync(String resourceGroupName, String clusterName, String updateName, + String updateRunName, UpdateRunInner updateRunsProperties) { + return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, updateRunsProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Put Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of an Update run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, UpdateRunInner updateRunsProperties, Context context) { + return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, updateRunsProperties, + context).block(); + } + + /** + * Put Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param updateRunsProperties Properties of the updateRuns object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of an Update run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateRunInner put(String resourceGroupName, String clusterName, String updateName, String updateRunName, + UpdateRunInner updateRunsProperties) { + return putWithResponse(resourceGroupName, clusterName, updateName, updateRunName, updateRunsProperties, + Context.NONE).getValue(); + } + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Update run for a specified update along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, updateName, updateRunName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Update run for a specified update along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, String updateRunName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + if (updateRunName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateRunName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + updateName, updateRunName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Update run for a specified update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String updateName, + String updateRunName) { + return getWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Update run for a specified update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, updateName, updateRunName, context).block(); + } + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Update run for a specified update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateRunInner get(String resourceGroupName, String clusterName, String updateName, String updateRunName) { + return getWithResponse(resourceGroupName, clusterName, updateName, updateRunName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update runs along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java new file mode 100644 index 0000000000000..b096203fef65c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateRunsImpl.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.UpdateRunsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateRun; +import com.azure.resourcemanager.azurestackhci.models.UpdateRuns; + +public final class UpdateRunsImpl implements UpdateRuns { + private static final ClientLogger LOGGER = new ClientLogger(UpdateRunsImpl.class); + + private final UpdateRunsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public UpdateRunsImpl(UpdateRunsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String clusterName, String updateName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, updateName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, String updateName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterName, updateName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateRunImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName) { + this.serviceClient().delete(resourceGroupName, clusterName, updateName, updateRunName); + } + + public void delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, + Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, updateName, updateRunName, context); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, updateName, updateRunName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new UpdateRunImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UpdateRun get(String resourceGroupName, String clusterName, String updateName, String updateRunName) { + UpdateRunInner inner = this.serviceClient().get(resourceGroupName, clusterName, updateName, updateRunName); + if (inner != null) { + return new UpdateRunImpl(inner, this.manager()); + } else { + return null; + } + } + + public UpdateRun getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String updateName = ResourceManagerUtils.getValueFromIdByName(id, "updates"); + if (updateName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updates'.", id))); + } + String updateRunName = ResourceManagerUtils.getValueFromIdByName(id, "updateRuns"); + if (updateRunName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, updateName, updateRunName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String updateName = ResourceManagerUtils.getValueFromIdByName(id, "updates"); + if (updateName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updates'.", id))); + } + String updateRunName = ResourceManagerUtils.getValueFromIdByName(id, "updateRuns"); + if (updateRunName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, updateName, updateRunName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String updateName = ResourceManagerUtils.getValueFromIdByName(id, "updates"); + if (updateName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updates'.", id))); + } + String updateRunName = ResourceManagerUtils.getValueFromIdByName(id, "updateRuns"); + if (updateRunName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); + } + this.delete(resourceGroupName, clusterName, updateName, updateRunName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String updateName = ResourceManagerUtils.getValueFromIdByName(id, "updates"); + if (updateName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updates'.", id))); + } + String updateRunName = ResourceManagerUtils.getValueFromIdByName(id, "updateRuns"); + if (updateRunName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updateRuns'.", id))); + } + this.delete(resourceGroupName, clusterName, updateName, updateRunName, context); + } + + private UpdateRunsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public UpdateRunImpl define(String name) { + return new UpdateRunImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java new file mode 100644 index 0000000000000..d411c7c5bd44e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesImpl.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; +import com.azure.resourcemanager.azurestackhci.models.HealthState; +import com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo; +import com.azure.resourcemanager.azurestackhci.models.PrecheckResult; +import com.azure.resourcemanager.azurestackhci.models.ProvisioningState; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummaries; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class UpdateSummariesImpl implements UpdateSummaries { + private UpdateSummariesInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + UpdateSummariesImpl(UpdateSummariesInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String oemFamily() { + return this.innerModel().oemFamily(); + } + + public String hardwareModel() { + return this.innerModel().hardwareModel(); + } + + public List packageVersions() { + List inner = this.innerModel().packageVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String currentVersion() { + return this.innerModel().currentVersion(); + } + + public OffsetDateTime lastUpdated() { + return this.innerModel().lastUpdated(); + } + + public OffsetDateTime lastChecked() { + return this.innerModel().lastChecked(); + } + + public HealthState healthState() { + return this.innerModel().healthState(); + } + + public List healthCheckResult() { + List inner = this.innerModel().healthCheckResult(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OffsetDateTime healthCheckDate() { + return this.innerModel().healthCheckDate(); + } + + public UpdateSummariesPropertiesState state() { + return this.innerModel().state(); + } + + public UpdateSummariesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java new file mode 100644 index 0000000000000..0fc395562f1a5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsClientImpl.java @@ -0,0 +1,768 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in UpdateSummariesOperationsClient. + */ +public final class UpdateSummariesOperationsClientImpl implements UpdateSummariesOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final UpdateSummariesOperationsService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of UpdateSummariesOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UpdateSummariesOperationsClientImpl(AzureStackHciClientImpl client) { + this.service = RestProxy.create(UpdateSummariesOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientUpdateSummariesOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientU") + public interface UpdateSummariesOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> put(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UpdateSummariesInner updateLocationProperties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSummaries/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update Summaries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update Summaries as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update Summaries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterName)); + } + + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update Summaries as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterName, context)); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { + return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName) { + return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName) { + deleteAsync(resourceGroupName, clusterName).block(); + } + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, Context context) { + deleteAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return get the update summaries for the cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateLocationProperties == null) { + return Mono.error( + new IllegalArgumentException("Parameter updateLocationProperties is required and cannot be null.")); + } else { + updateLocationProperties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), updateLocationProperties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return get the update summaries for the cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateLocationProperties == null) { + return Mono.error( + new IllegalArgumentException("Parameter updateLocationProperties is required and cannot be null.")); + } else { + updateLocationProperties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), updateLocationProperties, accept, context); + } + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return get the update summaries for the cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono putAsync(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties) { + return putWithResponseAsync(resourceGroupName, clusterName, updateLocationProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return get the update summaries for the cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putWithResponse(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context) { + return putWithResponseAsync(resourceGroupName, clusterName, updateLocationProperties, context).block(); + } + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return get the update summaries for the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateSummariesInner put(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties) { + return putWithResponse(resourceGroupName, clusterName, updateLocationProperties, Context.NONE).getValue(); + } + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Update summaries under the HCI cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Update summaries under the HCI cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), accept, context); + } + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Update summaries under the HCI cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName) { + return getWithResponseAsync(resourceGroupName, clusterName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Update summaries under the HCI cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, + Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, context).block(); + } + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Update summaries under the HCI cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UpdateSummariesInner get(String resourceGroupName, String clusterName) { + return getWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Update Summaries along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java new file mode 100644 index 0000000000000..5645597784d9e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdateSummariesOperationsImpl.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.UpdateSummariesOperationsClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummaries; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesOperations; + +public final class UpdateSummariesOperationsImpl implements UpdateSummariesOperations { + private static final ClientLogger LOGGER = new ClientLogger(UpdateSummariesOperationsImpl.class); + + private final UpdateSummariesOperationsClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public UpdateSummariesOperationsImpl(UpdateSummariesOperationsClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateSummariesImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UpdateSummariesImpl(inner1, this.manager())); + } + + public void deleteByResourceGroup(String resourceGroupName, String clusterName) { + this.serviceClient().delete(resourceGroupName, clusterName); + } + + public void delete(String resourceGroupName, String clusterName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, context); + } + + public Response putWithResponse(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context) { + Response inner + = this.serviceClient().putWithResponse(resourceGroupName, clusterName, updateLocationProperties, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new UpdateSummariesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UpdateSummaries put(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties) { + UpdateSummariesInner inner = this.serviceClient().put(resourceGroupName, clusterName, updateLocationProperties); + if (inner != null) { + return new UpdateSummariesImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String resourceGroupName, String clusterName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new UpdateSummariesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UpdateSummaries get(String resourceGroupName, String clusterName) { + UpdateSummariesInner inner = this.serviceClient().get(resourceGroupName, clusterName); + if (inner != null) { + return new UpdateSummariesImpl(inner, this.manager()); + } else { + return null; + } + } + + private UpdateSummariesOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java new file mode 100644 index 0000000000000..dfc77f453d288 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesClientImpl.java @@ -0,0 +1,1041 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in UpdatesClient. + */ +public final class UpdatesClientImpl implements UpdatesClient { + /** + * The proxy service used to perform REST calls. + */ + private final UpdatesService service; + + /** + * The service client containing this operation class. + */ + private final AzureStackHciClientImpl client; + + /** + * Initializes an instance of UpdatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UpdatesClientImpl(AzureStackHciClientImpl client) { + this.service = RestProxy.create(UpdatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureStackHciClientUpdates to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureStackHciClientU") + public interface UpdatesService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/apply") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> post(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> put(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HciUpdateInner updateProperties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName, + @PathParam("updateName") String updateName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> postWithResponseAsync(String resourceGroupName, String clusterName, + String updateName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> postWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + updateName, this.client.getApiVersion(), accept, context); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginPostAsync(String resourceGroupName, String clusterName, + String updateName) { + Mono>> mono = postWithResponseAsync(resourceGroupName, clusterName, updateName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginPostAsync(String resourceGroupName, String clusterName, + String updateName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = postWithResponseAsync(resourceGroupName, clusterName, updateName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, + String updateName) { + return this.beginPostAsync(resourceGroupName, clusterName, updateName).getSyncPoller(); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginPost(String resourceGroupName, String clusterName, String updateName, + Context context) { + return this.beginPostAsync(resourceGroupName, clusterName, updateName, context).getSyncPoller(); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono postAsync(String resourceGroupName, String clusterName, String updateName) { + return beginPostAsync(resourceGroupName, clusterName, updateName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono postAsync(String resourceGroupName, String clusterName, String updateName, Context context) { + return beginPostAsync(resourceGroupName, clusterName, updateName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void post(String resourceGroupName, String clusterName, String updateName) { + postAsync(resourceGroupName, clusterName, updateName).block(); + } + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void post(String resourceGroupName, String clusterName, String updateName, Context context) { + postAsync(resourceGroupName, clusterName, updateName, context).block(); + } + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String clusterName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterName)); + } + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterName, context)); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String updateName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, updateName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String updateName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, updateName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName, + String updateName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterName, updateName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String updateName) { + return this.beginDeleteAsync(resourceGroupName, clusterName, updateName).getSyncPoller(); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, + String updateName, Context context) { + return this.beginDeleteAsync(resourceGroupName, clusterName, updateName, context).getSyncPoller(); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String updateName) { + return beginDeleteAsync(resourceGroupName, clusterName, updateName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String clusterName, String updateName, Context context) { + return beginDeleteAsync(resourceGroupName, clusterName, updateName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String updateName) { + deleteAsync(resourceGroupName, clusterName, updateName).block(); + } + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String clusterName, String updateName, Context context) { + deleteAsync(resourceGroupName, clusterName, updateName, context).block(); + } + + /** + * Put specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return update details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, HciUpdateInner updateProperties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + if (updateProperties == null) { + return Mono + .error(new IllegalArgumentException("Parameter updateProperties is required and cannot be null.")); + } else { + updateProperties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + clusterName, updateName, this.client.getApiVersion(), updateProperties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Put specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return update details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, HciUpdateInner updateProperties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + if (updateProperties == null) { + return Mono + .error(new IllegalArgumentException("Parameter updateProperties is required and cannot be null.")); + } else { + updateProperties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + updateName, this.client.getApiVersion(), updateProperties, accept, context); + } + + /** + * Put specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return update details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono putAsync(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties) { + return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Put specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return update details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putWithResponse(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties, Context context) { + return putWithResponseAsync(resourceGroupName, clusterName, updateName, updateProperties, context).block(); + } + + /** + * Put specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateProperties Properties of the Updates object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return update details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HciUpdateInner put(String resourceGroupName, String clusterName, String updateName, + HciUpdateInner updateProperties) { + return putWithResponse(resourceGroupName, clusterName, updateName, updateProperties, Context.NONE).getValue(); + } + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specified Update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String updateName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, clusterName, updateName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specified Update along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String clusterName, + String updateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (updateName == null) { + return Mono.error(new IllegalArgumentException("Parameter updateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, clusterName, + updateName, this.client.getApiVersion(), accept, context); + } + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specified Update on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String clusterName, String updateName) { + return getWithResponseAsync(resourceGroupName, clusterName, updateName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specified Update along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context) { + return getWithResponseAsync(resourceGroupName, clusterName, updateName, context).block(); + } + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specified Update. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HciUpdateInner get(String resourceGroupName, String clusterName, String updateName) { + return getWithResponse(resourceGroupName, clusterName, updateName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Updates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java new file mode 100644 index 0000000000000..1a84ed0d2274e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/UpdatesImpl.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.UpdatesClient; +import com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner; +import com.azure.resourcemanager.azurestackhci.models.HciUpdate; +import com.azure.resourcemanager.azurestackhci.models.Updates; + +public final class UpdatesImpl implements Updates { + private static final ClientLogger LOGGER = new ClientLogger(UpdatesImpl.class); + + private final UpdatesClient innerClient; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + public UpdatesImpl(UpdatesClient innerClient, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void post(String resourceGroupName, String clusterName, String updateName) { + this.serviceClient().post(resourceGroupName, clusterName, updateName); + } + + public void post(String resourceGroupName, String clusterName, String updateName, Context context) { + this.serviceClient().post(resourceGroupName, clusterName, updateName, context); + } + + public PagedIterable list(String resourceGroupName, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HciUpdateImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HciUpdateImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String clusterName, String updateName) { + this.serviceClient().delete(resourceGroupName, clusterName, updateName); + } + + public void delete(String resourceGroupName, String clusterName, String updateName, Context context) { + this.serviceClient().delete(resourceGroupName, clusterName, updateName, context); + } + + public Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterName, updateName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new HciUpdateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HciUpdate get(String resourceGroupName, String clusterName, String updateName) { + HciUpdateInner inner = this.serviceClient().get(resourceGroupName, clusterName, updateName); + if (inner != null) { + return new HciUpdateImpl(inner, this.manager()); + } else { + return null; + } + } + + public HciUpdate getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String updateName = ResourceManagerUtils.getValueFromIdByName(id, "updates"); + if (updateName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updates'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, updateName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String updateName = ResourceManagerUtils.getValueFromIdByName(id, "updates"); + if (updateName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updates'.", id))); + } + return this.getWithResponse(resourceGroupName, clusterName, updateName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String updateName = ResourceManagerUtils.getValueFromIdByName(id, "updates"); + if (updateName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updates'.", id))); + } + this.delete(resourceGroupName, clusterName, updateName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); + if (clusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + } + String updateName = ResourceManagerUtils.getValueFromIdByName(id, "updates"); + if (updateName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'updates'.", id))); + } + this.delete(resourceGroupName, clusterName, updateName, context); + } + + private UpdatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } + + public HciUpdateImpl define(String name) { + return new HciUpdateImpl(name, this.manager()); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java new file mode 100644 index 0000000000000..f17ea09f0a9d1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/ValidateResponseImpl.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.implementation; + +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner; +import com.azure.resourcemanager.azurestackhci.models.ValidateResponse; + +public final class ValidateResponseImpl implements ValidateResponse { + private ValidateResponseInner innerObject; + + private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; + + ValidateResponseImpl(ValidateResponseInner innerObject, + com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String status() { + return this.innerModel().status(); + } + + public ValidateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksImpl.java index 820dbfdfc0bb2..07548543bedc8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksImpl.java @@ -12,8 +12,8 @@ import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.HyperVGeneration; import com.azure.resourcemanager.azurestackhci.models.ProvisioningStateEnum; -import com.azure.resourcemanager.azurestackhci.models.VirtualHardDiskStatus; import com.azure.resourcemanager.azurestackhci.models.VirtualHardDisks; +import com.azure.resourcemanager.azurestackhci.models.VirtualHardDiskStatus; import com.azure.resourcemanager.azurestackhci.models.VirtualHardDisksUpdateRequest; import java.util.Collections; import java.util.Map; @@ -129,20 +129,16 @@ public VirtualHardDisksImpl withExistingResourceGroup(String resourceGroupName) } public VirtualHardDisks create() { - this.innerObject = - serviceManager - .serviceClient() - .getVirtualHardDisksOperations() - .createOrUpdate(resourceGroupName, virtualHardDiskName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getVirtualHardDisksOperations() + .createOrUpdate(resourceGroupName, virtualHardDiskName, this.innerModel(), Context.NONE); return this; } public VirtualHardDisks create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getVirtualHardDisksOperations() - .createOrUpdate(resourceGroupName, virtualHardDiskName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getVirtualHardDisksOperations() + .createOrUpdate(resourceGroupName, virtualHardDiskName, this.innerModel(), context); return this; } @@ -158,49 +154,40 @@ public VirtualHardDisksImpl update() { } public VirtualHardDisks apply() { - this.innerObject = - serviceManager - .serviceClient() - .getVirtualHardDisksOperations() - .update(resourceGroupName, virtualHardDiskName, updateVirtualHardDisks, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getVirtualHardDisksOperations() + .update(resourceGroupName, virtualHardDiskName, updateVirtualHardDisks, Context.NONE); return this; } public VirtualHardDisks apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getVirtualHardDisksOperations() - .update(resourceGroupName, virtualHardDiskName, updateVirtualHardDisks, context); + this.innerObject = serviceManager.serviceClient() + .getVirtualHardDisksOperations() + .update(resourceGroupName, virtualHardDiskName, updateVirtualHardDisks, context); return this; } - VirtualHardDisksImpl( - VirtualHardDisksInner innerObject, + VirtualHardDisksImpl(VirtualHardDisksInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.virtualHardDiskName = Utils.getValueFromIdByName(innerObject.id(), "virtualHardDisks"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.virtualHardDiskName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "virtualHardDisks"); } public VirtualHardDisks refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getVirtualHardDisksOperations() - .getByResourceGroupWithResponse(resourceGroupName, virtualHardDiskName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getVirtualHardDisksOperations() + .getByResourceGroupWithResponse(resourceGroupName, virtualHardDiskName, Context.NONE) + .getValue(); return this; } public VirtualHardDisks refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getVirtualHardDisksOperations() - .getByResourceGroupWithResponse(resourceGroupName, virtualHardDiskName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getVirtualHardDisksOperations() + .getByResourceGroupWithResponse(resourceGroupName, virtualHardDiskName, context) + .getValue(); return this; } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksOperationsClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksOperationsClientImpl.java index 7b88e03860beb..2de09cbd63245 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksOperationsClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksOperationsClientImpl.java @@ -40,24 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in VirtualHardDisksOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualHardDisksOperationsClient. + */ public final class VirtualHardDisksOperationsClientImpl implements VirtualHardDisksOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final VirtualHardDisksOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of VirtualHardDisksOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ VirtualHardDisksOperationsClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create( - VirtualHardDisksOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(VirtualHardDisksOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -68,112 +72,85 @@ public final class VirtualHardDisksOperationsClientImpl implements VirtualHardDi @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientV") public interface VirtualHardDisksOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualHardDiskName") String virtualHardDiskName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualHardDiskName") String virtualHardDiskName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualHardDiskName") String virtualHardDiskName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VirtualHardDisksInner virtualHardDisks, - @HeaderParam("Accept") String accept, + @PathParam("virtualHardDiskName") String virtualHardDiskName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VirtualHardDisksInner virtualHardDisks, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualHardDiskName") String virtualHardDiskName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualHardDiskName") String virtualHardDiskName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks/{virtualHardDiskName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("virtualHardDiskName") String virtualHardDiskName, - @QueryParam("api-version") String apiVersion, + @PathParam("virtualHardDiskName") String virtualHardDiskName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VirtualHardDisksUpdateRequest virtualHardDisks, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/virtualHardDisks") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAllNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -182,19 +159,15 @@ Mono> listAllNext( * @return a virtual hard disk along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String virtualHardDiskName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualHardDiskName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -207,22 +180,14 @@ private Mono> getByResourceGroupWithResponseAsyn final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - virtualHardDiskName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, virtualHardDiskName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -232,19 +197,15 @@ private Mono> getByResourceGroupWithResponseAsyn * @return a virtual hard disk along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String virtualHardDiskName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String virtualHardDiskName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -256,20 +217,13 @@ private Mono> getByResourceGroupWithResponseAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - virtualHardDiskName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + virtualHardDiskName, this.client.getApiVersion(), accept, context); } /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -285,7 +239,7 @@ private Mono getByResourceGroupAsync(String resourceGroup /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -295,14 +249,14 @@ private Mono getByResourceGroupAsync(String resourceGroup * @return a virtual hard disk along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String virtualHardDiskName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualHardDiskName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, virtualHardDiskName, context).block(); } /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,30 +272,26 @@ public VirtualHardDisksInner getByResourceGroup(String resourceGroupName, String /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual hard disk resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the virtual hard disk resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -359,25 +309,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - virtualHardDiskName, - this.client.getApiVersion(), - virtualHardDisks, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, virtualHardDiskName, this.client.getApiVersion(), virtualHardDisks, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -385,23 +325,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual hard disk resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the virtual hard disk resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -419,22 +355,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - virtualHardDiskName, - this.client.getApiVersion(), - virtualHardDisks, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + virtualHardDiskName, this.client.getApiVersion(), virtualHardDisks, accept, context); } /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -446,22 +374,17 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualHardDisksInner> beginCreateOrUpdateAsync( String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualHardDisksInner.class, - VirtualHardDisksInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualHardDisksInner.class, VirtualHardDisksInner.class, + this.client.getContext()); } /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -475,18 +398,16 @@ private PollerFlux, VirtualHardDisksInner> beg private PollerFlux, VirtualHardDisksInner> beginCreateOrUpdateAsync( String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), VirtualHardDisksInner.class, VirtualHardDisksInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualHardDisksInner.class, VirtualHardDisksInner.class, context); } /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -504,7 +425,7 @@ public SyncPoller, VirtualHardDisksInner> begi /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -517,15 +438,14 @@ public SyncPoller, VirtualHardDisksInner> begi @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualHardDisksInner> beginCreateOrUpdate( String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context) .getSyncPoller(); } /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -535,17 +455,16 @@ public SyncPoller, VirtualHardDisksInner> begi * @return the virtual hard disk resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksInner virtualHardDisks) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -556,17 +475,16 @@ private Mono createOrUpdateAsync( * @return the virtual hard disk resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksInner virtualHardDisks, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -576,15 +494,15 @@ private Mono createOrUpdateAsync( * @return the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualHardDisksInner createOrUpdate( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks) { + public VirtualHardDisksInner createOrUpdate(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksInner virtualHardDisks) { return createOrUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks).block(); } /** * The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual * hard disk creation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource definition. @@ -595,14 +513,14 @@ public VirtualHardDisksInner createOrUpdate( * @return the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualHardDisksInner createOrUpdate( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksInner virtualHardDisks, Context context) { + public VirtualHardDisksInner createOrUpdate(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksInner virtualHardDisks, Context context) { return createOrUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context).block(); } /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -611,19 +529,15 @@ public VirtualHardDisksInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String virtualHardDiskName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualHardDiskName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -635,23 +549,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - virtualHardDiskName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, virtualHardDiskName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -661,19 +566,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String virtualHardDiskName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String virtualHardDiskName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -685,20 +586,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - virtualHardDiskName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + virtualHardDiskName, this.client.getApiVersion(), accept, context); } /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -709,15 +603,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualHardDiskName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, virtualHardDiskName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -727,19 +619,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String virtualHardDiskName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String virtualHardDiskName, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, virtualHardDiskName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, virtualHardDiskName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -754,7 +645,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -764,14 +655,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String virtualHardDiskName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String virtualHardDiskName, + Context context) { return this.beginDeleteAsync(resourceGroupName, virtualHardDiskName, context).getSyncPoller(); } /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -781,14 +672,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String virtualHardDiskName) { - return beginDeleteAsync(resourceGroupName, virtualHardDiskName) - .last() + return beginDeleteAsync(resourceGroupName, virtualHardDiskName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -799,14 +689,13 @@ private Mono deleteAsync(String resourceGroupName, String virtualHardDiskN */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String virtualHardDiskName, Context context) { - return beginDeleteAsync(resourceGroupName, virtualHardDiskName, context) - .last() + return beginDeleteAsync(resourceGroupName, virtualHardDiskName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -820,7 +709,7 @@ public void delete(String resourceGroupName, String virtualHardDiskName) { /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -835,30 +724,26 @@ public void delete(String resourceGroupName, String virtualHardDiskName, Context /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual hard disk resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the virtual hard disk resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -876,24 +761,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - virtualHardDiskName, - this.client.getApiVersion(), - virtualHardDisks, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, virtualHardDiskName, this.client.getApiVersion(), virtualHardDisks, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -901,26 +776,19 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual hard disk resource definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return the virtual hard disk resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String virtualHardDiskName, - VirtualHardDisksUpdateRequest virtualHardDisks, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -938,21 +806,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - virtualHardDiskName, - this.client.getApiVersion(), - virtualHardDisks, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + virtualHardDiskName, this.client.getApiVersion(), virtualHardDisks, accept, context); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -964,21 +824,16 @@ private Mono>> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualHardDisksInner> beginUpdateAsync( String resourceGroupName, String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualHardDisksInner.class, - VirtualHardDisksInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualHardDisksInner.class, VirtualHardDisksInner.class, + this.client.getContext()); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -990,22 +845,18 @@ private PollerFlux, VirtualHardDisksInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualHardDisksInner> beginUpdateAsync( - String resourceGroupName, - String virtualHardDiskName, - VirtualHardDisksUpdateRequest virtualHardDisks, + String resourceGroupName, String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), VirtualHardDisksInner.class, VirtualHardDisksInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualHardDisksInner.class, VirtualHardDisksInner.class, context); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -1015,14 +866,14 @@ private PollerFlux, VirtualHardDisksInner> beg * @return the {@link SyncPoller} for polling of the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualHardDisksInner> beginUpdate( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks) { + public SyncPoller, VirtualHardDisksInner> beginUpdate(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks) { return this.beginUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks).getSyncPoller(); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -1033,17 +884,14 @@ public SyncPoller, VirtualHardDisksInner> begi * @return the {@link SyncPoller} for polling of the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualHardDisksInner> beginUpdate( - String resourceGroupName, - String virtualHardDiskName, - VirtualHardDisksUpdateRequest virtualHardDisks, - Context context) { + public SyncPoller, VirtualHardDisksInner> beginUpdate(String resourceGroupName, + String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks, Context context) { return this.beginUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context).getSyncPoller(); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -1053,16 +901,15 @@ public SyncPoller, VirtualHardDisksInner> begi * @return the virtual hard disk resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks) { - return beginUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks) - .last() + private Mono updateAsync(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksUpdateRequest virtualHardDisks) { + return beginUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -1073,19 +920,15 @@ private Mono updateAsync( * @return the virtual hard disk resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String virtualHardDiskName, - VirtualHardDisksUpdateRequest virtualHardDisks, - Context context) { - return beginUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context) - .last() + private Mono updateAsync(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksUpdateRequest virtualHardDisks, Context context) { + return beginUpdateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -1095,14 +938,14 @@ private Mono updateAsync( * @return the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualHardDisksInner update( - String resourceGroupName, String virtualHardDiskName, VirtualHardDisksUpdateRequest virtualHardDisks) { + public VirtualHardDisksInner update(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksUpdateRequest virtualHardDisks) { return updateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks).block(); } /** * The operation to update a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param virtualHardDisks The virtual hard disk resource patch definition. @@ -1113,18 +956,15 @@ public VirtualHardDisksInner update( * @return the virtual hard disk resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualHardDisksInner update( - String resourceGroupName, - String virtualHardDiskName, - VirtualHardDisksUpdateRequest virtualHardDisks, - Context context) { + public VirtualHardDisksInner update(String resourceGroupName, String virtualHardDiskName, + VirtualHardDisksUpdateRequest virtualHardDisks, Context context) { return updateAsync(resourceGroupName, virtualHardDiskName, virtualHardDisks, context).block(); } /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1134,16 +974,12 @@ public VirtualHardDisksInner update( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1151,32 +987,17 @@ private Mono> listByResourceGroupSinglePage } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1185,19 +1006,15 @@ private Mono> listByResourceGroupSinglePage * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1206,28 +1023,16 @@ private Mono> listByResourceGroupSinglePage final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1236,14 +1041,14 @@ private Mono> listByResourceGroupSinglePage */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1253,15 +1058,14 @@ private PagedFlux listByResourceGroupAsync(String resourc */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1276,7 +1080,7 @@ public PagedIterable listByResourceGroup(String resourceG /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1292,7 +1096,7 @@ public PagedIterable listByResourceGroup(String resourceG /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @throws 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 PagedResponse} on successful completion of {@link Mono}. @@ -1300,44 +1104,26 @@ public PagedIterable listByResourceGroup(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1347,41 +1133,26 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @throws 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 paginated response with {@link PagedFlux}. @@ -1394,7 +1165,7 @@ private PagedFlux listAsync() { /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1403,14 +1174,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listAllNextSinglePageAsync(nextLink, context)); } /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @throws 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 paginated response with {@link PagedIterable}. @@ -1423,7 +1194,7 @@ public PagedIterable list() { /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1437,9 +1208,10 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1451,31 +1223,22 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1488,31 +1251,22 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1524,31 +1278,23 @@ private Mono> listAllNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAllNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1561,23 +1307,13 @@ private Mono> listAllNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAllNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listAllNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksOperationsImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksOperationsImpl.java index a660010a41c3d..72210e370155f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksOperationsImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualHardDisksOperationsImpl.java @@ -21,22 +21,18 @@ public final class VirtualHardDisksOperationsImpl implements VirtualHardDisksOpe private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public VirtualHardDisksOperationsImpl( - VirtualHardDisksOperationsClient innerClient, + public VirtualHardDisksOperationsImpl(VirtualHardDisksOperationsClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String virtualHardDiskName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, virtualHardDiskName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String virtualHardDiskName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, virtualHardDiskName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new VirtualHardDisksImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,105 +58,77 @@ public void delete(String resourceGroupName, String virtualHardDiskName, Context public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new VirtualHardDisksImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualHardDisksImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new VirtualHardDisksImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualHardDisksImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new VirtualHardDisksImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualHardDisksImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new VirtualHardDisksImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualHardDisksImpl(inner1, this.manager())); } public VirtualHardDisks getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String virtualHardDiskName = Utils.getValueFromIdByName(id, "virtualHardDisks"); + String virtualHardDiskName = ResourceManagerUtils.getValueFromIdByName(id, "virtualHardDisks"); if (virtualHardDiskName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'virtualHardDisks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualHardDisks'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, virtualHardDiskName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String virtualHardDiskName = Utils.getValueFromIdByName(id, "virtualHardDisks"); + String virtualHardDiskName = ResourceManagerUtils.getValueFromIdByName(id, "virtualHardDisks"); if (virtualHardDiskName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'virtualHardDisks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualHardDisks'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, virtualHardDiskName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String virtualHardDiskName = Utils.getValueFromIdByName(id, "virtualHardDisks"); + String virtualHardDiskName = ResourceManagerUtils.getValueFromIdByName(id, "virtualHardDisks"); if (virtualHardDiskName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'virtualHardDisks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualHardDisks'.", id))); } this.delete(resourceGroupName, virtualHardDiskName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String virtualHardDiskName = Utils.getValueFromIdByName(id, "virtualHardDisks"); + String virtualHardDiskName = ResourceManagerUtils.getValueFromIdByName(id, "virtualHardDisks"); if (virtualHardDiskName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'virtualHardDisks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'virtualHardDisks'.", id))); } this.delete(resourceGroupName, virtualHardDiskName, context); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstanceImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstanceImpl.java index 478e6de52b027..621d5bf017425 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstanceImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstanceImpl.java @@ -25,8 +25,7 @@ public final class VirtualMachineInstanceImpl implements VirtualMachineInstance private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - VirtualMachineInstanceImpl( - VirtualMachineInstanceInner innerObject, + VirtualMachineInstanceImpl(VirtualMachineInstanceInner innerObject, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstancesClientImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstancesClientImpl.java index f902174cdbd1d..fdd6157690545 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstancesClientImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstancesClientImpl.java @@ -41,23 +41,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in VirtualMachineInstancesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualMachineInstancesClient. + */ public final class VirtualMachineInstancesClientImpl implements VirtualMachineInstancesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final VirtualMachineInstancesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureStackHciClientImpl client; /** * Initializes an instance of VirtualMachineInstancesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ VirtualMachineInstancesClientImpl(AzureStackHciClientImpl client) { - this.service = - RestProxy - .create(VirtualMachineInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(VirtualMachineInstancesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -68,112 +73,88 @@ public final class VirtualMachineInstancesClientImpl implements VirtualMachineIn @Host("{$host}") @ServiceInterface(name = "AzureStackHciClientV") public interface VirtualMachineInstancesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VirtualMachineInstanceInner virtualMachineInstance, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default") - @ExpectedResponses({202, 204}) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Patch("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default") - @ExpectedResponses({200, 202}) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VirtualMachineInstanceUpdateRequest virtualMachineInstance, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/start") - @ExpectedResponses({200, 202}) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start( - @HostParam("$host") String endpoint, + Mono>> start(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/stop") - @ExpectedResponses({200, 202}) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop( - @HostParam("$host") String endpoint, + Mono>> stop(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/restart") - @ExpectedResponses({200, 202}) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart( - @HostParam("$host") String endpoint, + Mono>> restart(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -182,27 +163,24 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -212,10 +190,8 @@ private Mono> getWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -227,9 +203,9 @@ private Mono> getWithResponseAsync(String /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -242,9 +218,9 @@ private Mono getAsync(String resourceUri) { /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -258,9 +234,9 @@ public Response getWithResponse(String resourceUri, /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -274,101 +250,81 @@ public VirtualMachineInstanceInner get(String resourceUri) { /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance) { + private Mono>> createOrUpdateWithResponseAsync(String resourceUri, + VirtualMachineInstanceInner virtualMachineInstance) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } if (virtualMachineInstance == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualMachineInstance is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualMachineInstance is required and cannot be null.")); } else { virtualMachineInstance.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - virtualMachineInstance, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceUri, + this.client.getApiVersion(), virtualMachineInstance, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceUri, + VirtualMachineInstanceInner virtualMachineInstance, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } if (virtualMachineInstance == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualMachineInstance is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualMachineInstance is required and cannot be null.")); } else { virtualMachineInstance.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - virtualMachineInstance, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + virtualMachineInstance, accept, context); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -376,25 +332,20 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInstanceInner> beginCreateOrUpdateAsync( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance) { + private PollerFlux, VirtualMachineInstanceInner> + beginCreateOrUpdateAsync(String resourceUri, VirtualMachineInstanceInner virtualMachineInstance) { Mono>> mono = createOrUpdateWithResponseAsync(resourceUri, virtualMachineInstance); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + this.client.getContext()); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -406,24 +357,19 @@ private PollerFlux, VirtualMachineInstan private PollerFlux, VirtualMachineInstanceInner> beginCreateOrUpdateAsync( String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceUri, virtualMachineInstance, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceUri, virtualMachineInstance, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + context); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -431,17 +377,17 @@ private PollerFlux, VirtualMachineInstan * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginCreateOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance) { + public SyncPoller, VirtualMachineInstanceInner> + beginCreateOrUpdate(String resourceUri, VirtualMachineInstanceInner virtualMachineInstance) { return this.beginCreateOrUpdateAsync(resourceUri, virtualMachineInstance).getSyncPoller(); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -450,17 +396,17 @@ public SyncPoller, VirtualMachineInstanc * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginCreateOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context) { + public SyncPoller, VirtualMachineInstanceInner> + beginCreateOrUpdate(String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context) { return this.beginCreateOrUpdateAsync(resourceUri, virtualMachineInstance, context).getSyncPoller(); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -468,19 +414,18 @@ public SyncPoller, VirtualMachineInstanc * @return the virtual machine instance resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance) { - return beginCreateOrUpdateAsync(resourceUri, virtualMachineInstance) - .last() + private Mono createOrUpdateAsync(String resourceUri, + VirtualMachineInstanceInner virtualMachineInstance) { + return beginCreateOrUpdateAsync(resourceUri, virtualMachineInstance).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -489,19 +434,18 @@ private Mono createOrUpdateAsync( * @return the virtual machine instance resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context) { - return beginCreateOrUpdateAsync(resourceUri, virtualMachineInstance, context) - .last() + private Mono createOrUpdateAsync(String resourceUri, + VirtualMachineInstanceInner virtualMachineInstance, Context context) { + return beginCreateOrUpdateAsync(resourceUri, virtualMachineInstance, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -509,17 +453,17 @@ private Mono createOrUpdateAsync( * @return the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInstanceInner createOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance) { + public VirtualMachineInstanceInner createOrUpdate(String resourceUri, + VirtualMachineInstanceInner virtualMachineInstance) { return createOrUpdateAsync(resourceUri, virtualMachineInstance).block(); } /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -528,16 +472,16 @@ public VirtualMachineInstanceInner createOrUpdate( * @return the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInstanceInner createOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context) { + public VirtualMachineInstanceInner createOrUpdate(String resourceUri, + VirtualMachineInstanceInner virtualMachineInstance, Context context) { return createOrUpdateAsync(resourceUri, virtualMachineInstance, context).block(); } /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -546,28 +490,24 @@ public VirtualMachineInstanceInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -577,10 +517,8 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -592,9 +530,9 @@ private Mono>> deleteWithResponseAsync(String resource /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -603,17 +541,15 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceUri) { Mono>> mono = deleteWithResponseAsync(resourceUri); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -624,16 +560,15 @@ private PollerFlux, Void> beginDeleteAsync(String resourceUri) private PollerFlux, Void> beginDeleteAsync(String resourceUri, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceUri, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -646,9 +581,9 @@ public SyncPoller, Void> beginDelete(String resourceUri) { /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -662,9 +597,9 @@ public SyncPoller, Void> beginDelete(String resourceUri, Contex /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -677,9 +612,9 @@ private Mono deleteAsync(String resourceUri) { /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -693,9 +628,9 @@ private Mono deleteAsync(String resourceUri, Context context) { /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -707,9 +642,9 @@ public void delete(String resourceUri) { /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -722,99 +657,79 @@ public void delete(String resourceUri, Context context) { /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance) { + private Mono>> updateWithResponseAsync(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } if (virtualMachineInstance == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualMachineInstance is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualMachineInstance is required and cannot be null.")); } else { virtualMachineInstance.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - virtualMachineInstance, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + virtualMachineInstance, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { + private Mono>> updateWithResponseAsync(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } if (virtualMachineInstance == null) { - return Mono - .error( - new IllegalArgumentException("Parameter virtualMachineInstance is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter virtualMachineInstance is required and cannot be null.")); } else { virtualMachineInstance.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - virtualMachineInstance, - accept, - context); + return service.update(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + virtualMachineInstance, accept, context); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -822,24 +737,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInstanceInner> beginUpdateAsync( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance) { + private PollerFlux, VirtualMachineInstanceInner> + beginUpdateAsync(String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance) { Mono>> mono = updateWithResponseAsync(resourceUri, virtualMachineInstance); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + this.client.getContext()); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -852,21 +762,16 @@ private PollerFlux, VirtualMachineInstan String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceUri, virtualMachineInstance, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + context); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -874,16 +779,16 @@ private PollerFlux, VirtualMachineInstan * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginUpdate( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance) { + public SyncPoller, VirtualMachineInstanceInner> + beginUpdate(String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance) { return this.beginUpdateAsync(resourceUri, virtualMachineInstance).getSyncPoller(); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -892,16 +797,16 @@ public SyncPoller, VirtualMachineInstanc * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginUpdate( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { + public SyncPoller, VirtualMachineInstanceInner> + beginUpdate(String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { return this.beginUpdateAsync(resourceUri, virtualMachineInstance, context).getSyncPoller(); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -909,18 +814,17 @@ public SyncPoller, VirtualMachineInstanc * @return the virtual machine instance resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance) { - return beginUpdateAsync(resourceUri, virtualMachineInstance) - .last() + private Mono updateAsync(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance) { + return beginUpdateAsync(resourceUri, virtualMachineInstance).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -929,18 +833,17 @@ private Mono updateAsync( * @return the virtual machine instance resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { - return beginUpdateAsync(resourceUri, virtualMachineInstance, context) - .last() + private Mono updateAsync(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { + return beginUpdateAsync(resourceUri, virtualMachineInstance, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -948,16 +851,16 @@ private Mono updateAsync( * @return the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInstanceInner update( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance) { + public VirtualMachineInstanceInner update(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance) { return updateAsync(resourceUri, virtualMachineInstance).block(); } /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -966,60 +869,55 @@ public VirtualMachineInstanceInner update( * @return the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInstanceInner update( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { + public VirtualMachineInstanceInner update(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { return updateAsync(resourceUri, virtualMachineInstance, context).block(); } /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.start(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.start(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -1031,33 +929,28 @@ private Mono>> startWithResponseAsync(String resourceU /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link PollerFlux} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInstanceInner> beginStartAsync( - String resourceUri) { + private PollerFlux, VirtualMachineInstanceInner> + beginStartAsync(String resourceUri) { Mono>> mono = startWithResponseAsync(resourceUri); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + this.client.getContext()); } /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1065,41 +958,36 @@ private PollerFlux, VirtualMachineInstan * @return the {@link PollerFlux} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInstanceInner> beginStartAsync( - String resourceUri, Context context) { + private PollerFlux, VirtualMachineInstanceInner> + beginStartAsync(String resourceUri, Context context) { context = this.client.mergeContext(context); Mono>> mono = startWithResponseAsync(resourceUri, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + context); } /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginStart( - String resourceUri) { + public SyncPoller, VirtualMachineInstanceInner> + beginStart(String resourceUri) { return this.beginStartAsync(resourceUri).getSyncPoller(); } /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1107,16 +995,16 @@ public SyncPoller, VirtualMachineInstanc * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginStart( - String resourceUri, Context context) { + public SyncPoller, VirtualMachineInstanceInner> + beginStart(String resourceUri, Context context) { return this.beginStartAsync(resourceUri, context).getSyncPoller(); } /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1129,9 +1017,9 @@ private Mono startAsync(String resourceUri) { /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1145,9 +1033,9 @@ private Mono startAsync(String resourceUri, Context /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1160,9 +1048,9 @@ public VirtualMachineInstanceInner start(String resourceUri) { /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1176,53 +1064,48 @@ public VirtualMachineInstanceInner start(String resourceUri, Context context) { /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.stop(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.stop(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -1234,33 +1117,28 @@ private Mono>> stopWithResponseAsync(String resourceUr /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link PollerFlux} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInstanceInner> beginStopAsync( - String resourceUri) { + private PollerFlux, VirtualMachineInstanceInner> + beginStopAsync(String resourceUri) { Mono>> mono = stopWithResponseAsync(resourceUri); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + this.client.getContext()); } /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1268,41 +1146,36 @@ private PollerFlux, VirtualMachineInstan * @return the {@link PollerFlux} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInstanceInner> beginStopAsync( - String resourceUri, Context context) { + private PollerFlux, VirtualMachineInstanceInner> + beginStopAsync(String resourceUri, Context context) { context = this.client.mergeContext(context); Mono>> mono = stopWithResponseAsync(resourceUri, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + context); } /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginStop( - String resourceUri) { + public SyncPoller, VirtualMachineInstanceInner> + beginStop(String resourceUri) { return this.beginStopAsync(resourceUri).getSyncPoller(); } /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1310,16 +1183,16 @@ public SyncPoller, VirtualMachineInstanc * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginStop( - String resourceUri, Context context) { + public SyncPoller, VirtualMachineInstanceInner> + beginStop(String resourceUri, Context context) { return this.beginStopAsync(resourceUri, context).getSyncPoller(); } /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1332,9 +1205,9 @@ private Mono stopAsync(String resourceUri) { /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1348,9 +1221,9 @@ private Mono stopAsync(String resourceUri, Context /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1363,9 +1236,9 @@ public VirtualMachineInstanceInner stop(String resourceUri) { /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1379,54 +1252,48 @@ public VirtualMachineInstanceInner stop(String resourceUri, Context context) { /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .restart(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.restart(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 virtual machine instance resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); @@ -1438,33 +1305,28 @@ private Mono>> restartWithResponseAsync(String resourc /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link PollerFlux} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInstanceInner> beginRestartAsync( - String resourceUri) { + private PollerFlux, VirtualMachineInstanceInner> + beginRestartAsync(String resourceUri) { Mono>> mono = restartWithResponseAsync(resourceUri); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + this.client.getContext()); } /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1472,41 +1334,36 @@ private PollerFlux, VirtualMachineInstan * @return the {@link PollerFlux} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualMachineInstanceInner> beginRestartAsync( - String resourceUri, Context context) { + private PollerFlux, VirtualMachineInstanceInner> + beginRestartAsync(String resourceUri, Context context) { context = this.client.mergeContext(context); Mono>> mono = restartWithResponseAsync(resourceUri, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - VirtualMachineInstanceInner.class, - VirtualMachineInstanceInner.class, - context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualMachineInstanceInner.class, VirtualMachineInstanceInner.class, + context); } /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginRestart( - String resourceUri) { + public SyncPoller, VirtualMachineInstanceInner> + beginRestart(String resourceUri) { return this.beginRestartAsync(resourceUri).getSyncPoller(); } /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1514,16 +1371,16 @@ public SyncPoller, VirtualMachineInstanc * @return the {@link SyncPoller} for polling of the virtual machine instance resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualMachineInstanceInner> beginRestart( - String resourceUri, Context context) { + public SyncPoller, VirtualMachineInstanceInner> + beginRestart(String resourceUri, Context context) { return this.beginRestartAsync(resourceUri, context).getSyncPoller(); } /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1536,9 +1393,9 @@ private Mono restartAsync(String resourceUri) { /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1552,9 +1409,9 @@ private Mono restartAsync(String resourceUri, Conte /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1567,9 +1424,9 @@ public VirtualMachineInstanceInner restart(String resourceUri) { /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1583,9 +1440,9 @@ public VirtualMachineInstanceInner restart(String resourceUri, Context context) /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1594,36 +1451,26 @@ public VirtualMachineInstanceInner restart(String resourceUri, Context context) @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1633,34 +1480,24 @@ private Mono> listSinglePageAsync(Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceUri == null) { return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1673,9 +1510,9 @@ private PagedFlux listAsync(String resourceUri) { /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1684,15 +1521,15 @@ private PagedFlux listAsync(String resourceUri) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceUri, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceUri, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1705,9 +1542,9 @@ public PagedIterable list(String resourceUri) { /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1721,9 +1558,10 @@ public PagedIterable list(String resourceUri, Conte /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1735,31 +1573,22 @@ private Mono> listNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1772,23 +1601,13 @@ private Mono> listNextSinglePageAsync return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstancesImpl.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstancesImpl.java index ff59ab561cfa3..1de985bf98c5f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstancesImpl.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/VirtualMachineInstancesImpl.java @@ -12,8 +12,8 @@ import com.azure.resourcemanager.azurestackhci.fluent.VirtualMachineInstancesClient; import com.azure.resourcemanager.azurestackhci.fluent.models.VirtualMachineInstanceInner; import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstance; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpdateRequest; import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstances; +import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpdateRequest; public final class VirtualMachineInstancesImpl implements VirtualMachineInstances { private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineInstancesImpl.class); @@ -22,8 +22,7 @@ public final class VirtualMachineInstancesImpl implements VirtualMachineInstance private final com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager; - public VirtualMachineInstancesImpl( - VirtualMachineInstancesClient innerClient, + public VirtualMachineInstancesImpl(VirtualMachineInstancesClient innerClient, com.azure.resourcemanager.azurestackhci.AzureStackHciManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -32,10 +31,7 @@ public VirtualMachineInstancesImpl( public Response getWithResponse(String resourceUri, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new VirtualMachineInstanceImpl(inner.getValue(), this.manager())); } else { return null; @@ -51,8 +47,8 @@ public VirtualMachineInstance get(String resourceUri) { } } - public VirtualMachineInstance createOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance) { + public VirtualMachineInstance createOrUpdate(String resourceUri, + VirtualMachineInstanceInner virtualMachineInstance) { VirtualMachineInstanceInner inner = this.serviceClient().createOrUpdate(resourceUri, virtualMachineInstance); if (inner != null) { return new VirtualMachineInstanceImpl(inner, this.manager()); @@ -61,10 +57,10 @@ public VirtualMachineInstance createOrUpdate( } } - public VirtualMachineInstance createOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context) { - VirtualMachineInstanceInner inner = - this.serviceClient().createOrUpdate(resourceUri, virtualMachineInstance, context); + public VirtualMachineInstance createOrUpdate(String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, + Context context) { + VirtualMachineInstanceInner inner + = this.serviceClient().createOrUpdate(resourceUri, virtualMachineInstance, context); if (inner != null) { return new VirtualMachineInstanceImpl(inner, this.manager()); } else { @@ -80,8 +76,8 @@ public void delete(String resourceUri, Context context) { this.serviceClient().delete(resourceUri, context); } - public VirtualMachineInstance update( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance) { + public VirtualMachineInstance update(String resourceUri, + VirtualMachineInstanceUpdateRequest virtualMachineInstance) { VirtualMachineInstanceInner inner = this.serviceClient().update(resourceUri, virtualMachineInstance); if (inner != null) { return new VirtualMachineInstanceImpl(inner, this.manager()); @@ -90,8 +86,8 @@ public VirtualMachineInstance update( } } - public VirtualMachineInstance update( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context) { + public VirtualMachineInstance update(String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, + Context context) { VirtualMachineInstanceInner inner = this.serviceClient().update(resourceUri, virtualMachineInstance, context); if (inner != null) { return new VirtualMachineInstanceImpl(inner, this.manager()); @@ -156,12 +152,12 @@ public VirtualMachineInstance restart(String resourceUri, Context context) { public PagedIterable list(String resourceUri) { PagedIterable inner = this.serviceClient().list(resourceUri); - return Utils.mapPage(inner, inner1 -> new VirtualMachineInstanceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineInstanceImpl(inner1, this.manager())); } public PagedIterable list(String resourceUri, Context context) { PagedIterable inner = this.serviceClient().list(resourceUri, context); - return Utils.mapPage(inner, inner1 -> new VirtualMachineInstanceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineInstanceImpl(inner1, this.manager())); } private VirtualMachineInstancesClient serviceClient() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java index 50dee0db23a33..8c4a6cee86304 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for AzureStackHciClient. Azure Stack HCI management service. */ +/** + * Package containing the implementations for AzureStackHciClient. + * Azure Stack HCI management service. + */ package com.azure.resourcemanager.azurestackhci.implementation; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java index aa1ce726b5b4a..da965bc4ae288 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ActionType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ public static final ActionType INTERNAL = fromString("Internal"); /** * Creates a new instance of ActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ActionType() { /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -35,7 +39,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AdapterPropertyOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AdapterPropertyOverrides.java new file mode 100644 index 0000000000000..fd6bd50ff4210 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AdapterPropertyOverrides.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AdapterPropertyOverrides of a cluster. + */ +@Fluent +public final class AdapterPropertyOverrides { + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. + */ + @JsonProperty(value = "jumboPacket") + private String jumboPacket; + + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. + */ + @JsonProperty(value = "networkDirect") + private String networkDirect; + + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. Expected values are 'iWARP', 'RoCEv2', 'RoCE' + */ + @JsonProperty(value = "networkDirectTechnology") + private String networkDirectTechnology; + + /** + * Creates an instance of AdapterPropertyOverrides class. + */ + public AdapterPropertyOverrides() { + } + + /** + * Get the jumboPacket property: This parameter should only be modified based on your OEM guidance. Do not modify + * this parameter without OEM validation. + * + * @return the jumboPacket value. + */ + public String jumboPacket() { + return this.jumboPacket; + } + + /** + * Set the jumboPacket property: This parameter should only be modified based on your OEM guidance. Do not modify + * this parameter without OEM validation. + * + * @param jumboPacket the jumboPacket value to set. + * @return the AdapterPropertyOverrides object itself. + */ + public AdapterPropertyOverrides withJumboPacket(String jumboPacket) { + this.jumboPacket = jumboPacket; + return this; + } + + /** + * Get the networkDirect property: This parameter should only be modified based on your OEM guidance. Do not modify + * this parameter without OEM validation. + * + * @return the networkDirect value. + */ + public String networkDirect() { + return this.networkDirect; + } + + /** + * Set the networkDirect property: This parameter should only be modified based on your OEM guidance. Do not modify + * this parameter without OEM validation. + * + * @param networkDirect the networkDirect value to set. + * @return the AdapterPropertyOverrides object itself. + */ + public AdapterPropertyOverrides withNetworkDirect(String networkDirect) { + this.networkDirect = networkDirect; + return this; + } + + /** + * Get the networkDirectTechnology property: This parameter should only be modified based on your OEM guidance. Do + * not modify this parameter without OEM validation. Expected values are 'iWARP', 'RoCEv2', 'RoCE'. + * + * @return the networkDirectTechnology value. + */ + public String networkDirectTechnology() { + return this.networkDirectTechnology; + } + + /** + * Set the networkDirectTechnology property: This parameter should only be modified based on your OEM guidance. Do + * not modify this parameter without OEM validation. Expected values are 'iWARP', 'RoCEv2', 'RoCE'. + * + * @param networkDirectTechnology the networkDirectTechnology value to set. + * @return the AdapterPropertyOverrides object itself. + */ + public AdapterPropertyOverrides withNetworkDirectTechnology(String networkDirectTechnology) { + this.networkDirectTechnology = networkDirectTechnology; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java new file mode 100644 index 0000000000000..efe6947ba297f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcIdentityResponse.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner; + +/** + * An immutable client-side representation of ArcIdentityResponse. + */ +public interface ArcIdentityResponse { + /** + * Gets the arcApplicationClientId property: The arcApplicationClientId property. + * + * @return the arcApplicationClientId value. + */ + String arcApplicationClientId(); + + /** + * Gets the arcApplicationTenantId property: The arcApplicationTenantId property. + * + * @return the arcApplicationTenantId value. + */ + String arcApplicationTenantId(); + + /** + * Gets the arcServicePrincipalObjectId property: The arcServicePrincipalObjectId property. + * + * @return the arcServicePrincipalObjectId value. + */ + String arcServicePrincipalObjectId(); + + /** + * Gets the arcApplicationObjectId property: The arcApplicationObjectId property. + * + * @return the arcApplicationObjectId value. + */ + String arcApplicationObjectId(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner object. + * + * @return the inner object. + */ + ArcIdentityResponseInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java new file mode 100644 index 0000000000000..e528c6cac869a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSetting.java @@ -0,0 +1,419 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ArcSetting. + */ +public interface ArcSetting { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the ArcSetting proxy resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid Compute + * Machine resources. + * + * @return the arcInstanceResourceGroup value. + */ + String arcInstanceResourceGroup(); + + /** + * Gets the arcApplicationClientId property: App id of arc AAD identity. + * + * @return the arcApplicationClientId value. + */ + String arcApplicationClientId(); + + /** + * Gets the arcApplicationTenantId property: Tenant id of arc AAD identity. + * + * @return the arcApplicationTenantId value. + */ + String arcApplicationTenantId(); + + /** + * Gets the arcServicePrincipalObjectId property: Object id of arc AAD service principal. + * + * @return the arcServicePrincipalObjectId value. + */ + String arcServicePrincipalObjectId(); + + /** + * Gets the arcApplicationObjectId property: Object id of arc AAD identity. + * + * @return the arcApplicationObjectId value. + */ + String arcApplicationObjectId(); + + /** + * Gets the aggregateState property: Aggregate state of Arc agent across the nodes in this HCI cluster. + * + * @return the aggregateState value. + */ + ArcSettingAggregateState aggregateState(); + + /** + * Gets the perNodeDetails property: State of Arc agent in each of the nodes. + * + * @return the perNodeDetails value. + */ + List perNodeDetails(); + + /** + * Gets the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @return the connectivityProperties value. + */ + Object connectivityProperties(); + + /** + * Gets the defaultExtensions property: Properties for each of the default extensions category. + * + * @return the defaultExtensions value. + */ + List defaultExtensions(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner object. + * + * @return the inner object. + */ + ArcSettingInner innerModel(); + + /** + * The entirety of the ArcSetting definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ArcSetting definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ArcSetting definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ArcSetting definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @return the next definition stage. + */ + WithCreate withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the ArcSetting 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.WithArcInstanceResourceGroup, DefinitionStages.WithArcApplicationClientId, + DefinitionStages.WithArcApplicationTenantId, DefinitionStages.WithArcServicePrincipalObjectId, + DefinitionStages.WithArcApplicationObjectId, DefinitionStages.WithConnectivityProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ArcSetting create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ArcSetting create(Context context); + } + + /** + * The stage of the ArcSetting definition allowing to specify arcInstanceResourceGroup. + */ + interface WithArcInstanceResourceGroup { + /** + * Specifies the arcInstanceResourceGroup property: The resource group that hosts the Arc agents, ie. Hybrid + * Compute Machine resources.. + * + * @param arcInstanceResourceGroup The resource group that hosts the Arc agents, ie. Hybrid Compute Machine + * resources. + * @return the next definition stage. + */ + WithCreate withArcInstanceResourceGroup(String arcInstanceResourceGroup); + } + + /** + * The stage of the ArcSetting definition allowing to specify arcApplicationClientId. + */ + interface WithArcApplicationClientId { + /** + * Specifies the arcApplicationClientId property: App id of arc AAD identity.. + * + * @param arcApplicationClientId App id of arc AAD identity. + * @return the next definition stage. + */ + WithCreate withArcApplicationClientId(String arcApplicationClientId); + } + + /** + * The stage of the ArcSetting definition allowing to specify arcApplicationTenantId. + */ + interface WithArcApplicationTenantId { + /** + * Specifies the arcApplicationTenantId property: Tenant id of arc AAD identity.. + * + * @param arcApplicationTenantId Tenant id of arc AAD identity. + * @return the next definition stage. + */ + WithCreate withArcApplicationTenantId(String arcApplicationTenantId); + } + + /** + * The stage of the ArcSetting definition allowing to specify arcServicePrincipalObjectId. + */ + interface WithArcServicePrincipalObjectId { + /** + * Specifies the arcServicePrincipalObjectId property: Object id of arc AAD service principal.. + * + * @param arcServicePrincipalObjectId Object id of arc AAD service principal. + * @return the next definition stage. + */ + WithCreate withArcServicePrincipalObjectId(String arcServicePrincipalObjectId); + } + + /** + * The stage of the ArcSetting definition allowing to specify arcApplicationObjectId. + */ + interface WithArcApplicationObjectId { + /** + * Specifies the arcApplicationObjectId property: Object id of arc AAD identity.. + * + * @param arcApplicationObjectId Object id of arc AAD identity. + * @return the next definition stage. + */ + WithCreate withArcApplicationObjectId(String arcApplicationObjectId); + } + + /** + * The stage of the ArcSetting definition allowing to specify connectivityProperties. + */ + interface WithConnectivityProperties { + /** + * Specifies the connectivityProperties property: contains connectivity related configuration for ARC + * resources. + * + * @param connectivityProperties contains connectivity related configuration for ARC resources. + * @return the next definition stage. + */ + WithCreate withConnectivityProperties(Object connectivityProperties); + } + } + + /** + * Begins update for the ArcSetting resource. + * + * @return the stage of resource update. + */ + ArcSetting.Update update(); + + /** + * The template for ArcSetting update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithConnectivityProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ArcSetting apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ArcSetting apply(Context context); + } + + /** + * The ArcSetting update stages. + */ + interface UpdateStages { + /** + * The stage of the ArcSetting 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 tags); + } + + /** + * The stage of the ArcSetting update allowing to specify connectivityProperties. + */ + interface WithConnectivityProperties { + /** + * Specifies the connectivityProperties property: contains connectivity related configuration for ARC + * resources. + * + * @param connectivityProperties contains connectivity related configuration for ARC resources. + * @return the next definition stage. + */ + Update withConnectivityProperties(Object connectivityProperties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ArcSetting refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ArcSetting refresh(Context context); + + /** + * Generate password for arc settings. + * + * @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 generatePasswordWithResponse(Context context); + + /** + * Generate password for arc settings. + * + * @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. + */ + PasswordCredential generatePassword(); + + /** + * Create Aad identity for arc settings. + * + * @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 arcIdentity details. + */ + ArcIdentityResponse createIdentity(); + + /** + * Create Aad identity for arc settings. + * + * @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 arcIdentity details. + */ + ArcIdentityResponse createIdentity(Context context); + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @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 arcSetting details along with {@link Response}. + */ + Response consentAndInstallDefaultExtensionsWithResponse(Context context); + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @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 arcSetting details. + */ + ArcSetting consentAndInstallDefaultExtensions(); + + /** + * Initializes ARC Disable process on the cluster. + * + * @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 initializeDisableProcess(); + + /** + * Initializes ARC Disable process on the cluster. + * + * @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 initializeDisableProcess(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java new file mode 100644 index 0000000000000..bd13c2daac453 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingAggregateState.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Aggregate state of Arc agent across the nodes in this HCI cluster. + */ +public final class ArcSettingAggregateState extends ExpandableStringEnum { + /** + * Static value NotSpecified for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Error for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState ERROR = fromString("Error"); + + /** + * Static value Succeeded for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Canceled for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState CANCELED = fromString("Canceled"); + + /** + * Static value Failed for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState FAILED = fromString("Failed"); + + /** + * Static value Connected for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState CONNECTED = fromString("Connected"); + + /** + * Static value Disconnected for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState DISCONNECTED = fromString("Disconnected"); + + /** + * Static value Deleted for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState DELETED = fromString("Deleted"); + + /** + * Static value Creating for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState CREATING = fromString("Creating"); + + /** + * Static value Updating for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState DELETING = fromString("Deleting"); + + /** + * Static value Moving for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState MOVING = fromString("Moving"); + + /** + * Static value PartiallySucceeded for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); + + /** + * Static value PartiallyConnected for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); + + /** + * Static value InProgress for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Accepted for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState ACCEPTED = fromString("Accepted"); + + /** + * Static value Provisioning for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState PROVISIONING = fromString("Provisioning"); + + /** + * Static value DisableInProgress for ArcSettingAggregateState. + */ + public static final ArcSettingAggregateState DISABLE_IN_PROGRESS = fromString("DisableInProgress"); + + /** + * Creates a new instance of ArcSettingAggregateState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ArcSettingAggregateState() { + } + + /** + * Creates or finds a ArcSettingAggregateState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ArcSettingAggregateState. + */ + @JsonCreator + public static ArcSettingAggregateState fromString(String name) { + return fromString(name, ArcSettingAggregateState.class); + } + + /** + * Gets known ArcSettingAggregateState values. + * + * @return known ArcSettingAggregateState values. + */ + public static Collection values() { + return values(ArcSettingAggregateState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingList.java new file mode 100644 index 0000000000000..66d11d4893a1c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingList.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of ArcSetting proxy resources for the HCI cluster. + */ +@Immutable +public final class ArcSettingList { + /* + * List of ArcSetting proxy resources. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ArcSettingList class. + */ + public ArcSettingList() { + } + + /** + * Get the value property: List of ArcSetting proxy resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java new file mode 100644 index 0000000000000..c6bd1caac823a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettings.java @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ArcSettings. + */ +public interface ArcSettings { + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * Get ArcSetting resources of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 arcSetting resources of HCI Cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcSetting resource details of HCI Cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + Context context); + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcSetting resource details of HCI Cluster. + */ + ArcSetting get(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 delete(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 delete(String resourceGroupName, String clusterName, String arcSettingName, Context context); + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 generatePasswordWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, Context context); + + /** + * Generate password for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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. + */ + PasswordCredential generatePassword(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcIdentity details. + */ + ArcIdentityResponse createIdentity(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Create Aad identity for arc settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcIdentity details. + */ + ArcIdentityResponse createIdentity(String resourceGroupName, String clusterName, String arcSettingName, + Context context); + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcSetting details along with {@link Response}. + */ + Response consentAndInstallDefaultExtensionsWithResponse(String resourceGroupName, String clusterName, + String arcSettingName, Context context); + + /** + * Add consent time for default extensions and initiate extensions installation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 arcSetting details. + */ + ArcSetting consentAndInstallDefaultExtensions(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * Initializes ARC Disable process on the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 initializeDisableProcess(String resourceGroupName, String clusterName, String arcSettingName, Context context); + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param id the resource ID. + * @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 arcSetting resource details of HCI Cluster along with {@link Response}. + */ + ArcSetting getById(String id); + + /** + * Get ArcSetting resource details of HCI Cluster. + * + * @param id the resource ID. + * @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 arcSetting resource details of HCI Cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param id the resource ID. + * @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 deleteById(String id); + + /** + * Delete ArcSetting resource details of HCI Cluster. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ArcSetting resource. + * + * @param name resource name. + * @return the first stage of the new ArcSetting definition. + */ + ArcSetting.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java new file mode 100644 index 0000000000000..c30c9ac9064ac --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ArcSettingsPatch.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingsPatchProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * ArcSetting details to update. + */ +@Fluent +public final class ArcSettingsPatch { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * ArcSettings properties. + */ + @JsonProperty(value = "properties") + private ArcSettingsPatchProperties innerProperties; + + /** + * Creates an instance of ArcSettingsPatch class. + */ + public ArcSettingsPatch() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ArcSettingsPatch object itself. + */ + public ArcSettingsPatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: ArcSettings properties. + * + * @return the innerProperties value. + */ + private ArcSettingsPatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @return the connectivityProperties value. + */ + public Object connectivityProperties() { + return this.innerProperties() == null ? null : this.innerProperties().connectivityProperties(); + } + + /** + * Set the connectivityProperties property: contains connectivity related configuration for ARC resources. + * + * @param connectivityProperties the connectivityProperties value to set. + * @return the ArcSettingsPatch object itself. + */ + public ArcSettingsPatch withConnectivityProperties(Object connectivityProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new ArcSettingsPatchProperties(); + } + this.innerProperties().withConnectivityProperties(connectivityProperties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java new file mode 100644 index 0000000000000..a947719bc623a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/AvailabilityType.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates the way the update content can be downloaded. + */ +public final class AvailabilityType extends ExpandableStringEnum { + /** + * Static value Local for AvailabilityType. + */ + public static final AvailabilityType LOCAL = fromString("Local"); + + /** + * Static value Online for AvailabilityType. + */ + public static final AvailabilityType ONLINE = fromString("Online"); + + /** + * Static value Notify for AvailabilityType. + */ + public static final AvailabilityType NOTIFY = fromString("Notify"); + + /** + * Creates a new instance of AvailabilityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AvailabilityType() { + } + + /** + * Creates or finds a AvailabilityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AvailabilityType. + */ + @JsonCreator + public static AvailabilityType fromString(String name) { + return fromString(name, AvailabilityType.class); + } + + /** + * Gets known AvailabilityType values. + * + * @return known AvailabilityType values. + */ + public static Collection values() { + return values(AvailabilityType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/CloudInitDataSource.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/CloudInitDataSource.java index 501aace99479f..055145a61af91 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/CloudInitDataSource.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/CloudInitDataSource.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure]. */ +/** + * Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure]. + */ public final class CloudInitDataSource extends ExpandableStringEnum { - /** Static value NoCloud for CloudInitDataSource. */ + /** + * Static value NoCloud for CloudInitDataSource. + */ public static final CloudInitDataSource NO_CLOUD = fromString("NoCloud"); - /** Static value Azure for CloudInitDataSource. */ + /** + * Static value Azure for CloudInitDataSource. + */ public static final CloudInitDataSource AZURE = fromString("Azure"); /** * Creates a new instance of CloudInitDataSource value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public CloudInitDataSource() { /** * Creates or finds a CloudInitDataSource from its string representation. - * + * * @param name a name to look for. * @return the corresponding CloudInitDataSource. */ @@ -38,7 +44,7 @@ public static CloudInitDataSource fromString(String name) { /** * Gets known CloudInitDataSource values. - * + * * @return known CloudInitDataSource values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java new file mode 100644 index 0000000000000..bbe497995eb25 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Cluster.java @@ -0,0 +1,692 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; +import java.time.OffsetDateTime; +import java.util.Map; +import java.util.UUID; + +/** + * An immutable client-side representation of Cluster. + */ +public interface Cluster { + /** + * 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 tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + UUID principalId(); + + /** + * Gets the tenantId property: The tenant ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * + * @return the tenantId value. + */ + UUID tenantId(); + + /** + * Gets the typeIdentityType property: Type of managed service identity (where both SystemAssigned and UserAssigned + * types are allowed). + * + * @return the typeIdentityType value. + */ + ManagedServiceIdentityType typeIdentityType(); + + /** + * Gets the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + Map userAssignedIdentities(); + + /** + * Gets the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: Status of the cluster agent. + * + * @return the status value. + */ + Status status(); + + /** + * Gets the connectivityStatus property: Overall connectivity status for the cluster resource. + * + * @return the connectivityStatus value. + */ + ConnectivityStatus connectivityStatus(); + + /** + * Gets the cloudId property: Unique, immutable resource id. + * + * @return the cloudId value. + */ + String cloudId(); + + /** + * Gets the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @return the cloudManagementEndpoint value. + */ + String cloudManagementEndpoint(); + + /** + * Gets the aadClientId property: App id of cluster AAD identity. + * + * @return the aadClientId value. + */ + String aadClientId(); + + /** + * Gets the aadTenantId property: Tenant id of cluster AAD identity. + * + * @return the aadTenantId value. + */ + String aadTenantId(); + + /** + * Gets the aadApplicationObjectId property: Object id of cluster AAD identity. + * + * @return the aadApplicationObjectId value. + */ + String aadApplicationObjectId(); + + /** + * Gets the aadServicePrincipalObjectId property: Id of cluster identity service principal. + * + * @return the aadServicePrincipalObjectId value. + */ + String aadServicePrincipalObjectId(); + + /** + * Gets the softwareAssuranceProperties property: Software Assurance properties of the cluster. + * + * @return the softwareAssuranceProperties value. + */ + SoftwareAssuranceProperties softwareAssuranceProperties(); + + /** + * Gets the desiredProperties property: Desired properties of the cluster. + * + * @return the desiredProperties value. + */ + ClusterDesiredProperties desiredProperties(); + + /** + * Gets the reportedProperties property: Properties reported by cluster agent. + * + * @return the reportedProperties value. + */ + ClusterReportedProperties reportedProperties(); + + /** + * Gets the isolatedVmAttestationConfiguration property: Attestation configurations for isolated VM (e.g. TVM, CVM) + * of the cluster. + * + * @return the isolatedVmAttestationConfiguration value. + */ + IsolatedVmAttestationConfiguration isolatedVmAttestationConfiguration(); + + /** + * Gets the trialDaysRemaining property: Number of days remaining in the trial period. + * + * @return the trialDaysRemaining value. + */ + Float trialDaysRemaining(); + + /** + * Gets the billingModel property: Type of billing applied to the resource. + * + * @return the billingModel value. + */ + String billingModel(); + + /** + * Gets the registrationTimestamp property: First cluster sync timestamp. + * + * @return the registrationTimestamp value. + */ + OffsetDateTime registrationTimestamp(); + + /** + * Gets the lastSyncTimestamp property: Most recent cluster sync timestamp. + * + * @return the lastSyncTimestamp value. + */ + OffsetDateTime lastSyncTimestamp(); + + /** + * Gets the lastBillingTimestamp property: Most recent billing meter timestamp. + * + * @return the lastBillingTimestamp value. + */ + OffsetDateTime lastBillingTimestamp(); + + /** + * Gets the serviceEndpoint property: Region specific DataPath Endpoint of the cluster. + * + * @return the serviceEndpoint value. + */ + String serviceEndpoint(); + + /** + * Gets the resourceProviderObjectId property: Object id of RP Service Principal. + * + * @return the resourceProviderObjectId value. + */ + String resourceProviderObjectId(); + + /** + * 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.azurestackhci.fluent.models.ClusterInner object. + * + * @return the inner object. + */ + ClusterInner innerModel(); + + /** + * The entirety of the Cluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The Cluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Cluster definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Cluster 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 Cluster 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. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the Cluster 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.WithTypeIdentityType, + DefinitionStages.WithUserAssignedIdentities, DefinitionStages.WithCloudManagementEndpoint, + DefinitionStages.WithAadClientId, DefinitionStages.WithAadTenantId, + DefinitionStages.WithAadApplicationObjectId, DefinitionStages.WithAadServicePrincipalObjectId, + DefinitionStages.WithSoftwareAssuranceProperties, DefinitionStages.WithDesiredProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + Cluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Cluster create(Context context); + } + + /** + * The stage of the Cluster 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 tags); + } + + /** + * The stage of the Cluster definition allowing to specify typeIdentityType. + */ + interface WithTypeIdentityType { + /** + * Specifies the typeIdentityType property: Type of managed service identity (where both SystemAssigned and + * UserAssigned types are allowed).. + * + * @param typeIdentityType Type of managed service identity (where both SystemAssigned and UserAssigned + * types are allowed). + * @return the next definition stage. + */ + WithCreate withTypeIdentityType(ManagedServiceIdentityType typeIdentityType); + } + + /** + * The stage of the Cluster definition allowing to specify userAssignedIdentities. + */ + interface WithUserAssignedIdentities { + /** + * Specifies the userAssignedIdentities property: The set of user assigned identities associated with the + * resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests.. + * + * @param userAssignedIdentities The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * @return the next definition stage. + */ + WithCreate withUserAssignedIdentities(Map userAssignedIdentities); + } + + /** + * The stage of the Cluster definition allowing to specify cloudManagementEndpoint. + */ + interface WithCloudManagementEndpoint { + /** + * Specifies the cloudManagementEndpoint property: Endpoint configured for management from the Azure + * portal.. + * + * @param cloudManagementEndpoint Endpoint configured for management from the Azure portal. + * @return the next definition stage. + */ + WithCreate withCloudManagementEndpoint(String cloudManagementEndpoint); + } + + /** + * The stage of the Cluster definition allowing to specify aadClientId. + */ + interface WithAadClientId { + /** + * Specifies the aadClientId property: App id of cluster AAD identity.. + * + * @param aadClientId App id of cluster AAD identity. + * @return the next definition stage. + */ + WithCreate withAadClientId(String aadClientId); + } + + /** + * The stage of the Cluster definition allowing to specify aadTenantId. + */ + interface WithAadTenantId { + /** + * Specifies the aadTenantId property: Tenant id of cluster AAD identity.. + * + * @param aadTenantId Tenant id of cluster AAD identity. + * @return the next definition stage. + */ + WithCreate withAadTenantId(String aadTenantId); + } + + /** + * The stage of the Cluster definition allowing to specify aadApplicationObjectId. + */ + interface WithAadApplicationObjectId { + /** + * Specifies the aadApplicationObjectId property: Object id of cluster AAD identity.. + * + * @param aadApplicationObjectId Object id of cluster AAD identity. + * @return the next definition stage. + */ + WithCreate withAadApplicationObjectId(String aadApplicationObjectId); + } + + /** + * The stage of the Cluster definition allowing to specify aadServicePrincipalObjectId. + */ + interface WithAadServicePrincipalObjectId { + /** + * Specifies the aadServicePrincipalObjectId property: Id of cluster identity service principal.. + * + * @param aadServicePrincipalObjectId Id of cluster identity service principal. + * @return the next definition stage. + */ + WithCreate withAadServicePrincipalObjectId(String aadServicePrincipalObjectId); + } + + /** + * The stage of the Cluster definition allowing to specify softwareAssuranceProperties. + */ + interface WithSoftwareAssuranceProperties { + /** + * Specifies the softwareAssuranceProperties property: Software Assurance properties of the cluster.. + * + * @param softwareAssuranceProperties Software Assurance properties of the cluster. + * @return the next definition stage. + */ + WithCreate withSoftwareAssuranceProperties(SoftwareAssuranceProperties softwareAssuranceProperties); + } + + /** + * The stage of the Cluster definition allowing to specify desiredProperties. + */ + interface WithDesiredProperties { + /** + * Specifies the desiredProperties property: Desired properties of the cluster.. + * + * @param desiredProperties Desired properties of the cluster. + * @return the next definition stage. + */ + WithCreate withDesiredProperties(ClusterDesiredProperties desiredProperties); + } + } + + /** + * Begins update for the Cluster resource. + * + * @return the stage of resource update. + */ + Cluster.Update update(); + + /** + * The template for Cluster update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithType, UpdateStages.WithUserAssignedIdentities, + UpdateStages.WithCloudManagementEndpoint, UpdateStages.WithAadClientId, UpdateStages.WithAadTenantId, + UpdateStages.WithDesiredProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Cluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Cluster apply(Context context); + } + + /** + * The Cluster update stages. + */ + interface UpdateStages { + /** + * The stage of the Cluster 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 tags); + } + + /** + * The stage of the Cluster update allowing to specify type. + */ + interface WithType { + /** + * Specifies the type property: Type of managed service identity (where both SystemAssigned and UserAssigned + * types are allowed).. + * + * @param type Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * @return the next definition stage. + */ + Update withType(ManagedServiceIdentityType type); + } + + /** + * The stage of the Cluster update allowing to specify userAssignedIdentities. + */ + interface WithUserAssignedIdentities { + /** + * Specifies the userAssignedIdentities property: The set of user assigned identities associated with the + * resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests.. + * + * @param userAssignedIdentities The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * @return the next definition stage. + */ + Update withUserAssignedIdentities(Map userAssignedIdentities); + } + + /** + * The stage of the Cluster update allowing to specify cloudManagementEndpoint. + */ + interface WithCloudManagementEndpoint { + /** + * Specifies the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @param cloudManagementEndpoint Endpoint configured for management from the Azure portal. + * @return the next definition stage. + */ + Update withCloudManagementEndpoint(String cloudManagementEndpoint); + } + + /** + * The stage of the Cluster update allowing to specify aadClientId. + */ + interface WithAadClientId { + /** + * Specifies the aadClientId property: App id of cluster AAD identity.. + * + * @param aadClientId App id of cluster AAD identity. + * @return the next definition stage. + */ + Update withAadClientId(String aadClientId); + } + + /** + * The stage of the Cluster update allowing to specify aadTenantId. + */ + interface WithAadTenantId { + /** + * Specifies the aadTenantId property: Tenant id of cluster AAD identity.. + * + * @param aadTenantId Tenant id of cluster AAD identity. + * @return the next definition stage. + */ + Update withAadTenantId(String aadTenantId); + } + + /** + * The stage of the Cluster update allowing to specify desiredProperties. + */ + interface WithDesiredProperties { + /** + * Specifies the desiredProperties property: Desired properties of the cluster.. + * + * @param desiredProperties Desired properties of the cluster. + * @return the next definition stage. + */ + Update withDesiredProperties(ClusterDesiredProperties desiredProperties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Cluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Cluster refresh(Context context); + + /** + * Upload certificate. + * + * @param uploadCertificateRequest Upload certificate request. + * @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 uploadCertificate(UploadCertificateRequest uploadCertificateRequest); + + /** + * Upload certificate. + * + * @param uploadCertificateRequest Upload certificate request. + * @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 uploadCertificate(UploadCertificateRequest uploadCertificateRequest, Context context); + + /** + * Create cluster identity. + * + * @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 cluster Identity details. + */ + ClusterIdentityResponse createIdentity(); + + /** + * Create cluster identity. + * + * @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 cluster Identity details. + */ + ClusterIdentityResponse createIdentity(Context context); + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @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 cluster details. + */ + Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest); + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @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 cluster details. + */ + Cluster extendSoftwareAssuranceBenefit(SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, + Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java new file mode 100644 index 0000000000000..505a0c97837c0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterDesiredProperties.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Desired properties of the cluster. + */ +@Fluent +public final class ClusterDesiredProperties { + /* + * Desired state of Windows Server Subscription. + */ + @JsonProperty(value = "windowsServerSubscription") + private WindowsServerSubscription windowsServerSubscription; + + /* + * Desired level of diagnostic data emitted by the cluster. + */ + @JsonProperty(value = "diagnosticLevel") + private DiagnosticLevel diagnosticLevel; + + /** + * Creates an instance of ClusterDesiredProperties class. + */ + public ClusterDesiredProperties() { + } + + /** + * Get the windowsServerSubscription property: Desired state of Windows Server Subscription. + * + * @return the windowsServerSubscription value. + */ + public WindowsServerSubscription windowsServerSubscription() { + return this.windowsServerSubscription; + } + + /** + * Set the windowsServerSubscription property: Desired state of Windows Server Subscription. + * + * @param windowsServerSubscription the windowsServerSubscription value to set. + * @return the ClusterDesiredProperties object itself. + */ + public ClusterDesiredProperties withWindowsServerSubscription(WindowsServerSubscription windowsServerSubscription) { + this.windowsServerSubscription = windowsServerSubscription; + return this; + } + + /** + * Get the diagnosticLevel property: Desired level of diagnostic data emitted by the cluster. + * + * @return the diagnosticLevel value. + */ + public DiagnosticLevel diagnosticLevel() { + return this.diagnosticLevel; + } + + /** + * Set the diagnosticLevel property: Desired level of diagnostic data emitted by the cluster. + * + * @param diagnosticLevel the diagnosticLevel value to set. + * @return the ClusterDesiredProperties object itself. + */ + public ClusterDesiredProperties withDiagnosticLevel(DiagnosticLevel diagnosticLevel) { + this.diagnosticLevel = diagnosticLevel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java new file mode 100644 index 0000000000000..0def28f160e28 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterIdentityResponse.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner; + +/** + * An immutable client-side representation of ClusterIdentityResponse. + */ +public interface ClusterIdentityResponse { + /** + * Gets the aadClientId property: The aadClientId property. + * + * @return the aadClientId value. + */ + String aadClientId(); + + /** + * Gets the aadTenantId property: The aadTenantId property. + * + * @return the aadTenantId value. + */ + String aadTenantId(); + + /** + * Gets the aadServicePrincipalObjectId property: The aadServicePrincipalObjectId property. + * + * @return the aadServicePrincipalObjectId value. + */ + String aadServicePrincipalObjectId(); + + /** + * Gets the aadApplicationObjectId property: The aadApplicationObjectId property. + * + * @return the aadApplicationObjectId value. + */ + String aadApplicationObjectId(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner object. + * + * @return the inner object. + */ + ClusterIdentityResponseInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterList.java new file mode 100644 index 0000000000000..d2b30ac840784 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of clusters. + */ +@Fluent +public final class ClusterList { + /* + * List of clusters. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ClusterList class. + */ + public ClusterList() { + } + + /** + * Get the value property: List of clusters. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of clusters. + * + * @param value the value value to set. + * @return the ClusterList object itself. + */ + public ClusterList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java new file mode 100644 index 0000000000000..dec9491773213 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNode.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Cluster node details. + */ +@Immutable +public final class ClusterNode { + /* + * Name of the cluster node. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Id of the node in the cluster. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private Float id; + + /* + * State of Windows Server Subscription. + */ + @JsonProperty(value = "windowsServerSubscription", access = JsonProperty.Access.WRITE_ONLY) + private WindowsServerSubscription windowsServerSubscription; + + /* + * Type of the cluster node hardware. + */ + @JsonProperty(value = "nodeType", access = JsonProperty.Access.WRITE_ONLY) + private ClusterNodeType nodeType; + + /* + * Edge Hardware Center Resource Id + */ + @JsonProperty(value = "ehcResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String ehcResourceId; + + /* + * Manufacturer of the cluster node hardware. + */ + @JsonProperty(value = "manufacturer", access = JsonProperty.Access.WRITE_ONLY) + private String manufacturer; + + /* + * Model name of the cluster node hardware. + */ + @JsonProperty(value = "model", access = JsonProperty.Access.WRITE_ONLY) + private String model; + + /* + * Operating system running on the cluster node. + */ + @JsonProperty(value = "osName", access = JsonProperty.Access.WRITE_ONLY) + private String osName; + + /* + * Version of the operating system running on the cluster node. + */ + @JsonProperty(value = "osVersion", access = JsonProperty.Access.WRITE_ONLY) + private String osVersion; + + /* + * Display version of the operating system running on the cluster node. + */ + @JsonProperty(value = "osDisplayVersion", access = JsonProperty.Access.WRITE_ONLY) + private String osDisplayVersion; + + /* + * Immutable id of the cluster node. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * Number of physical cores on the cluster node. + */ + @JsonProperty(value = "coreCount", access = JsonProperty.Access.WRITE_ONLY) + private Float coreCount; + + /* + * Total available memory on the cluster node (in GiB). + */ + @JsonProperty(value = "memoryInGiB", access = JsonProperty.Access.WRITE_ONLY) + private Float memoryInGiB; + + /* + * Most recent licensing timestamp. + */ + @JsonProperty(value = "lastLicensingTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastLicensingTimestamp; + + /* + * OEM activation status of the node. + */ + @JsonProperty(value = "oemActivation", access = JsonProperty.Access.WRITE_ONLY) + private OemActivation oemActivation; + + /** + * Creates an instance of ClusterNode class. + */ + public ClusterNode() { + } + + /** + * Get the name property: Name of the cluster node. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the id property: Id of the node in the cluster. + * + * @return the id value. + */ + public Float id() { + return this.id; + } + + /** + * Get the windowsServerSubscription property: State of Windows Server Subscription. + * + * @return the windowsServerSubscription value. + */ + public WindowsServerSubscription windowsServerSubscription() { + return this.windowsServerSubscription; + } + + /** + * Get the nodeType property: Type of the cluster node hardware. + * + * @return the nodeType value. + */ + public ClusterNodeType nodeType() { + return this.nodeType; + } + + /** + * Get the ehcResourceId property: Edge Hardware Center Resource Id. + * + * @return the ehcResourceId value. + */ + public String ehcResourceId() { + return this.ehcResourceId; + } + + /** + * Get the manufacturer property: Manufacturer of the cluster node hardware. + * + * @return the manufacturer value. + */ + public String manufacturer() { + return this.manufacturer; + } + + /** + * Get the model property: Model name of the cluster node hardware. + * + * @return the model value. + */ + public String model() { + return this.model; + } + + /** + * Get the osName property: Operating system running on the cluster node. + * + * @return the osName value. + */ + public String osName() { + return this.osName; + } + + /** + * Get the osVersion property: Version of the operating system running on the cluster node. + * + * @return the osVersion value. + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Get the osDisplayVersion property: Display version of the operating system running on the cluster node. + * + * @return the osDisplayVersion value. + */ + public String osDisplayVersion() { + return this.osDisplayVersion; + } + + /** + * Get the serialNumber property: Immutable id of the cluster node. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the coreCount property: Number of physical cores on the cluster node. + * + * @return the coreCount value. + */ + public Float coreCount() { + return this.coreCount; + } + + /** + * Get the memoryInGiB property: Total available memory on the cluster node (in GiB). + * + * @return the memoryInGiB value. + */ + public Float memoryInGiB() { + return this.memoryInGiB; + } + + /** + * Get the lastLicensingTimestamp property: Most recent licensing timestamp. + * + * @return the lastLicensingTimestamp value. + */ + public OffsetDateTime lastLicensingTimestamp() { + return this.lastLicensingTimestamp; + } + + /** + * Get the oemActivation property: OEM activation status of the node. + * + * @return the oemActivation value. + */ + public OemActivation oemActivation() { + return this.oemActivation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java new file mode 100644 index 0000000000000..717e1e2ea3445 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterNodeType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The node type of all the nodes of the cluster. + */ +public final class ClusterNodeType extends ExpandableStringEnum { + /** + * Static value FirstParty for ClusterNodeType. + */ + public static final ClusterNodeType FIRST_PARTY = fromString("FirstParty"); + + /** + * Static value ThirdParty for ClusterNodeType. + */ + public static final ClusterNodeType THIRD_PARTY = fromString("ThirdParty"); + + /** + * Creates a new instance of ClusterNodeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterNodeType() { + } + + /** + * Creates or finds a ClusterNodeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterNodeType. + */ + @JsonCreator + public static ClusterNodeType fromString(String name) { + return fromString(name, ClusterNodeType.class); + } + + /** + * Gets known ClusterNodeType values. + * + * @return known ClusterNodeType values. + */ + public static Collection values() { + return values(ClusterNodeType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java new file mode 100644 index 0000000000000..80b2a3402da14 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterPatch.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.fluent.models.ClusterPatchProperties; +import com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import java.util.UUID; + +/** + * Cluster details to update. + */ +@Fluent +public final class ClusterPatch { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * Identity of Cluster resource + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity innerIdentity; + + /* + * Cluster properties. + */ + @JsonProperty(value = "properties") + private ClusterPatchProperties innerProperties; + + /** + * Creates an instance of ClusterPatch class. + */ + public ClusterPatch() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ClusterPatch object itself. + */ + public ClusterPatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerIdentity property: Identity of Cluster resource. + * + * @return the innerIdentity value. + */ + private ManagedServiceIdentity innerIdentity() { + return this.innerIdentity; + } + + /** + * Get the innerProperties property: Cluster properties. + * + * @return the innerProperties value. + */ + private ClusterPatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.innerIdentity() == null ? null : this.innerIdentity().principalId(); + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.innerIdentity() == null ? null : this.innerIdentity().tenantId(); + } + + /** + * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.innerIdentity() == null ? null : this.innerIdentity().type(); + } + + /** + * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are + * allowed). + * + * @param type the type value to set. + * @return the ClusterPatch object itself. + */ + public ClusterPatch withType(ManagedServiceIdentityType type) { + if (this.innerIdentity() == null) { + this.innerIdentity = new ManagedServiceIdentity(); + } + this.innerIdentity().withType(type); + return this; + } + + /** + * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.innerIdentity() == null ? null : this.innerIdentity().userAssignedIdentities(); + } + + /** + * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The + * userAssignedIdentities dictionary keys will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * The dictionary values can be empty objects ({}) in requests. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ClusterPatch object itself. + */ + public ClusterPatch withUserAssignedIdentities(Map userAssignedIdentities) { + if (this.innerIdentity() == null) { + this.innerIdentity = new ManagedServiceIdentity(); + } + this.innerIdentity().withUserAssignedIdentities(userAssignedIdentities); + return this; + } + + /** + * Get the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @return the cloudManagementEndpoint value. + */ + public String cloudManagementEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().cloudManagementEndpoint(); + } + + /** + * Set the cloudManagementEndpoint property: Endpoint configured for management from the Azure portal. + * + * @param cloudManagementEndpoint the cloudManagementEndpoint value to set. + * @return the ClusterPatch object itself. + */ + public ClusterPatch withCloudManagementEndpoint(String cloudManagementEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterPatchProperties(); + } + this.innerProperties().withCloudManagementEndpoint(cloudManagementEndpoint); + return this; + } + + /** + * Get the aadClientId property: App id of cluster AAD identity. + * + * @return the aadClientId value. + */ + public String aadClientId() { + return this.innerProperties() == null ? null : this.innerProperties().aadClientId(); + } + + /** + * Set the aadClientId property: App id of cluster AAD identity. + * + * @param aadClientId the aadClientId value to set. + * @return the ClusterPatch object itself. + */ + public ClusterPatch withAadClientId(String aadClientId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterPatchProperties(); + } + this.innerProperties().withAadClientId(aadClientId); + return this; + } + + /** + * Get the aadTenantId property: Tenant id of cluster AAD identity. + * + * @return the aadTenantId value. + */ + public String aadTenantId() { + return this.innerProperties() == null ? null : this.innerProperties().aadTenantId(); + } + + /** + * Set the aadTenantId property: Tenant id of cluster AAD identity. + * + * @param aadTenantId the aadTenantId value to set. + * @return the ClusterPatch object itself. + */ + public ClusterPatch withAadTenantId(String aadTenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterPatchProperties(); + } + this.innerProperties().withAadTenantId(aadTenantId); + return this; + } + + /** + * Get the desiredProperties property: Desired properties of the cluster. + * + * @return the desiredProperties value. + */ + public ClusterDesiredProperties desiredProperties() { + return this.innerProperties() == null ? null : this.innerProperties().desiredProperties(); + } + + /** + * Set the desiredProperties property: Desired properties of the cluster. + * + * @param desiredProperties the desiredProperties value to set. + * @return the ClusterPatch object itself. + */ + public ClusterPatch withDesiredProperties(ClusterDesiredProperties desiredProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterPatchProperties(); + } + this.innerProperties().withDesiredProperties(desiredProperties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerIdentity() != null) { + innerIdentity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java new file mode 100644 index 0000000000000..aef1a2e85077a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ClusterReportedProperties.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Properties reported by cluster agent. + */ +@Fluent +public final class ClusterReportedProperties { + /* + * Name of the on-prem cluster connected to this resource. + */ + @JsonProperty(value = "clusterName", access = JsonProperty.Access.WRITE_ONLY) + private String clusterName; + + /* + * Unique id generated by the on-prem cluster. + */ + @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) + private String clusterId; + + /* + * Version of the cluster software. + */ + @JsonProperty(value = "clusterVersion", access = JsonProperty.Access.WRITE_ONLY) + private String clusterVersion; + + /* + * List of nodes reported by the cluster. + */ + @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY) + private List nodes; + + /* + * Last time the cluster reported the data. + */ + @JsonProperty(value = "lastUpdated", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastUpdated; + + /* + * IMDS attestation status of the cluster. + */ + @JsonProperty(value = "imdsAttestation", access = JsonProperty.Access.WRITE_ONLY) + private ImdsAttestation imdsAttestation; + + /* + * Level of diagnostic data emitted by the cluster. + */ + @JsonProperty(value = "diagnosticLevel") + private DiagnosticLevel diagnosticLevel; + + /* + * Capabilities supported by the cluster. + */ + @JsonProperty(value = "supportedCapabilities", access = JsonProperty.Access.WRITE_ONLY) + private List supportedCapabilities; + + /* + * The node type of all the nodes of the cluster. + */ + @JsonProperty(value = "clusterType", access = JsonProperty.Access.WRITE_ONLY) + private ClusterNodeType clusterType; + + /* + * The manufacturer of all the nodes of the cluster. + */ + @JsonProperty(value = "manufacturer", access = JsonProperty.Access.WRITE_ONLY) + private String manufacturer; + + /* + * OEM activation status of the cluster. + */ + @JsonProperty(value = "oemActivation", access = JsonProperty.Access.WRITE_ONLY) + private OemActivation oemActivation; + + /** + * Creates an instance of ClusterReportedProperties class. + */ + public ClusterReportedProperties() { + } + + /** + * Get the clusterName property: Name of the on-prem cluster connected to this resource. + * + * @return the clusterName value. + */ + public String clusterName() { + return this.clusterName; + } + + /** + * Get the clusterId property: Unique id generated by the on-prem cluster. + * + * @return the clusterId value. + */ + public String clusterId() { + return this.clusterId; + } + + /** + * Get the clusterVersion property: Version of the cluster software. + * + * @return the clusterVersion value. + */ + public String clusterVersion() { + return this.clusterVersion; + } + + /** + * Get the nodes property: List of nodes reported by the cluster. + * + * @return the nodes value. + */ + public List nodes() { + return this.nodes; + } + + /** + * Get the lastUpdated property: Last time the cluster reported the data. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Get the imdsAttestation property: IMDS attestation status of the cluster. + * + * @return the imdsAttestation value. + */ + public ImdsAttestation imdsAttestation() { + return this.imdsAttestation; + } + + /** + * Get the diagnosticLevel property: Level of diagnostic data emitted by the cluster. + * + * @return the diagnosticLevel value. + */ + public DiagnosticLevel diagnosticLevel() { + return this.diagnosticLevel; + } + + /** + * Set the diagnosticLevel property: Level of diagnostic data emitted by the cluster. + * + * @param diagnosticLevel the diagnosticLevel value to set. + * @return the ClusterReportedProperties object itself. + */ + public ClusterReportedProperties withDiagnosticLevel(DiagnosticLevel diagnosticLevel) { + this.diagnosticLevel = diagnosticLevel; + return this; + } + + /** + * Get the supportedCapabilities property: Capabilities supported by the cluster. + * + * @return the supportedCapabilities value. + */ + public List supportedCapabilities() { + return this.supportedCapabilities; + } + + /** + * Get the clusterType property: The node type of all the nodes of the cluster. + * + * @return the clusterType value. + */ + public ClusterNodeType clusterType() { + return this.clusterType; + } + + /** + * Get the manufacturer property: The manufacturer of all the nodes of the cluster. + * + * @return the manufacturer value. + */ + public String manufacturer() { + return this.manufacturer; + } + + /** + * Get the oemActivation property: OEM activation status of the cluster. + * + * @return the oemActivation value. + */ + public OemActivation oemActivation() { + return this.oemActivation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nodes() != null) { + nodes().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java new file mode 100644 index 0000000000000..401bc48a92735 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Clusters.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Clusters. + */ +public interface Clusters { + /** + * List all HCI clusters in a subscription. + * + * @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 list of clusters as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all HCI clusters in a subscription. + * + * @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 list of clusters as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 list of clusters as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all HCI clusters in a resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 list of clusters as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 hCI cluster along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); + + /** + * Get HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 hCI cluster. + */ + Cluster getByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 deleteByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Delete an HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 delete(String resourceGroupName, String clusterName, Context context); + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @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 uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest); + + /** + * Upload certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param uploadCertificateRequest Upload certificate request. + * @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 uploadCertificate(String resourceGroupName, String clusterName, + UploadCertificateRequest uploadCertificateRequest, Context context); + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 cluster Identity details. + */ + ClusterIdentityResponse createIdentity(String resourceGroupName, String clusterName); + + /** + * Create cluster identity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 cluster Identity details. + */ + ClusterIdentityResponse createIdentity(String resourceGroupName, String clusterName, Context context); + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @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 cluster details. + */ + Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest); + + /** + * Extends Software Assurance Benefit to a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param softwareAssuranceChangeRequest Software Assurance Change Request Payload. + * @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 cluster details. + */ + Cluster extendSoftwareAssuranceBenefit(String resourceGroupName, String clusterName, + SoftwareAssuranceChangeRequest softwareAssuranceChangeRequest, Context context); + + /** + * Get HCI cluster. + * + * @param id the resource ID. + * @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 hCI cluster along with {@link Response}. + */ + Cluster getById(String id); + + /** + * Get HCI cluster. + * + * @param id the resource ID. + * @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 hCI cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete an HCI cluster. + * + * @param id the resource ID. + * @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 deleteById(String id); + + /** + * Delete an HCI cluster. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Cluster resource. + * + * @param name resource name. + * @return the first stage of the new Cluster definition. + */ + Cluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java new file mode 100644 index 0000000000000..112704941c0c3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceAssignmentType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Represents the compliance assignment type of a resource. + */ +public final class ComplianceAssignmentType extends ExpandableStringEnum { + /** + * Static value Audit for ComplianceAssignmentType. + */ + public static final ComplianceAssignmentType AUDIT = fromString("Audit"); + + /** + * Static value ApplyAndAutoCorrect for ComplianceAssignmentType. + */ + public static final ComplianceAssignmentType APPLY_AND_AUTO_CORRECT = fromString("ApplyAndAutoCorrect"); + + /** + * Creates a new instance of ComplianceAssignmentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComplianceAssignmentType() { + } + + /** + * Creates or finds a ComplianceAssignmentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComplianceAssignmentType. + */ + @JsonCreator + public static ComplianceAssignmentType fromString(String name) { + return fromString(name, ComplianceAssignmentType.class); + } + + /** + * Gets known ComplianceAssignmentType values. + * + * @return known ComplianceAssignmentType values. + */ + public static Collection values() { + return values(ComplianceAssignmentType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java new file mode 100644 index 0000000000000..bba3a3c5617b8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ComplianceStatus.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Represents the compliance status of a resource. + */ +public final class ComplianceStatus extends ExpandableStringEnum { + /** + * Static value Compliant for ComplianceStatus. + */ + public static final ComplianceStatus COMPLIANT = fromString("Compliant"); + + /** + * Static value NonCompliant for ComplianceStatus. + */ + public static final ComplianceStatus NON_COMPLIANT = fromString("NonCompliant"); + + /** + * Static value Pending for ComplianceStatus. + */ + public static final ComplianceStatus PENDING = fromString("Pending"); + + /** + * Creates a new instance of ComplianceStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComplianceStatus() { + } + + /** + * Creates or finds a ComplianceStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComplianceStatus. + */ + @JsonCreator + public static ComplianceStatus fromString(String name) { + return fromString(name, ComplianceStatus.class); + } + + /** + * Gets known ComplianceStatus values. + * + * @return known ComplianceStatus values. + */ + public static Collection values() { + return values(ComplianceStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java new file mode 100644 index 0000000000000..134865f209d9a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ConnectivityStatus.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Overall connectivity status for the cluster resource. + */ +public final class ConnectivityStatus extends ExpandableStringEnum { + /** + * Static value NotYetRegistered for ConnectivityStatus. + */ + public static final ConnectivityStatus NOT_YET_REGISTERED = fromString("NotYetRegistered"); + + /** + * Static value Connected for ConnectivityStatus. + */ + public static final ConnectivityStatus CONNECTED = fromString("Connected"); + + /** + * Static value NotConnectedRecently for ConnectivityStatus. + */ + public static final ConnectivityStatus NOT_CONNECTED_RECENTLY = fromString("NotConnectedRecently"); + + /** + * Static value PartiallyConnected for ConnectivityStatus. + */ + public static final ConnectivityStatus PARTIALLY_CONNECTED = fromString("PartiallyConnected"); + + /** + * Static value Disconnected for ConnectivityStatus. + */ + public static final ConnectivityStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Static value NotSpecified for ConnectivityStatus. + */ + public static final ConnectivityStatus NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Creates a new instance of ConnectivityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectivityStatus() { + } + + /** + * Creates or finds a ConnectivityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectivityStatus. + */ + @JsonCreator + public static ConnectivityStatus fromString(String name) { + return fromString(name, ConnectivityStatus.class); + } + + /** + * Gets known ConnectivityStatus values. + * + * @return known ConnectivityStatus values. + */ + public static Collection values() { + return values(ConnectivityStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java new file mode 100644 index 0000000000000..ba0cc711b7da7 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DefaultExtensionDetails.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Properties for a particular default extension category. + */ +@Immutable +public final class DefaultExtensionDetails { + /* + * Default extension category + */ + @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) + private String category; + + /* + * Consent time for extension category + */ + @JsonProperty(value = "consentTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime consentTime; + + /** + * Creates an instance of DefaultExtensionDetails class. + */ + public DefaultExtensionDetails() { + } + + /** + * Get the category property: Default extension category. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Get the consentTime property: Consent time for extension category. + * + * @return the consentTime value. + */ + public OffsetDateTime consentTime() { + return this.consentTime; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentCluster.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentCluster.java new file mode 100644 index 0000000000000..3d5546b3a4260 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentCluster.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AzureStackHCI Cluster deployment properties. + */ +@Fluent +public final class DeploymentCluster { + /* + * The cluster name provided when preparing Active Directory. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Use a cloud witness if you have internet access and if you use an Azure Storage account to provide a vote on cluster quorum. A cloud witness uses Azure Blob Storage to read or write a blob file and then uses it to arbitrate in split-brain resolution. Only allowed values are 'Cloud', 'FileShare'. + */ + @JsonProperty(value = "witnessType") + private String witnessType; + + /* + * Specify the fileshare path for the local witness for your Azure Stack HCI cluster. + */ + @JsonProperty(value = "witnessPath") + private String witnessPath; + + /* + * Specify the Azure Storage account name for cloud witness for your Azure Stack HCI cluster. + */ + @JsonProperty(value = "cloudAccountName") + private String cloudAccountName; + + /* + * For Azure blob service endpoint type, select either Default or Custom domain. If you selected **Custom domain, enter the domain for the blob service in this format core.windows.net. + */ + @JsonProperty(value = "azureServiceEndpoint") + private String azureServiceEndpoint; + + /** + * Creates an instance of DeploymentCluster class. + */ + public DeploymentCluster() { + } + + /** + * Get the name property: The cluster name provided when preparing Active Directory. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The cluster name provided when preparing Active Directory. + * + * @param name the name value to set. + * @return the DeploymentCluster object itself. + */ + public DeploymentCluster withName(String name) { + this.name = name; + return this; + } + + /** + * Get the witnessType property: Use a cloud witness if you have internet access and if you use an Azure Storage + * account to provide a vote on cluster quorum. A cloud witness uses Azure Blob Storage to read or write a blob file + * and then uses it to arbitrate in split-brain resolution. Only allowed values are 'Cloud', 'FileShare'. + * + * @return the witnessType value. + */ + public String witnessType() { + return this.witnessType; + } + + /** + * Set the witnessType property: Use a cloud witness if you have internet access and if you use an Azure Storage + * account to provide a vote on cluster quorum. A cloud witness uses Azure Blob Storage to read or write a blob file + * and then uses it to arbitrate in split-brain resolution. Only allowed values are 'Cloud', 'FileShare'. + * + * @param witnessType the witnessType value to set. + * @return the DeploymentCluster object itself. + */ + public DeploymentCluster withWitnessType(String witnessType) { + this.witnessType = witnessType; + return this; + } + + /** + * Get the witnessPath property: Specify the fileshare path for the local witness for your Azure Stack HCI cluster. + * + * @return the witnessPath value. + */ + public String witnessPath() { + return this.witnessPath; + } + + /** + * Set the witnessPath property: Specify the fileshare path for the local witness for your Azure Stack HCI cluster. + * + * @param witnessPath the witnessPath value to set. + * @return the DeploymentCluster object itself. + */ + public DeploymentCluster withWitnessPath(String witnessPath) { + this.witnessPath = witnessPath; + return this; + } + + /** + * Get the cloudAccountName property: Specify the Azure Storage account name for cloud witness for your Azure Stack + * HCI cluster. + * + * @return the cloudAccountName value. + */ + public String cloudAccountName() { + return this.cloudAccountName; + } + + /** + * Set the cloudAccountName property: Specify the Azure Storage account name for cloud witness for your Azure Stack + * HCI cluster. + * + * @param cloudAccountName the cloudAccountName value to set. + * @return the DeploymentCluster object itself. + */ + public DeploymentCluster withCloudAccountName(String cloudAccountName) { + this.cloudAccountName = cloudAccountName; + return this; + } + + /** + * Get the azureServiceEndpoint property: For Azure blob service endpoint type, select either Default or Custom + * domain. If you selected **Custom domain, enter the domain for the blob service in this format core.windows.net. + * + * @return the azureServiceEndpoint value. + */ + public String azureServiceEndpoint() { + return this.azureServiceEndpoint; + } + + /** + * Set the azureServiceEndpoint property: For Azure blob service endpoint type, select either Default or Custom + * domain. If you selected **Custom domain, enter the domain for the blob service in this format core.windows.net. + * + * @param azureServiceEndpoint the azureServiceEndpoint value to set. + * @return the DeploymentCluster object itself. + */ + public DeploymentCluster withAzureServiceEndpoint(String azureServiceEndpoint) { + this.azureServiceEndpoint = azureServiceEndpoint; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentConfiguration.java new file mode 100644 index 0000000000000..1ebb27c3c230c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentConfiguration.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Deployment Configuration. + */ +@Fluent +public final class DeploymentConfiguration { + /* + * deployment template version + */ + @JsonProperty(value = "version") + private String version; + + /* + * Scale units will contains list of deployment data + */ + @JsonProperty(value = "scaleUnits", required = true) + private List scaleUnits; + + /** + * Creates an instance of DeploymentConfiguration class. + */ + public DeploymentConfiguration() { + } + + /** + * Get the version property: deployment template version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: deployment template version. + * + * @param version the version value to set. + * @return the DeploymentConfiguration object itself. + */ + public DeploymentConfiguration withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the scaleUnits property: Scale units will contains list of deployment data. + * + * @return the scaleUnits value. + */ + public List scaleUnits() { + return this.scaleUnits; + } + + /** + * Set the scaleUnits property: Scale units will contains list of deployment data. + * + * @param scaleUnits the scaleUnits value to set. + * @return the DeploymentConfiguration object itself. + */ + public DeploymentConfiguration withScaleUnits(List scaleUnits) { + this.scaleUnits = scaleUnits; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scaleUnits() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property scaleUnits in model DeploymentConfiguration")); + } else { + scaleUnits().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DeploymentConfiguration.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java new file mode 100644 index 0000000000000..31832af719f0a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentData.java @@ -0,0 +1,367 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The Deployment data of AzureStackHCI Cluster. + */ +@Fluent +public final class DeploymentData { + /* + * SecuritySettings to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "securitySettings") + private DeploymentSecuritySettings securitySettings; + + /* + * Observability config to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "observability") + private Observability observability; + + /* + * Observability config to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "cluster") + private DeploymentCluster cluster; + + /* + * Storage config to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "storage") + private Storage storage; + + /* + * naming prefix to deploy cluster. + */ + @JsonProperty(value = "namingPrefix") + private String namingPrefix; + + /* + * FQDN to deploy cluster + */ + @JsonProperty(value = "domainFqdn") + private String domainFqdn; + + /* + * InfrastructureNetwork config to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "infrastructureNetwork") + private List infrastructureNetwork; + + /* + * list of physical nodes config to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "physicalNodes") + private List physicalNodes; + + /* + * HostNetwork config to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "hostNetwork") + private HostNetwork hostNetwork; + + /* + * The path to the Active Directory Organizational Unit container object prepared for the deployment. + */ + @JsonProperty(value = "adouPath") + private String adouPath; + + /* + * The URI to the keyvault / secret store. + */ + @JsonProperty(value = "secretsLocation") + private String secretsLocation; + + /* + * OptionalServices config to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "optionalServices") + private OptionalServices optionalServices; + + /** + * Creates an instance of DeploymentData class. + */ + public DeploymentData() { + } + + /** + * Get the securitySettings property: SecuritySettings to deploy AzureStackHCI Cluster. + * + * @return the securitySettings value. + */ + public DeploymentSecuritySettings securitySettings() { + return this.securitySettings; + } + + /** + * Set the securitySettings property: SecuritySettings to deploy AzureStackHCI Cluster. + * + * @param securitySettings the securitySettings value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withSecuritySettings(DeploymentSecuritySettings securitySettings) { + this.securitySettings = securitySettings; + return this; + } + + /** + * Get the observability property: Observability config to deploy AzureStackHCI Cluster. + * + * @return the observability value. + */ + public Observability observability() { + return this.observability; + } + + /** + * Set the observability property: Observability config to deploy AzureStackHCI Cluster. + * + * @param observability the observability value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withObservability(Observability observability) { + this.observability = observability; + return this; + } + + /** + * Get the cluster property: Observability config to deploy AzureStackHCI Cluster. + * + * @return the cluster value. + */ + public DeploymentCluster cluster() { + return this.cluster; + } + + /** + * Set the cluster property: Observability config to deploy AzureStackHCI Cluster. + * + * @param cluster the cluster value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withCluster(DeploymentCluster cluster) { + this.cluster = cluster; + return this; + } + + /** + * Get the storage property: Storage config to deploy AzureStackHCI Cluster. + * + * @return the storage value. + */ + public Storage storage() { + return this.storage; + } + + /** + * Set the storage property: Storage config to deploy AzureStackHCI Cluster. + * + * @param storage the storage value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withStorage(Storage storage) { + this.storage = storage; + return this; + } + + /** + * Get the namingPrefix property: naming prefix to deploy cluster. + * + * @return the namingPrefix value. + */ + public String namingPrefix() { + return this.namingPrefix; + } + + /** + * Set the namingPrefix property: naming prefix to deploy cluster. + * + * @param namingPrefix the namingPrefix value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withNamingPrefix(String namingPrefix) { + this.namingPrefix = namingPrefix; + return this; + } + + /** + * Get the domainFqdn property: FQDN to deploy cluster. + * + * @return the domainFqdn value. + */ + public String domainFqdn() { + return this.domainFqdn; + } + + /** + * Set the domainFqdn property: FQDN to deploy cluster. + * + * @param domainFqdn the domainFqdn value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withDomainFqdn(String domainFqdn) { + this.domainFqdn = domainFqdn; + return this; + } + + /** + * Get the infrastructureNetwork property: InfrastructureNetwork config to deploy AzureStackHCI Cluster. + * + * @return the infrastructureNetwork value. + */ + public List infrastructureNetwork() { + return this.infrastructureNetwork; + } + + /** + * Set the infrastructureNetwork property: InfrastructureNetwork config to deploy AzureStackHCI Cluster. + * + * @param infrastructureNetwork the infrastructureNetwork value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withInfrastructureNetwork(List infrastructureNetwork) { + this.infrastructureNetwork = infrastructureNetwork; + return this; + } + + /** + * Get the physicalNodes property: list of physical nodes config to deploy AzureStackHCI Cluster. + * + * @return the physicalNodes value. + */ + public List physicalNodes() { + return this.physicalNodes; + } + + /** + * Set the physicalNodes property: list of physical nodes config to deploy AzureStackHCI Cluster. + * + * @param physicalNodes the physicalNodes value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withPhysicalNodes(List physicalNodes) { + this.physicalNodes = physicalNodes; + return this; + } + + /** + * Get the hostNetwork property: HostNetwork config to deploy AzureStackHCI Cluster. + * + * @return the hostNetwork value. + */ + public HostNetwork hostNetwork() { + return this.hostNetwork; + } + + /** + * Set the hostNetwork property: HostNetwork config to deploy AzureStackHCI Cluster. + * + * @param hostNetwork the hostNetwork value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withHostNetwork(HostNetwork hostNetwork) { + this.hostNetwork = hostNetwork; + return this; + } + + /** + * Get the adouPath property: The path to the Active Directory Organizational Unit container object prepared for the + * deployment. + * + * @return the adouPath value. + */ + public String adouPath() { + return this.adouPath; + } + + /** + * Set the adouPath property: The path to the Active Directory Organizational Unit container object prepared for the + * deployment. + * + * @param adouPath the adouPath value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withAdouPath(String adouPath) { + this.adouPath = adouPath; + return this; + } + + /** + * Get the secretsLocation property: The URI to the keyvault / secret store. + * + * @return the secretsLocation value. + */ + public String secretsLocation() { + return this.secretsLocation; + } + + /** + * Set the secretsLocation property: The URI to the keyvault / secret store. + * + * @param secretsLocation the secretsLocation value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withSecretsLocation(String secretsLocation) { + this.secretsLocation = secretsLocation; + return this; + } + + /** + * Get the optionalServices property: OptionalServices config to deploy AzureStackHCI Cluster. + * + * @return the optionalServices value. + */ + public OptionalServices optionalServices() { + return this.optionalServices; + } + + /** + * Set the optionalServices property: OptionalServices config to deploy AzureStackHCI Cluster. + * + * @param optionalServices the optionalServices value to set. + * @return the DeploymentData object itself. + */ + public DeploymentData withOptionalServices(OptionalServices optionalServices) { + this.optionalServices = optionalServices; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (securitySettings() != null) { + securitySettings().validate(); + } + if (observability() != null) { + observability().validate(); + } + if (cluster() != null) { + cluster().validate(); + } + if (storage() != null) { + storage().validate(); + } + if (infrastructureNetwork() != null) { + infrastructureNetwork().forEach(e -> e.validate()); + } + if (physicalNodes() != null) { + physicalNodes().forEach(e -> e.validate()); + } + if (hostNetwork() != null) { + hostNetwork().validate(); + } + if (optionalServices() != null) { + optionalServices().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java new file mode 100644 index 0000000000000..ff864ec90d8ef --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentMode.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The deployment mode for cluster deployment. + */ +public final class DeploymentMode extends ExpandableStringEnum { + /** + * Static value Validate for DeploymentMode. + */ + public static final DeploymentMode VALIDATE = fromString("Validate"); + + /** + * Static value Deploy for DeploymentMode. + */ + public static final DeploymentMode DEPLOY = fromString("Deploy"); + + /** + * Creates a new instance of DeploymentMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentMode() { + } + + /** + * Creates or finds a DeploymentMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentMode. + */ + @JsonCreator + public static DeploymentMode fromString(String name) { + return fromString(name, DeploymentMode.class); + } + + /** + * Gets known DeploymentMode values. + * + * @return known DeploymentMode values. + */ + public static Collection values() { + return values(DeploymentMode.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java new file mode 100644 index 0000000000000..80d4ce3e4de18 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSecuritySettings.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SecuritySettings of AzureStackHCI Cluster. + */ +@Fluent +public final class DeploymentSecuritySettings { + /* + * By default, Hypervisor-protected Code Integrity is enabled on your Azure HCI cluster. + */ + @JsonProperty(value = "hvciProtection") + private Boolean hvciProtection; + + /* + * By default, Secure Boot is enabled on your Azure HCI cluster. This setting is hardware dependent. + */ + @JsonProperty(value = "drtmProtection") + private Boolean drtmProtection; + + /* + * When set to true, the security baseline is re-applied regularly. + */ + @JsonProperty(value = "driftControlEnforced") + private Boolean driftControlEnforced; + + /* + * When set to true, Credential Guard is enabled. + */ + @JsonProperty(value = "credentialGuardEnforced") + private Boolean credentialGuardEnforced; + + /* + * When set to true, the SMB default instance requires sign in for the client and server services. + */ + @JsonProperty(value = "smbSigningEnforced") + private Boolean smbSigningEnforced; + + /* + * When set to true, cluster east-west traffic is encrypted. + */ + @JsonProperty(value = "smbClusterEncryption") + private Boolean smbClusterEncryption; + + /* + * When set to true, all the side channel mitigations are enabled + */ + @JsonProperty(value = "sideChannelMitigationEnforced") + private Boolean sideChannelMitigationEnforced; + + /* + * When set to true, BitLocker XTS_AES 256-bit encryption is enabled for all data-at-rest on the OS volume of your Azure Stack HCI cluster. This setting is TPM-hardware dependent. + */ + @JsonProperty(value = "bitlockerBootVolume") + private Boolean bitlockerBootVolume; + + /* + * When set to true, BitLocker XTS-AES 256-bit encryption is enabled for all data-at-rest on your Azure Stack HCI cluster shared volumes. + */ + @JsonProperty(value = "bitlockerDataVolumes") + private Boolean bitlockerDataVolumes; + + /* + * WDAC is enabled by default and limits the applications and the code that you can run on your Azure Stack HCI cluster. + */ + @JsonProperty(value = "wdacEnforced") + private Boolean wdacEnforced; + + /** + * Creates an instance of DeploymentSecuritySettings class. + */ + public DeploymentSecuritySettings() { + } + + /** + * Get the hvciProtection property: By default, Hypervisor-protected Code Integrity is enabled on your Azure HCI + * cluster. + * + * @return the hvciProtection value. + */ + public Boolean hvciProtection() { + return this.hvciProtection; + } + + /** + * Set the hvciProtection property: By default, Hypervisor-protected Code Integrity is enabled on your Azure HCI + * cluster. + * + * @param hvciProtection the hvciProtection value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withHvciProtection(Boolean hvciProtection) { + this.hvciProtection = hvciProtection; + return this; + } + + /** + * Get the drtmProtection property: By default, Secure Boot is enabled on your Azure HCI cluster. This setting is + * hardware dependent. + * + * @return the drtmProtection value. + */ + public Boolean drtmProtection() { + return this.drtmProtection; + } + + /** + * Set the drtmProtection property: By default, Secure Boot is enabled on your Azure HCI cluster. This setting is + * hardware dependent. + * + * @param drtmProtection the drtmProtection value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withDrtmProtection(Boolean drtmProtection) { + this.drtmProtection = drtmProtection; + return this; + } + + /** + * Get the driftControlEnforced property: When set to true, the security baseline is re-applied regularly. + * + * @return the driftControlEnforced value. + */ + public Boolean driftControlEnforced() { + return this.driftControlEnforced; + } + + /** + * Set the driftControlEnforced property: When set to true, the security baseline is re-applied regularly. + * + * @param driftControlEnforced the driftControlEnforced value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withDriftControlEnforced(Boolean driftControlEnforced) { + this.driftControlEnforced = driftControlEnforced; + return this; + } + + /** + * Get the credentialGuardEnforced property: When set to true, Credential Guard is enabled. + * + * @return the credentialGuardEnforced value. + */ + public Boolean credentialGuardEnforced() { + return this.credentialGuardEnforced; + } + + /** + * Set the credentialGuardEnforced property: When set to true, Credential Guard is enabled. + * + * @param credentialGuardEnforced the credentialGuardEnforced value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withCredentialGuardEnforced(Boolean credentialGuardEnforced) { + this.credentialGuardEnforced = credentialGuardEnforced; + return this; + } + + /** + * Get the smbSigningEnforced property: When set to true, the SMB default instance requires sign in for the client + * and server services. + * + * @return the smbSigningEnforced value. + */ + public Boolean smbSigningEnforced() { + return this.smbSigningEnforced; + } + + /** + * Set the smbSigningEnforced property: When set to true, the SMB default instance requires sign in for the client + * and server services. + * + * @param smbSigningEnforced the smbSigningEnforced value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withSmbSigningEnforced(Boolean smbSigningEnforced) { + this.smbSigningEnforced = smbSigningEnforced; + return this; + } + + /** + * Get the smbClusterEncryption property: When set to true, cluster east-west traffic is encrypted. + * + * @return the smbClusterEncryption value. + */ + public Boolean smbClusterEncryption() { + return this.smbClusterEncryption; + } + + /** + * Set the smbClusterEncryption property: When set to true, cluster east-west traffic is encrypted. + * + * @param smbClusterEncryption the smbClusterEncryption value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withSmbClusterEncryption(Boolean smbClusterEncryption) { + this.smbClusterEncryption = smbClusterEncryption; + return this; + } + + /** + * Get the sideChannelMitigationEnforced property: When set to true, all the side channel mitigations are enabled. + * + * @return the sideChannelMitigationEnforced value. + */ + public Boolean sideChannelMitigationEnforced() { + return this.sideChannelMitigationEnforced; + } + + /** + * Set the sideChannelMitigationEnforced property: When set to true, all the side channel mitigations are enabled. + * + * @param sideChannelMitigationEnforced the sideChannelMitigationEnforced value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withSideChannelMitigationEnforced(Boolean sideChannelMitigationEnforced) { + this.sideChannelMitigationEnforced = sideChannelMitigationEnforced; + return this; + } + + /** + * Get the bitlockerBootVolume property: When set to true, BitLocker XTS_AES 256-bit encryption is enabled for all + * data-at-rest on the OS volume of your Azure Stack HCI cluster. This setting is TPM-hardware dependent. + * + * @return the bitlockerBootVolume value. + */ + public Boolean bitlockerBootVolume() { + return this.bitlockerBootVolume; + } + + /** + * Set the bitlockerBootVolume property: When set to true, BitLocker XTS_AES 256-bit encryption is enabled for all + * data-at-rest on the OS volume of your Azure Stack HCI cluster. This setting is TPM-hardware dependent. + * + * @param bitlockerBootVolume the bitlockerBootVolume value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withBitlockerBootVolume(Boolean bitlockerBootVolume) { + this.bitlockerBootVolume = bitlockerBootVolume; + return this; + } + + /** + * Get the bitlockerDataVolumes property: When set to true, BitLocker XTS-AES 256-bit encryption is enabled for all + * data-at-rest on your Azure Stack HCI cluster shared volumes. + * + * @return the bitlockerDataVolumes value. + */ + public Boolean bitlockerDataVolumes() { + return this.bitlockerDataVolumes; + } + + /** + * Set the bitlockerDataVolumes property: When set to true, BitLocker XTS-AES 256-bit encryption is enabled for all + * data-at-rest on your Azure Stack HCI cluster shared volumes. + * + * @param bitlockerDataVolumes the bitlockerDataVolumes value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withBitlockerDataVolumes(Boolean bitlockerDataVolumes) { + this.bitlockerDataVolumes = bitlockerDataVolumes; + return this; + } + + /** + * Get the wdacEnforced property: WDAC is enabled by default and limits the applications and the code that you can + * run on your Azure Stack HCI cluster. + * + * @return the wdacEnforced value. + */ + public Boolean wdacEnforced() { + return this.wdacEnforced; + } + + /** + * Set the wdacEnforced property: WDAC is enabled by default and limits the applications and the code that you can + * run on your Azure Stack HCI cluster. + * + * @param wdacEnforced the wdacEnforced value to set. + * @return the DeploymentSecuritySettings object itself. + */ + public DeploymentSecuritySettings withWdacEnforced(Boolean wdacEnforced) { + this.wdacEnforced = wdacEnforced; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java new file mode 100644 index 0000000000000..1d79e36374eab --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSetting.java @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner; +import java.util.List; + +/** + * An immutable client-side representation of DeploymentSetting. + */ +public interface DeploymentSetting { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: DeploymentSetting provisioning state. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the arcNodeResourceIds property: Azure resource ids of Arc machines to be part of cluster. + * + * @return the arcNodeResourceIds value. + */ + List arcNodeResourceIds(); + + /** + * Gets the deploymentMode property: The deployment mode for cluster deployment. + * + * @return the deploymentMode value. + */ + DeploymentMode deploymentMode(); + + /** + * Gets the deploymentConfiguration property: Scale units will contains list of deployment data. + * + * @return the deploymentConfiguration value. + */ + DeploymentConfiguration deploymentConfiguration(); + + /** + * Gets the reportedProperties property: Deployment Status reported from cluster. + * + * @return the reportedProperties value. + */ + ReportedProperties reportedProperties(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner object. + * + * @return the inner object. + */ + DeploymentSettingInner innerModel(); + + /** + * The entirety of the DeploymentSetting definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The DeploymentSetting definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DeploymentSetting definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the DeploymentSetting definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @return the next definition stage. + */ + WithCreate withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the DeploymentSetting 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.WithProvisioningState, DefinitionStages.WithArcNodeResourceIds, + DefinitionStages.WithDeploymentMode, DefinitionStages.WithDeploymentConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + DeploymentSetting create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DeploymentSetting create(Context context); + } + + /** + * The stage of the DeploymentSetting definition allowing to specify provisioningState. + */ + interface WithProvisioningState { + /** + * Specifies the provisioningState property: DeploymentSetting provisioning state. + * + * @param provisioningState DeploymentSetting provisioning state. + * @return the next definition stage. + */ + WithCreate withProvisioningState(ProvisioningState provisioningState); + } + + /** + * The stage of the DeploymentSetting definition allowing to specify arcNodeResourceIds. + */ + interface WithArcNodeResourceIds { + /** + * Specifies the arcNodeResourceIds property: Azure resource ids of Arc machines to be part of cluster.. + * + * @param arcNodeResourceIds Azure resource ids of Arc machines to be part of cluster. + * @return the next definition stage. + */ + WithCreate withArcNodeResourceIds(List arcNodeResourceIds); + } + + /** + * The stage of the DeploymentSetting definition allowing to specify deploymentMode. + */ + interface WithDeploymentMode { + /** + * Specifies the deploymentMode property: The deployment mode for cluster deployment.. + * + * @param deploymentMode The deployment mode for cluster deployment. + * @return the next definition stage. + */ + WithCreate withDeploymentMode(DeploymentMode deploymentMode); + } + + /** + * The stage of the DeploymentSetting definition allowing to specify deploymentConfiguration. + */ + interface WithDeploymentConfiguration { + /** + * Specifies the deploymentConfiguration property: Scale units will contains list of deployment data. + * + * @param deploymentConfiguration Scale units will contains list of deployment data. + * @return the next definition stage. + */ + WithCreate withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration); + } + } + + /** + * Begins update for the DeploymentSetting resource. + * + * @return the stage of resource update. + */ + DeploymentSetting.Update update(); + + /** + * The template for DeploymentSetting update. + */ + interface Update extends UpdateStages.WithProvisioningState, UpdateStages.WithArcNodeResourceIds, + UpdateStages.WithDeploymentMode, UpdateStages.WithDeploymentConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DeploymentSetting apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DeploymentSetting apply(Context context); + } + + /** + * The DeploymentSetting update stages. + */ + interface UpdateStages { + /** + * The stage of the DeploymentSetting update allowing to specify provisioningState. + */ + interface WithProvisioningState { + /** + * Specifies the provisioningState property: DeploymentSetting provisioning state. + * + * @param provisioningState DeploymentSetting provisioning state. + * @return the next definition stage. + */ + Update withProvisioningState(ProvisioningState provisioningState); + } + + /** + * The stage of the DeploymentSetting update allowing to specify arcNodeResourceIds. + */ + interface WithArcNodeResourceIds { + /** + * Specifies the arcNodeResourceIds property: Azure resource ids of Arc machines to be part of cluster.. + * + * @param arcNodeResourceIds Azure resource ids of Arc machines to be part of cluster. + * @return the next definition stage. + */ + Update withArcNodeResourceIds(List arcNodeResourceIds); + } + + /** + * The stage of the DeploymentSetting update allowing to specify deploymentMode. + */ + interface WithDeploymentMode { + /** + * Specifies the deploymentMode property: The deployment mode for cluster deployment.. + * + * @param deploymentMode The deployment mode for cluster deployment. + * @return the next definition stage. + */ + Update withDeploymentMode(DeploymentMode deploymentMode); + } + + /** + * The stage of the DeploymentSetting update allowing to specify deploymentConfiguration. + */ + interface WithDeploymentConfiguration { + /** + * Specifies the deploymentConfiguration property: Scale units will contains list of deployment data. + * + * @param deploymentConfiguration Scale units will contains list of deployment data. + * @return the next definition stage. + */ + Update withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DeploymentSetting refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DeploymentSetting refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingListResult.java new file mode 100644 index 0000000000000..c71ebc6915753 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettingListResult.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DeploymentSetting list operation. + */ +@Fluent +public final class DeploymentSettingListResult { + /* + * The DeploymentSetting items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of DeploymentSettingListResult class. + */ + public DeploymentSettingListResult() { + } + + /** + * Get the value property: The DeploymentSetting items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DeploymentSetting items on this page. + * + * @param value the value value to set. + * @return the DeploymentSettingListResult object itself. + */ + public DeploymentSettingListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the DeploymentSettingListResult object itself. + */ + public DeploymentSettingListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model DeploymentSettingListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DeploymentSettingListResult.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java new file mode 100644 index 0000000000000..9d1728609363e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentSettings.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DeploymentSettings. + */ +public interface DeploymentSettings { + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByClusters(String resourceGroupName, String clusterName); + + /** + * List DeploymentSetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 of a DeploymentSetting list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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 a DeploymentSetting along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, + String deploymentSettingsName, Context context); + + /** + * Get a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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 a DeploymentSetting. + */ + DeploymentSetting get(String resourceGroupName, String clusterName, String deploymentSettingsName); + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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 delete(String resourceGroupName, String clusterName, String deploymentSettingsName); + + /** + * Delete a DeploymentSetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param deploymentSettingsName Name of Deployment Setting. + * @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 delete(String resourceGroupName, String clusterName, String deploymentSettingsName, Context context); + + /** + * Get a DeploymentSetting. + * + * @param id the resource ID. + * @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 a DeploymentSetting along with {@link Response}. + */ + DeploymentSetting getById(String id); + + /** + * Get a DeploymentSetting. + * + * @param id the resource ID. + * @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 a DeploymentSetting along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a DeploymentSetting. + * + * @param id the resource ID. + * @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 deleteById(String id); + + /** + * Delete a DeploymentSetting. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DeploymentSetting resource. + * + * @param name resource name. + * @return the first stage of the new DeploymentSetting definition. + */ + DeploymentSetting.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStatus.java new file mode 100644 index 0000000000000..3da0dc3552bce --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStatus.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The DeploymentStatus of AzureStackHCI Cluster. + */ +@Immutable +public final class DeploymentStatus { + /* + * Status of AzureStackHCI Cluster Deployment. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /* + * List of steps of AzureStackHCI Cluster Deployment. + */ + @JsonProperty(value = "steps", access = JsonProperty.Access.WRITE_ONLY) + private List steps; + + /** + * Creates an instance of DeploymentStatus class. + */ + public DeploymentStatus() { + } + + /** + * Get the status property: Status of AzureStackHCI Cluster Deployment. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the steps property: List of steps of AzureStackHCI Cluster Deployment. + * + * @return the steps value. + */ + public List steps() { + return this.steps; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (steps() != null) { + steps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java new file mode 100644 index 0000000000000..24501a1b99527 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeploymentStep.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The Step of AzureStackHCI Cluster. + */ +@Immutable +public final class DeploymentStep { + /* + * Name of step. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Description of step. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * FullStepIndex of step. + */ + @JsonProperty(value = "fullStepIndex", access = JsonProperty.Access.WRITE_ONLY) + private String fullStepIndex; + + /* + * Start time of step. + */ + @JsonProperty(value = "startTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private String startTimeUtc; + + /* + * End time of step. + */ + @JsonProperty(value = "endTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private String endTimeUtc; + + /* + * Status of step. Allowed values are 'Error', 'Success', 'InProgress' + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /* + * List of nested steps of AzureStackHCI Cluster Deployment. + */ + @JsonProperty(value = "steps", access = JsonProperty.Access.WRITE_ONLY) + private List steps; + + /* + * List of exceptions in AzureStackHCI Cluster Deployment. + */ + @JsonProperty(value = "exception", access = JsonProperty.Access.WRITE_ONLY) + private List exception; + + /** + * Creates an instance of DeploymentStep class. + */ + public DeploymentStep() { + } + + /** + * Get the name property: Name of step. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the description property: Description of step. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the fullStepIndex property: FullStepIndex of step. + * + * @return the fullStepIndex value. + */ + public String fullStepIndex() { + return this.fullStepIndex; + } + + /** + * Get the startTimeUtc property: Start time of step. + * + * @return the startTimeUtc value. + */ + public String startTimeUtc() { + return this.startTimeUtc; + } + + /** + * Get the endTimeUtc property: End time of step. + * + * @return the endTimeUtc value. + */ + public String endTimeUtc() { + return this.endTimeUtc; + } + + /** + * Get the status property: Status of step. Allowed values are 'Error', 'Success', 'InProgress'. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the steps property: List of nested steps of AzureStackHCI Cluster Deployment. + * + * @return the steps value. + */ + public List steps() { + return this.steps; + } + + /** + * Get the exception property: List of exceptions in AzureStackHCI Cluster Deployment. + * + * @return the exception value. + */ + public List exception() { + return this.exception; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (steps() != null) { + steps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java new file mode 100644 index 0000000000000..e168a5922353d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DeviceConfiguration.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The device Configuration of a device. + */ +@Fluent +public final class DeviceConfiguration { + /* + * NIC Details of device + */ + @JsonProperty(value = "nicDetails") + private List nicDetails; + + /* + * device metadata details. + */ + @JsonProperty(value = "deviceMetadata") + private String deviceMetadata; + + /** + * Creates an instance of DeviceConfiguration class. + */ + public DeviceConfiguration() { + } + + /** + * Get the nicDetails property: NIC Details of device. + * + * @return the nicDetails value. + */ + public List nicDetails() { + return this.nicDetails; + } + + /** + * Set the nicDetails property: NIC Details of device. + * + * @param nicDetails the nicDetails value to set. + * @return the DeviceConfiguration object itself. + */ + public DeviceConfiguration withNicDetails(List nicDetails) { + this.nicDetails = nicDetails; + return this; + } + + /** + * Get the deviceMetadata property: device metadata details. + * + * @return the deviceMetadata value. + */ + public String deviceMetadata() { + return this.deviceMetadata; + } + + /** + * Set the deviceMetadata property: device metadata details. + * + * @param deviceMetadata the deviceMetadata value to set. + * @return the DeviceConfiguration object itself. + */ + public DeviceConfiguration withDeviceMetadata(String deviceMetadata) { + this.deviceMetadata = deviceMetadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nicDetails() != null) { + nicDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java new file mode 100644 index 0000000000000..aa5a02c59352b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiagnosticLevel.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Desired level of diagnostic data emitted by the cluster. + */ +public final class DiagnosticLevel extends ExpandableStringEnum { + /** + * Static value Off for DiagnosticLevel. + */ + public static final DiagnosticLevel OFF = fromString("Off"); + + /** + * Static value Basic for DiagnosticLevel. + */ + public static final DiagnosticLevel BASIC = fromString("Basic"); + + /** + * Static value Enhanced for DiagnosticLevel. + */ + public static final DiagnosticLevel ENHANCED = fromString("Enhanced"); + + /** + * Creates a new instance of DiagnosticLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiagnosticLevel() { + } + + /** + * Creates or finds a DiagnosticLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiagnosticLevel. + */ + @JsonCreator + public static DiagnosticLevel fromString(String name) { + return fromString(name, DiagnosticLevel.class); + } + + /** + * Gets known DiagnosticLevel values. + * + * @return known DiagnosticLevel values. + */ + public static Collection values() { + return values(DiagnosticLevel.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileFormat.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileFormat.java index a364631c4eddd..e202e5dc75ef6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileFormat.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/DiskFileFormat.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The format of the actual VHD file [vhd, vhdx]. */ +/** + * The format of the actual VHD file [vhd, vhdx]. + */ public final class DiskFileFormat extends ExpandableStringEnum { - /** Static value vhdx for DiskFileFormat. */ + /** + * Static value vhdx for DiskFileFormat. + */ public static final DiskFileFormat VHDX = fromString("vhdx"); - /** Static value vhd for DiskFileFormat. */ + /** + * Static value vhd for DiskFileFormat. + */ public static final DiskFileFormat VHD = fromString("vhd"); /** * Creates a new instance of DiskFileFormat value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public DiskFileFormat() { /** * Creates or finds a DiskFileFormat from its string representation. - * + * * @param name a name to look for. * @return the corresponding DiskFileFormat. */ @@ -38,7 +44,7 @@ public static DiskFileFormat fromString(String name) { /** * Gets known DiskFileFormat values. - * + * * @return known DiskFileFormat values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java new file mode 100644 index 0000000000000..27a74b998f71b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevice.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; + +/** + * An immutable client-side representation of EdgeDevice. + */ +public interface EdgeDevice { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the deviceConfiguration property: Device Configuration. + * + * @return the deviceConfiguration value. + */ + DeviceConfiguration deviceConfiguration(); + + /** + * Gets the provisioningState property: Provisioning state of edgeDevice resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner object. + * + * @return the inner object. + */ + EdgeDeviceInner innerModel(); + + /** + * The entirety of the EdgeDevice definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScope, DefinitionStages.WithCreate { + } + + /** + * The EdgeDevice definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the EdgeDevice definition. + */ + interface Blank extends WithScope { + } + + /** + * The stage of the EdgeDevice definition allowing to specify parent resource. + */ + interface WithScope { + /** + * Specifies resourceUri. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @return the next definition stage. + */ + WithCreate withExistingResourceUri(String resourceUri); + } + + /** + * The stage of the EdgeDevice 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.WithDeviceConfiguration, DefinitionStages.WithProvisioningState { + /** + * Executes the create request. + * + * @return the created resource. + */ + EdgeDevice create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EdgeDevice create(Context context); + } + + /** + * The stage of the EdgeDevice definition allowing to specify deviceConfiguration. + */ + interface WithDeviceConfiguration { + /** + * Specifies the deviceConfiguration property: Device Configuration. + * + * @param deviceConfiguration Device Configuration. + * @return the next definition stage. + */ + WithCreate withDeviceConfiguration(DeviceConfiguration deviceConfiguration); + } + + /** + * The stage of the EdgeDevice definition allowing to specify provisioningState. + */ + interface WithProvisioningState { + /** + * Specifies the provisioningState property: Provisioning state of edgeDevice resource. + * + * @param provisioningState Provisioning state of edgeDevice resource. + * @return the next definition stage. + */ + WithCreate withProvisioningState(ProvisioningState provisioningState); + } + } + + /** + * Begins update for the EdgeDevice resource. + * + * @return the stage of resource update. + */ + EdgeDevice.Update update(); + + /** + * The template for EdgeDevice update. + */ + interface Update extends UpdateStages.WithDeviceConfiguration, UpdateStages.WithProvisioningState { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EdgeDevice apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EdgeDevice apply(Context context); + } + + /** + * The EdgeDevice update stages. + */ + interface UpdateStages { + /** + * The stage of the EdgeDevice update allowing to specify deviceConfiguration. + */ + interface WithDeviceConfiguration { + /** + * Specifies the deviceConfiguration property: Device Configuration. + * + * @param deviceConfiguration Device Configuration. + * @return the next definition stage. + */ + Update withDeviceConfiguration(DeviceConfiguration deviceConfiguration); + } + + /** + * The stage of the EdgeDevice update allowing to specify provisioningState. + */ + interface WithProvisioningState { + /** + * Specifies the provisioningState property: Provisioning state of edgeDevice resource. + * + * @param provisioningState Provisioning state of edgeDevice resource. + * @return the next definition stage. + */ + Update withProvisioningState(ProvisioningState provisioningState); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EdgeDevice refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EdgeDevice refresh(Context context); + + /** + * A long-running resource action. + * + * @param validateRequest The content of the action request. + * @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 an Accepted response with an Operation-Location header. + */ + ValidateResponse validate(ValidateRequest validateRequest); + + /** + * A long-running resource action. + * + * @param validateRequest The content of the action request. + * @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 an Accepted response with an Operation-Location header. + */ + ValidateResponse validate(ValidateRequest validateRequest, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceListResult.java new file mode 100644 index 0000000000000..72b2c768b753f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDeviceListResult.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a EdgeDevice list operation. + */ +@Fluent +public final class EdgeDeviceListResult { + /* + * The EdgeDevice items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of EdgeDeviceListResult class. + */ + public EdgeDeviceListResult() { + } + + /** + * Get the value property: The EdgeDevice items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The EdgeDevice items on this page. + * + * @param value the value value to set. + * @return the EdgeDeviceListResult object itself. + */ + public EdgeDeviceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the EdgeDeviceListResult object itself. + */ + public EdgeDeviceListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model EdgeDeviceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EdgeDeviceListResult.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java new file mode 100644 index 0000000000000..5b26372b729e6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/EdgeDevices.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of EdgeDevices. + */ +public interface EdgeDevices { + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceUri); + + /** + * List EdgeDevice resources by parent. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @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 of a EdgeDevice list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceUri, Context context); + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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 a EdgeDevice along with {@link Response}. + */ + Response getWithResponse(String resourceUri, String edgeDeviceName, Context context); + + /** + * Get a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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 a EdgeDevice. + */ + EdgeDevice get(String resourceUri, String edgeDeviceName); + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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 deleteByResourceGroup(String resourceUri, String edgeDeviceName); + + /** + * Delete a EdgeDevice. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @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 delete(String resourceUri, String edgeDeviceName, Context context); + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @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 an Accepted response with an Operation-Location header. + */ + ValidateResponse validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest); + + /** + * A long-running resource action. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource. + * @param edgeDeviceName Name of Device. + * @param validateRequest The content of the action request. + * @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 an Accepted response with an Operation-Location header. + */ + ValidateResponse validate(String resourceUri, String edgeDeviceName, ValidateRequest validateRequest, + Context context); + + /** + * Get a EdgeDevice. + * + * @param id the resource ID. + * @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 a EdgeDevice along with {@link Response}. + */ + EdgeDevice getById(String id); + + /** + * Get a EdgeDevice. + * + * @param id the resource ID. + * @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 a EdgeDevice along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a EdgeDevice. + * + * @param id the resource ID. + * @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 deleteById(String id); + + /** + * Delete a EdgeDevice. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EdgeDevice resource. + * + * @param name resource name. + * @return the first stage of the new EdgeDevice definition. + */ + EdgeDevice.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtendedLocation.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtendedLocation.java index 89b453378f134..76a945cf142d6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtendedLocation.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtendedLocation.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The complex type of the extended location. */ +/** + * The complex type of the extended location. + */ @Fluent public final class ExtendedLocation { /* @@ -22,13 +24,15 @@ public final class ExtendedLocation { @JsonProperty(value = "type") private ExtendedLocationTypes type; - /** Creates an instance of ExtendedLocation class. */ + /** + * Creates an instance of ExtendedLocation class. + */ public ExtendedLocation() { } /** * Get the name property: The name of the extended location. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: The name of the extended location. - * + * * @param name the name value to set. * @return the ExtendedLocation object itself. */ @@ -48,7 +52,7 @@ public ExtendedLocation withName(String name) { /** * Get the type property: The type of the extended location. - * + * * @return the type value. */ public ExtendedLocationTypes type() { @@ -57,7 +61,7 @@ public ExtendedLocationTypes type() { /** * Set the type property: The type of the extended location. - * + * * @param type the type value to set. * @return the ExtendedLocation object itself. */ @@ -68,7 +72,7 @@ public ExtendedLocation withType(ExtendedLocationTypes type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtendedLocationTypes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtendedLocationTypes.java index acbaaa66f71a9..a9b37dd3415f7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtendedLocationTypes.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtendedLocationTypes.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of extendedLocation. */ +/** + * The type of extendedLocation. + */ public final class ExtendedLocationTypes extends ExpandableStringEnum { - /** Static value CustomLocation for ExtendedLocationTypes. */ + /** + * Static value CustomLocation for ExtendedLocationTypes. + */ public static final ExtendedLocationTypes CUSTOM_LOCATION = fromString("CustomLocation"); /** * Creates a new instance of ExtendedLocationTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ExtendedLocationTypes() { /** * Creates or finds a ExtendedLocationTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExtendedLocationTypes. */ @@ -35,7 +39,7 @@ public static ExtendedLocationTypes fromString(String name) { /** * Gets known ExtendedLocationTypes values. - * + * * @return known ExtendedLocationTypes values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java new file mode 100644 index 0000000000000..f119781d3f1d9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extension.java @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner; +import java.util.List; + +/** + * An immutable client-side representation of Extension. + */ +public interface Extension { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the Extension proxy resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the aggregateState property: Aggregate state of Arc Extensions across the nodes in this HCI cluster. + * + * @return the aggregateState value. + */ + ExtensionAggregateState aggregateState(); + + /** + * Gets the perNodeExtensionDetails property: State of Arc Extension in each of the nodes. + * + * @return the perNodeExtensionDetails value. + */ + List perNodeExtensionDetails(); + + /** + * Gets the managedBy property: Indicates if the extension is managed by azure or the user. + * + * @return the managedBy value. + */ + ExtensionManagedBy managedBy(); + + /** + * Gets the forceUpdateTag property: How the extension handler should be forced to update even if the extension + * configuration has not changed. + * + * @return the forceUpdateTag value. + */ + String forceUpdateTag(); + + /** + * Gets the publisher property: The name of the extension handler publisher. + * + * @return the publisher value. + */ + String publisher(); + + /** + * Gets the typePropertiesType property: Specifies the type of the extension; an example is "CustomScriptExtension". + * + * @return the typePropertiesType value. + */ + String typePropertiesType(); + + /** + * Gets the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used + * if not specified. + * + * @return the typeHandlerVersion value. + */ + String typeHandlerVersion(); + + /** + * Gets the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if + * one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * + * @return the autoUpgradeMinorVersion value. + */ + Boolean autoUpgradeMinorVersion(); + + /** + * Gets the settings property: Json formatted public settings for the extension. + * + * @return the settings value. + */ + Object settings(); + + /** + * Gets the protectedSettings property: Protected settings (may contain secrets). + * + * @return the protectedSettings value. + */ + Object protectedSettings(); + + /** + * Gets the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @return the enableAutomaticUpgrade value. + */ + Boolean enableAutomaticUpgrade(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner object. + * + * @return the inner object. + */ + ExtensionInner innerModel(); + + /** + * The entirety of the Extension definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Extension definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Extension definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Extension definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName, arcSettingName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @return the next definition stage. + */ + WithCreate withExistingArcSetting(String resourceGroupName, String clusterName, String arcSettingName); + } + + /** + * The stage of the Extension 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.WithForceUpdateTag, DefinitionStages.WithPublisher, + DefinitionStages.WithTypePropertiesType, DefinitionStages.WithTypeHandlerVersion, + DefinitionStages.WithAutoUpgradeMinorVersion, DefinitionStages.WithSettings, + DefinitionStages.WithProtectedSettings, DefinitionStages.WithEnableAutomaticUpgrade { + /** + * Executes the create request. + * + * @return the created resource. + */ + Extension create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Extension create(Context context); + } + + /** + * The stage of the Extension definition allowing to specify forceUpdateTag. + */ + interface WithForceUpdateTag { + /** + * Specifies the forceUpdateTag property: How the extension handler should be forced to update even if the + * extension configuration has not changed.. + * + * @param forceUpdateTag How the extension handler should be forced to update even if the extension + * configuration has not changed. + * @return the next definition stage. + */ + WithCreate withForceUpdateTag(String forceUpdateTag); + } + + /** + * The stage of the Extension definition allowing to specify publisher. + */ + interface WithPublisher { + /** + * Specifies the publisher property: The name of the extension handler publisher.. + * + * @param publisher The name of the extension handler publisher. + * @return the next definition stage. + */ + WithCreate withPublisher(String publisher); + } + + /** + * The stage of the Extension definition allowing to specify typePropertiesType. + */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: Specifies the type of the extension; an example is + * "CustomScriptExtension".. + * + * @param typePropertiesType Specifies the type of the extension; an example is "CustomScriptExtension". + * @return the next definition stage. + */ + WithCreate withTypePropertiesType(String typePropertiesType); + } + + /** + * The stage of the Extension definition allowing to specify typeHandlerVersion. + */ + interface WithTypeHandlerVersion { + /** + * Specifies the typeHandlerVersion property: Specifies the version of the script handler. Latest version + * would be used if not specified.. + * + * @param typeHandlerVersion Specifies the version of the script handler. Latest version would be used if + * not specified. + * @return the next definition stage. + */ + WithCreate withTypeHandlerVersion(String typeHandlerVersion); + } + + /** + * The stage of the Extension definition allowing to specify autoUpgradeMinorVersion. + */ + interface WithAutoUpgradeMinorVersion { + /** + * Specifies the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor + * version if one is available at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true.. + * + * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is + * available at deployment time. Once deployed, however, the extension will not upgrade minor versions + * unless redeployed, even with this property set to true. + * @return the next definition stage. + */ + WithCreate withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion); + } + + /** + * The stage of the Extension definition allowing to specify settings. + */ + interface WithSettings { + /** + * Specifies the settings property: Json formatted public settings for the extension.. + * + * @param settings Json formatted public settings for the extension. + * @return the next definition stage. + */ + WithCreate withSettings(Object settings); + } + + /** + * The stage of the Extension definition allowing to specify protectedSettings. + */ + interface WithProtectedSettings { + /** + * Specifies the protectedSettings property: Protected settings (may contain secrets).. + * + * @param protectedSettings Protected settings (may contain secrets). + * @return the next definition stage. + */ + WithCreate withProtectedSettings(Object protectedSettings); + } + + /** + * The stage of the Extension definition allowing to specify enableAutomaticUpgrade. + */ + interface WithEnableAutomaticUpgrade { + /** + * Specifies the enableAutomaticUpgrade property: Indicates whether the extension should be automatically + * upgraded by the platform if there is a newer version available.. + * + * @param enableAutomaticUpgrade Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * @return the next definition stage. + */ + WithCreate withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade); + } + } + + /** + * Begins update for the Extension resource. + * + * @return the stage of resource update. + */ + Extension.Update update(); + + /** + * The template for Extension update. + */ + interface Update extends UpdateStages.WithExtensionParameters { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Extension apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Extension apply(Context context); + } + + /** + * The Extension update stages. + */ + interface UpdateStages { + /** + * The stage of the Extension update allowing to specify extensionParameters. + */ + interface WithExtensionParameters { + /** + * Specifies the extensionParameters property: Describes the properties of a Machine Extension that can be + * updated.. + * + * @param extensionParameters Describes the properties of a Machine Extension that can be updated. + * @return the next definition stage. + */ + Update withExtensionParameters(ExtensionPatchParameters extensionParameters); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Extension refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Extension refresh(Context context); + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions 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 upgrade(ExtensionUpgradeParameters extensionUpgradeParameters); + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @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 upgrade(ExtensionUpgradeParameters extensionUpgradeParameters, Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java new file mode 100644 index 0000000000000..7800a12c78285 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionAggregateState.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Aggregate state of Arc Extensions across the nodes in this HCI cluster. + */ +public final class ExtensionAggregateState extends ExpandableStringEnum { + /** + * Static value NotSpecified for ExtensionAggregateState. + */ + public static final ExtensionAggregateState NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Error for ExtensionAggregateState. + */ + public static final ExtensionAggregateState ERROR = fromString("Error"); + + /** + * Static value Succeeded for ExtensionAggregateState. + */ + public static final ExtensionAggregateState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Canceled for ExtensionAggregateState. + */ + public static final ExtensionAggregateState CANCELED = fromString("Canceled"); + + /** + * Static value Failed for ExtensionAggregateState. + */ + public static final ExtensionAggregateState FAILED = fromString("Failed"); + + /** + * Static value Connected for ExtensionAggregateState. + */ + public static final ExtensionAggregateState CONNECTED = fromString("Connected"); + + /** + * Static value Disconnected for ExtensionAggregateState. + */ + public static final ExtensionAggregateState DISCONNECTED = fromString("Disconnected"); + + /** + * Static value Deleted for ExtensionAggregateState. + */ + public static final ExtensionAggregateState DELETED = fromString("Deleted"); + + /** + * Static value Creating for ExtensionAggregateState. + */ + public static final ExtensionAggregateState CREATING = fromString("Creating"); + + /** + * Static value Updating for ExtensionAggregateState. + */ + public static final ExtensionAggregateState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for ExtensionAggregateState. + */ + public static final ExtensionAggregateState DELETING = fromString("Deleting"); + + /** + * Static value Moving for ExtensionAggregateState. + */ + public static final ExtensionAggregateState MOVING = fromString("Moving"); + + /** + * Static value PartiallySucceeded for ExtensionAggregateState. + */ + public static final ExtensionAggregateState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); + + /** + * Static value PartiallyConnected for ExtensionAggregateState. + */ + public static final ExtensionAggregateState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); + + /** + * Static value InProgress for ExtensionAggregateState. + */ + public static final ExtensionAggregateState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Accepted for ExtensionAggregateState. + */ + public static final ExtensionAggregateState ACCEPTED = fromString("Accepted"); + + /** + * Static value Provisioning for ExtensionAggregateState. + */ + public static final ExtensionAggregateState PROVISIONING = fromString("Provisioning"); + + /** + * Static value UpgradeFailedRollbackSucceeded for ExtensionAggregateState. + */ + public static final ExtensionAggregateState UPGRADE_FAILED_ROLLBACK_SUCCEEDED + = fromString("UpgradeFailedRollbackSucceeded"); + + /** + * Creates a new instance of ExtensionAggregateState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtensionAggregateState() { + } + + /** + * Creates or finds a ExtensionAggregateState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtensionAggregateState. + */ + @JsonCreator + public static ExtensionAggregateState fromString(String name) { + return fromString(name, ExtensionAggregateState.class); + } + + /** + * Gets known ExtensionAggregateState values. + * + * @return known ExtensionAggregateState values. + */ + public static Collection values() { + return values(ExtensionAggregateState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java new file mode 100644 index 0000000000000..c52bd57dfcf37 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceView.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the Extension Instance View. + */ +@Fluent +public final class ExtensionInstanceView { + /* + * The extension name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Specifies the type of the extension; an example is "MicrosoftMonitoringAgent". + */ + @JsonProperty(value = "type") + private String type; + + /* + * Specifies the version of the script handler. + */ + @JsonProperty(value = "typeHandlerVersion") + private String typeHandlerVersion; + + /* + * Instance view status. + */ + @JsonProperty(value = "status") + private ExtensionInstanceViewStatus status; + + /** + * Creates an instance of ExtensionInstanceView class. + */ + public ExtensionInstanceView() { + } + + /** + * Get the name property: The extension name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The extension name. + * + * @param name the name value to set. + * @return the ExtensionInstanceView object itself. + */ + public ExtensionInstanceView withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Specifies the type of the extension; an example is "MicrosoftMonitoringAgent". + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Specifies the type of the extension; an example is "MicrosoftMonitoringAgent". + * + * @param type the type value to set. + * @return the ExtensionInstanceView object itself. + */ + public ExtensionInstanceView withType(String type) { + this.type = type; + return this; + } + + /** + * Get the typeHandlerVersion property: Specifies the version of the script handler. + * + * @return the typeHandlerVersion value. + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set the typeHandlerVersion property: Specifies the version of the script handler. + * + * @param typeHandlerVersion the typeHandlerVersion value to set. + * @return the ExtensionInstanceView object itself. + */ + public ExtensionInstanceView withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get the status property: Instance view status. + * + * @return the status value. + */ + public ExtensionInstanceViewStatus status() { + return this.status; + } + + /** + * Set the status property: Instance view status. + * + * @param status the status value to set. + * @return the ExtensionInstanceView object itself. + */ + public ExtensionInstanceView withStatus(ExtensionInstanceViewStatus status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() != null) { + status().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceViewStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceViewStatus.java new file mode 100644 index 0000000000000..9af8aa5e9bc0c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionInstanceViewStatus.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Instance view status. + */ +@Fluent +public final class ExtensionInstanceViewStatus { + /* + * The status code. + */ + @JsonProperty(value = "code") + private String code; + + /* + * The level code. + */ + @JsonProperty(value = "level") + private StatusLevelTypes level; + + /* + * The short localizable label for the status. + */ + @JsonProperty(value = "displayStatus") + private String displayStatus; + + /* + * The detailed status message, including for alerts and error messages. + */ + @JsonProperty(value = "message") + private String message; + + /* + * The time of the status. + */ + @JsonProperty(value = "time") + private OffsetDateTime time; + + /** + * Creates an instance of ExtensionInstanceViewStatus class. + */ + public ExtensionInstanceViewStatus() { + } + + /** + * Get the code property: The status code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: The status code. + * + * @param code the code value to set. + * @return the ExtensionInstanceViewStatus object itself. + */ + public ExtensionInstanceViewStatus withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the level property: The level code. + * + * @return the level value. + */ + public StatusLevelTypes level() { + return this.level; + } + + /** + * Set the level property: The level code. + * + * @param level the level value to set. + * @return the ExtensionInstanceViewStatus object itself. + */ + public ExtensionInstanceViewStatus withLevel(StatusLevelTypes level) { + this.level = level; + return this; + } + + /** + * Get the displayStatus property: The short localizable label for the status. + * + * @return the displayStatus value. + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Set the displayStatus property: The short localizable label for the status. + * + * @param displayStatus the displayStatus value to set. + * @return the ExtensionInstanceViewStatus object itself. + */ + public ExtensionInstanceViewStatus withDisplayStatus(String displayStatus) { + this.displayStatus = displayStatus; + return this; + } + + /** + * Get the message property: The detailed status message, including for alerts and error messages. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The detailed status message, including for alerts and error messages. + * + * @param message the message value to set. + * @return the ExtensionInstanceViewStatus object itself. + */ + public ExtensionInstanceViewStatus withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the time property: The time of the status. + * + * @return the time value. + */ + public OffsetDateTime time() { + return this.time; + } + + /** + * Set the time property: The time of the status. + * + * @param time the time value to set. + * @return the ExtensionInstanceViewStatus object itself. + */ + public ExtensionInstanceViewStatus withTime(OffsetDateTime time) { + this.time = time; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionList.java new file mode 100644 index 0000000000000..60a39e8563d8c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionList.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of Extensions in HCI cluster. + */ +@Immutable +public final class ExtensionList { + /* + * List of Extensions in HCI cluster. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ExtensionList class. + */ + public ExtensionList() { + } + + /** + * Get the value property: List of Extensions in HCI cluster. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionManagedBy.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionManagedBy.java new file mode 100644 index 0000000000000..bc8872b49dbf9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionManagedBy.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates if the extension is managed by azure or the user. + */ +public final class ExtensionManagedBy extends ExpandableStringEnum { + /** + * Static value Azure for ExtensionManagedBy. + */ + public static final ExtensionManagedBy AZURE = fromString("Azure"); + + /** + * Static value User for ExtensionManagedBy. + */ + public static final ExtensionManagedBy USER = fromString("User"); + + /** + * Creates a new instance of ExtensionManagedBy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExtensionManagedBy() { + } + + /** + * Creates or finds a ExtensionManagedBy from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtensionManagedBy. + */ + @JsonCreator + public static ExtensionManagedBy fromString(String name) { + return fromString(name, ExtensionManagedBy.class); + } + + /** + * Gets known ExtensionManagedBy values. + * + * @return known ExtensionManagedBy values. + */ + public static Collection values() { + return values(ExtensionManagedBy.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java new file mode 100644 index 0000000000000..3c95efdb7ac69 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatch.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionPatchProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Extension Details to update. + */ +@Fluent +public final class ExtensionPatch { + /* + * Describes Machine Extension Properties that can be updated. + */ + @JsonProperty(value = "properties") + private ExtensionPatchProperties innerProperties; + + /** + * Creates an instance of ExtensionPatch class. + */ + public ExtensionPatch() { + } + + /** + * Get the innerProperties property: Describes Machine Extension Properties that can be updated. + * + * @return the innerProperties value. + */ + private ExtensionPatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the extensionParameters property: Describes the properties of a Machine Extension that can be updated. + * + * @return the extensionParameters value. + */ + public ExtensionPatchParameters extensionParameters() { + return this.innerProperties() == null ? null : this.innerProperties().extensionParameters(); + } + + /** + * Set the extensionParameters property: Describes the properties of a Machine Extension that can be updated. + * + * @param extensionParameters the extensionParameters value to set. + * @return the ExtensionPatch object itself. + */ + public ExtensionPatch withExtensionParameters(ExtensionPatchParameters extensionParameters) { + if (this.innerProperties() == null) { + this.innerProperties = new ExtensionPatchProperties(); + } + this.innerProperties().withExtensionParameters(extensionParameters); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java new file mode 100644 index 0000000000000..9f5b9bcf7343b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionPatchParameters.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a Machine Extension that can be updated. + */ +@Fluent +public final class ExtensionPatchParameters { + /* + * Specifies the version of the script handler. Latest version would be used if not specified. + */ + @JsonProperty(value = "typeHandlerVersion") + private String typeHandlerVersion; + + /* + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. + */ + @JsonProperty(value = "enableAutomaticUpgrade") + private Boolean enableAutomaticUpgrade; + + /* + * Json formatted public settings for the extension. + */ + @JsonProperty(value = "settings") + private Object settings; + + /* + * Protected settings (may contain secrets). + */ + @JsonProperty(value = "protectedSettings") + private Object protectedSettings; + + /** + * Creates an instance of ExtensionPatchParameters class. + */ + public ExtensionPatchParameters() { + } + + /** + * Get the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used if + * not specified. + * + * @return the typeHandlerVersion value. + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Set the typeHandlerVersion property: Specifies the version of the script handler. Latest version would be used if + * not specified. + * + * @param typeHandlerVersion the typeHandlerVersion value to set. + * @return the ExtensionPatchParameters object itself. + */ + public ExtensionPatchParameters withTypeHandlerVersion(String typeHandlerVersion) { + this.typeHandlerVersion = typeHandlerVersion; + return this; + } + + /** + * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.enableAutomaticUpgrade; + } + + /** + * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version available. + * + * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. + * @return the ExtensionPatchParameters object itself. + */ + public ExtensionPatchParameters withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + this.enableAutomaticUpgrade = enableAutomaticUpgrade; + return this; + } + + /** + * Get the settings property: Json formatted public settings for the extension. + * + * @return the settings value. + */ + public Object settings() { + return this.settings; + } + + /** + * Set the settings property: Json formatted public settings for the extension. + * + * @param settings the settings value to set. + * @return the ExtensionPatchParameters object itself. + */ + public ExtensionPatchParameters withSettings(Object settings) { + this.settings = settings; + return this; + } + + /** + * Get the protectedSettings property: Protected settings (may contain secrets). + * + * @return the protectedSettings value. + */ + public Object protectedSettings() { + return this.protectedSettings; + } + + /** + * Set the protectedSettings property: Protected settings (may contain secrets). + * + * @param protectedSettings the protectedSettings value to set. + * @return the ExtensionPatchParameters object itself. + */ + public ExtensionPatchParameters withProtectedSettings(Object protectedSettings) { + this.protectedSettings = protectedSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java new file mode 100644 index 0000000000000..335bdcbdbbea1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ExtensionUpgradeParameters.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the parameters for Extension upgrade. + */ +@Fluent +public final class ExtensionUpgradeParameters { + /* + * Extension Upgrade Target Version. + */ + @JsonProperty(value = "targetVersion") + private String targetVersion; + + /** + * Creates an instance of ExtensionUpgradeParameters class. + */ + public ExtensionUpgradeParameters() { + } + + /** + * Get the targetVersion property: Extension Upgrade Target Version. + * + * @return the targetVersion value. + */ + public String targetVersion() { + return this.targetVersion; + } + + /** + * Set the targetVersion property: Extension Upgrade Target Version. + * + * @param targetVersion the targetVersion value to set. + * @return the ExtensionUpgradeParameters object itself. + */ + public ExtensionUpgradeParameters withTargetVersion(String targetVersion) { + this.targetVersion = targetVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java new file mode 100644 index 0000000000000..1b682bec8ee8f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Extensions.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Extensions. + */ +public interface Extensions { + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName); + + /** + * List all Extensions under ArcSetting resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @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 list of Extensions in HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByArcSetting(String resourceGroupName, String clusterName, String arcSettingName, + Context context); + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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 particular Arc Extension of HCI Cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String arcSettingName, + String extensionName, Context context); + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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 particular Arc Extension of HCI Cluster. + */ + Extension get(String resourceGroupName, String clusterName, String arcSettingName, String extensionName); + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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 delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName); + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @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 delete(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + Context context); + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions 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 upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionUpgradeParameters extensionUpgradeParameters); + + /** + * Upgrade a particular Arc Extension of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information. + * @param extensionName The name of the machine extension. + * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. + * @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 upgrade(String resourceGroupName, String clusterName, String arcSettingName, String extensionName, + ExtensionUpgradeParameters extensionUpgradeParameters, Context context); + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param id the resource ID. + * @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 particular Arc Extension of HCI Cluster along with {@link Response}. + */ + Extension getById(String id); + + /** + * Get particular Arc Extension of HCI Cluster. + * + * @param id the resource ID. + * @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 particular Arc Extension of HCI Cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param id the resource ID. + * @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 deleteById(String id); + + /** + * Delete particular Arc Extension of HCI Cluster. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Extension resource. + * + * @param name resource name. + * @return the first stage of the new Extension definition. + */ + Extension.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryDiskImage.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryDiskImage.java index bc82ab72fb53e..8d94f7ab7162c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryDiskImage.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryDiskImage.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** This is the disk image base class. */ +/** + * This is the disk image base class. + */ @Immutable public class GalleryDiskImage { /* @@ -16,13 +18,15 @@ public class GalleryDiskImage { @JsonProperty(value = "sizeInMB", access = JsonProperty.Access.WRITE_ONLY) private Long sizeInMB; - /** Creates an instance of GalleryDiskImage class. */ + /** + * Creates an instance of GalleryDiskImage class. + */ public GalleryDiskImage() { } /** * Get the sizeInMB property: This property indicates the size of the VHD to be created. - * + * * @return the sizeInMB value. */ public Long sizeInMB() { @@ -31,7 +35,7 @@ public Long sizeInMB() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageIdentifier.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageIdentifier.java index abe7f233e9231..689ab3dd61d06 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageIdentifier.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageIdentifier.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** This is the gallery image definition identifier. */ +/** + * This is the gallery image definition identifier. + */ @Fluent public final class GalleryImageIdentifier { /* @@ -29,13 +31,15 @@ public final class GalleryImageIdentifier { @JsonProperty(value = "sku", required = true) private String sku; - /** Creates an instance of GalleryImageIdentifier class. */ + /** + * Creates an instance of GalleryImageIdentifier class. + */ public GalleryImageIdentifier() { } /** * Get the publisher property: The name of the gallery image definition publisher. - * + * * @return the publisher value. */ public String publisher() { @@ -44,7 +48,7 @@ public String publisher() { /** * Set the publisher property: The name of the gallery image definition publisher. - * + * * @param publisher the publisher value to set. * @return the GalleryImageIdentifier object itself. */ @@ -55,7 +59,7 @@ public GalleryImageIdentifier withPublisher(String publisher) { /** * Get the offer property: The name of the gallery image definition offer. - * + * * @return the offer value. */ public String offer() { @@ -64,7 +68,7 @@ public String offer() { /** * Set the offer property: The name of the gallery image definition offer. - * + * * @param offer the offer value to set. * @return the GalleryImageIdentifier object itself. */ @@ -75,7 +79,7 @@ public GalleryImageIdentifier withOffer(String offer) { /** * Get the sku property: The name of the gallery image definition SKU. - * + * * @return the sku value. */ public String sku() { @@ -84,7 +88,7 @@ public String sku() { /** * Set the sku property: The name of the gallery image definition SKU. - * + * * @param sku the sku value to set. * @return the GalleryImageIdentifier object itself. */ @@ -95,25 +99,22 @@ public GalleryImageIdentifier withSku(String sku) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (publisher() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property publisher in model GalleryImageIdentifier")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property publisher in model GalleryImageIdentifier")); } if (offer() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property offer in model GalleryImageIdentifier")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property offer in model GalleryImageIdentifier")); } if (sku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model GalleryImageIdentifier")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sku in model GalleryImageIdentifier")); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatus.java index ace2b72f0b3a5..c1d1da2be6a2a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The observed state of gallery images. */ +/** + * The observed state of gallery images. + */ @Fluent public final class GalleryImageStatus { /* @@ -40,13 +42,15 @@ public final class GalleryImageStatus { @JsonProperty(value = "progressPercentage") private Long progressPercentage; - /** Creates an instance of GalleryImageStatus class. */ + /** + * Creates an instance of GalleryImageStatus class. + */ public GalleryImageStatus() { } /** * Get the errorCode property: GalleryImage provisioning error code. - * + * * @return the errorCode value. */ public String errorCode() { @@ -55,7 +59,7 @@ public String errorCode() { /** * Set the errorCode property: GalleryImage provisioning error code. - * + * * @param errorCode the errorCode value to set. * @return the GalleryImageStatus object itself. */ @@ -66,7 +70,7 @@ public GalleryImageStatus withErrorCode(String errorCode) { /** * Get the errorMessage property: Descriptive error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -75,7 +79,7 @@ public String errorMessage() { /** * Set the errorMessage property: Descriptive error message. - * + * * @param errorMessage the errorMessage value to set. * @return the GalleryImageStatus object itself. */ @@ -86,7 +90,7 @@ public GalleryImageStatus withErrorMessage(String errorMessage) { /** * Get the provisioningStatus property: The provisioningStatus property. - * + * * @return the provisioningStatus value. */ public GalleryImageStatusProvisioningStatus provisioningStatus() { @@ -95,7 +99,7 @@ public GalleryImageStatusProvisioningStatus provisioningStatus() { /** * Set the provisioningStatus property: The provisioningStatus property. - * + * * @param provisioningStatus the provisioningStatus value to set. * @return the GalleryImageStatus object itself. */ @@ -106,7 +110,7 @@ public GalleryImageStatus withProvisioningStatus(GalleryImageStatusProvisioningS /** * Get the downloadStatus property: The download status of the gallery image. - * + * * @return the downloadStatus value. */ public GalleryImageStatusDownloadStatus downloadStatus() { @@ -115,7 +119,7 @@ public GalleryImageStatusDownloadStatus downloadStatus() { /** * Set the downloadStatus property: The download status of the gallery image. - * + * * @param downloadStatus the downloadStatus value to set. * @return the GalleryImageStatus object itself. */ @@ -126,7 +130,7 @@ public GalleryImageStatus withDownloadStatus(GalleryImageStatusDownloadStatus do /** * Get the progressPercentage property: The progress of the operation in percentage. - * + * * @return the progressPercentage value. */ public Long progressPercentage() { @@ -135,7 +139,7 @@ public Long progressPercentage() { /** * Set the progressPercentage property: The progress of the operation in percentage. - * + * * @param progressPercentage the progressPercentage value to set. * @return the GalleryImageStatus object itself. */ @@ -146,7 +150,7 @@ public GalleryImageStatus withProgressPercentage(Long progressPercentage) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatusDownloadStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatusDownloadStatus.java index 9c07cfb904f59..7b2f2f6736593 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatusDownloadStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatusDownloadStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The download status of the gallery image. */ +/** + * The download status of the gallery image. + */ @Fluent public final class GalleryImageStatusDownloadStatus { /* @@ -16,13 +18,15 @@ public final class GalleryImageStatusDownloadStatus { @JsonProperty(value = "downloadSizeInMB") private Long downloadSizeInMB; - /** Creates an instance of GalleryImageStatusDownloadStatus class. */ + /** + * Creates an instance of GalleryImageStatusDownloadStatus class. + */ public GalleryImageStatusDownloadStatus() { } /** * Get the downloadSizeInMB property: The downloaded sized of the image in MB. - * + * * @return the downloadSizeInMB value. */ public Long downloadSizeInMB() { @@ -31,7 +35,7 @@ public Long downloadSizeInMB() { /** * Set the downloadSizeInMB property: The downloaded sized of the image in MB. - * + * * @param downloadSizeInMB the downloadSizeInMB value to set. * @return the GalleryImageStatusDownloadStatus object itself. */ @@ -42,7 +46,7 @@ public GalleryImageStatusDownloadStatus withDownloadSizeInMB(Long downloadSizeIn /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatusProvisioningStatus.java index be6eb2f2b2667..087473e12bef7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatusProvisioningStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageStatusProvisioningStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The GalleryImageStatusProvisioningStatus model. */ +/** + * The GalleryImageStatusProvisioningStatus model. + */ @Fluent public final class GalleryImageStatusProvisioningStatus { /* @@ -22,13 +24,15 @@ public final class GalleryImageStatusProvisioningStatus { @JsonProperty(value = "status") private Status status; - /** Creates an instance of GalleryImageStatusProvisioningStatus class. */ + /** + * Creates an instance of GalleryImageStatusProvisioningStatus class. + */ public GalleryImageStatusProvisioningStatus() { } /** * Get the operationId property: The ID of the operation performed on the gallery image. - * + * * @return the operationId value. */ public String operationId() { @@ -37,7 +41,7 @@ public String operationId() { /** * Set the operationId property: The ID of the operation performed on the gallery image. - * + * * @param operationId the operationId value to set. * @return the GalleryImageStatusProvisioningStatus object itself. */ @@ -49,7 +53,7 @@ public GalleryImageStatusProvisioningStatus withOperationId(String operationId) /** * Get the status property: The status of the operation performed on the gallery image [Succeeded, Failed, * InProgress]. - * + * * @return the status value. */ public Status status() { @@ -59,7 +63,7 @@ public Status status() { /** * Set the status property: The status of the operation performed on the gallery image [Succeeded, Failed, * InProgress]. - * + * * @param status the status value to set. * @return the GalleryImageStatusProvisioningStatus object itself. */ @@ -70,7 +74,7 @@ public GalleryImageStatusProvisioningStatus withStatus(Status status) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageVersion.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageVersion.java index 99a99d91ebae4..1a1f2b7b07def 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageVersion.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageVersion.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.GalleryImageVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifies information about the gallery image version that you want to create or update. */ +/** + * Specifies information about the gallery image version that you want to create or update. + */ @Fluent public final class GalleryImageVersion { /* @@ -23,13 +25,15 @@ public final class GalleryImageVersion { @JsonProperty(value = "properties") private GalleryImageVersionProperties innerProperties; - /** Creates an instance of GalleryImageVersion class. */ + /** + * Creates an instance of GalleryImageVersion class. + */ public GalleryImageVersion() { } /** * Get the name property: This is the version of the gallery image. - * + * * @return the name value. */ public String name() { @@ -38,7 +42,7 @@ public String name() { /** * Set the name property: This is the version of the gallery image. - * + * * @param name the name value to set. * @return the GalleryImageVersion object itself. */ @@ -49,7 +53,7 @@ public GalleryImageVersion withName(String name) { /** * Get the innerProperties property: Describes the properties of a gallery image version. - * + * * @return the innerProperties value. */ private GalleryImageVersionProperties innerProperties() { @@ -58,7 +62,7 @@ private GalleryImageVersionProperties innerProperties() { /** * Get the storageProfile property: This is the storage profile of a Gallery Image Version. - * + * * @return the storageProfile value. */ public GalleryImageVersionStorageProfile storageProfile() { @@ -67,7 +71,7 @@ public GalleryImageVersionStorageProfile storageProfile() { /** * Set the storageProfile property: This is the storage profile of a Gallery Image Version. - * + * * @param storageProfile the storageProfile value to set. * @return the GalleryImageVersion object itself. */ @@ -81,7 +85,7 @@ public GalleryImageVersion withStorageProfile(GalleryImageVersionStorageProfile /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageVersionStorageProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageVersionStorageProfile.java index c3c20e35b92bf..1eab67d09102d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageVersionStorageProfile.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImageVersionStorageProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** This is the storage profile of a Gallery Image Version. */ +/** + * This is the storage profile of a Gallery Image Version. + */ @Fluent public final class GalleryImageVersionStorageProfile { /* @@ -16,13 +18,15 @@ public final class GalleryImageVersionStorageProfile { @JsonProperty(value = "osDiskImage") private GalleryOSDiskImage osDiskImage; - /** Creates an instance of GalleryImageVersionStorageProfile class. */ + /** + * Creates an instance of GalleryImageVersionStorageProfile class. + */ public GalleryImageVersionStorageProfile() { } /** * Get the osDiskImage property: This is the OS disk image. - * + * * @return the osDiskImage value. */ public GalleryOSDiskImage osDiskImage() { @@ -31,7 +35,7 @@ public GalleryOSDiskImage osDiskImage() { /** * Set the osDiskImage property: This is the OS disk image. - * + * * @param osDiskImage the osDiskImage value to set. * @return the GalleryImageVersionStorageProfile object itself. */ @@ -42,7 +46,7 @@ public GalleryImageVersionStorageProfile withOsDiskImage(GalleryOSDiskImage osDi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImages.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImages.java index 15469df7298d0..f307a6a78d4ec 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImages.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImages.java @@ -10,74 +10,76 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.GalleryImagesInner; import java.util.Map; -/** An immutable client-side representation of GalleryImages. */ +/** + * An immutable client-side representation of GalleryImages. + */ public interface GalleryImages { /** * 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 tags(); /** * Gets the extendedLocation property: The extendedLocation of 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 containerId property: Storage ContainerID of the storage container to be used for gallery image. - * + * * @return the containerId value. */ String containerId(); /** * Gets the imagePath property: location of the image the gallery image should be created from. - * + * * @return the imagePath value. */ String imagePath(); /** * Gets the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @return the osType value. */ OperatingSystemTypes osType(); @@ -85,21 +87,21 @@ public interface GalleryImages { /** * Gets the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @return the cloudInitDataSource value. */ CloudInitDataSource cloudInitDataSource(); /** * Gets the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ HyperVGeneration hyperVGeneration(); /** * Gets the identifier property: This is the gallery image definition identifier. - * + * * @return the identifier value. */ GalleryImageIdentifier identifier(); @@ -107,72 +109,77 @@ public interface GalleryImages { /** * Gets the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @return the version value. */ GalleryImageVersion version(); /** * Gets the provisioningState property: Provisioning state of the gallery image. - * + * * @return the provisioningState value. */ ProvisioningStateEnum provisioningState(); /** * Gets the status property: The observed state of gallery images. - * + * * @return the status value. */ GalleryImageStatus status(); /** * 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.azurestackhci.fluent.models.GalleryImagesInner object. - * + * * @return the inner object. */ GalleryImagesInner innerModel(); - /** The entirety of the GalleryImages definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the GalleryImages definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The GalleryImages definition stages. */ + /** + * The GalleryImages definition stages. + */ interface DefinitionStages { - /** The first stage of the GalleryImages definition. */ + /** + * The first stage of the GalleryImages definition. + */ interface Blank extends WithLocation { } - /** The stage of the GalleryImages definition allowing to specify location. */ + /** + * The stage of the GalleryImages 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. */ @@ -180,18 +187,20 @@ interface WithLocation { /** * 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 GalleryImages definition allowing to specify parent resource. */ + /** + * The stage of the GalleryImages 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. */ @@ -203,128 +212,140 @@ interface WithResourceGroup { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithExtendedLocation, - DefinitionStages.WithContainerId, - DefinitionStages.WithImagePath, - DefinitionStages.WithOsType, - DefinitionStages.WithCloudInitDataSource, - DefinitionStages.WithHyperVGeneration, - DefinitionStages.WithIdentifier, - DefinitionStages.WithVersion { + extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, DefinitionStages.WithContainerId, + DefinitionStages.WithImagePath, DefinitionStages.WithOsType, DefinitionStages.WithCloudInitDataSource, + DefinitionStages.WithHyperVGeneration, DefinitionStages.WithIdentifier, DefinitionStages.WithVersion { /** * Executes the create request. - * + * * @return the created resource. */ GalleryImages create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ GalleryImages create(Context context); } - /** The stage of the GalleryImages definition allowing to specify tags. */ + /** + * The stage of the GalleryImages 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 tags); } - /** The stage of the GalleryImages definition allowing to specify extendedLocation. */ + /** + * The stage of the GalleryImages definition allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The extendedLocation of the resource.. - * + * * @param extendedLocation The extendedLocation of the resource. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the GalleryImages definition allowing to specify containerId. */ + /** + * The stage of the GalleryImages definition allowing to specify containerId. + */ interface WithContainerId { /** * Specifies the containerId property: Storage ContainerID of the storage container to be used for gallery * image. - * + * * @param containerId Storage ContainerID of the storage container to be used for gallery image. * @return the next definition stage. */ WithCreate withContainerId(String containerId); } - /** The stage of the GalleryImages definition allowing to specify imagePath. */ + /** + * The stage of the GalleryImages definition allowing to specify imagePath. + */ interface WithImagePath { /** * Specifies the imagePath property: location of the image the gallery image should be created from. - * + * * @param imagePath location of the image the gallery image should be created from. * @return the next definition stage. */ WithCreate withImagePath(String imagePath); } - /** The stage of the GalleryImages definition allowing to specify osType. */ + /** + * The stage of the GalleryImages definition allowing to specify osType. + */ interface WithOsType { /** * Specifies the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @param osType Operating system type that the gallery image uses [Windows, Linux]. * @return the next definition stage. */ WithCreate withOsType(OperatingSystemTypes osType); } - /** The stage of the GalleryImages definition allowing to specify cloudInitDataSource. */ + /** + * The stage of the GalleryImages definition allowing to specify cloudInitDataSource. + */ interface WithCloudInitDataSource { /** * Specifies the cloudInitDataSource property: Datasource for the gallery image when provisioning with * cloud-init [NoCloud, Azure]. - * + * * @param cloudInitDataSource Datasource for the gallery image when provisioning with cloud-init [NoCloud, - * Azure]. + * Azure]. * @return the next definition stage. */ WithCreate withCloudInitDataSource(CloudInitDataSource cloudInitDataSource); } - /** The stage of the GalleryImages definition allowing to specify hyperVGeneration. */ + /** + * The stage of the GalleryImages definition allowing to specify hyperVGeneration. + */ interface WithHyperVGeneration { /** * Specifies the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration The hypervisor generation of the Virtual Machine [V1, V2]. * @return the next definition stage. */ WithCreate withHyperVGeneration(HyperVGeneration hyperVGeneration); } - /** The stage of the GalleryImages definition allowing to specify identifier. */ + /** + * The stage of the GalleryImages definition allowing to specify identifier. + */ interface WithIdentifier { /** * Specifies the identifier property: This is the gallery image definition identifier.. - * + * * @param identifier This is the gallery image definition identifier. * @return the next definition stage. */ WithCreate withIdentifier(GalleryImageIdentifier identifier); } - /** The stage of the GalleryImages definition allowing to specify version. */ + /** + * The stage of the GalleryImages definition allowing to specify version. + */ interface WithVersion { /** * Specifies the version property: Specifies information about the gallery image version that you want to * create or update.. - * + * * @param version Specifies information about the gallery image version that you want to create or update. * @return the next definition stage. */ @@ -334,36 +355,42 @@ interface WithVersion { /** * Begins update for the GalleryImages resource. - * + * * @return the stage of resource update. */ GalleryImages.Update update(); - /** The template for GalleryImages update. */ + /** + * The template for GalleryImages update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ GalleryImages apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ GalleryImages apply(Context context); } - /** The GalleryImages update stages. */ + /** + * The GalleryImages update stages. + */ interface UpdateStages { - /** The stage of the GalleryImages update allowing to specify tags. */ + /** + * The stage of the GalleryImages update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -373,14 +400,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ GalleryImages refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesListResult.java index d7b45e6f388a0..60b906d60a182 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of gallery images. */ +/** + * List of gallery images. + */ @Fluent public final class GalleryImagesListResult { /* @@ -24,13 +26,15 @@ public final class GalleryImagesListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of GalleryImagesListResult class. */ + /** + * Creates an instance of GalleryImagesListResult class. + */ public GalleryImagesListResult() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the GalleryImagesListResult object itself. */ @@ -50,7 +54,7 @@ public GalleryImagesListResult withValue(List value) { /** * Get the nextLink property: Link to the next set of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesOperations.java index 03a4b0103bb52..c6d82863087d8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesOperations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesOperations.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of GalleryImagesOperations. */ +/** + * Resource collection API of GalleryImagesOperations. + */ public interface GalleryImagesOperations { /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -21,12 +23,12 @@ public interface GalleryImagesOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a gallery image along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String galleryImageName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String galleryImageName, + Context context); /** * Gets a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +51,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param galleryImageName Name of the gallery image. * @param context The context to associate with this operation. @@ -62,7 +64,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,7 +76,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the gallery images in the specified resource group. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +89,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @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 list of gallery images as paginated response with {@link PagedIterable}. @@ -97,7 +99,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the gallery images in the specified subscription. Use the nextLink property in the response to get * the next page of gallery images. - * + * * @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. @@ -108,7 +110,7 @@ Response getByResourceGroupWithResponse( /** * Gets a gallery image. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,7 +121,7 @@ Response getByResourceGroupWithResponse( /** * Gets a gallery image. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +133,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a gallery image. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,7 +143,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a gallery image. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +154,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new GalleryImages resource. - * + * * @param name resource name. * @return the first stage of the new GalleryImages definition. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesUpdateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesUpdateRequest.java index b1a470b1eb6bf..e9b2521b082ea 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesUpdateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryImagesUpdateRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The gallery images resource patch definition. */ +/** + * The gallery images resource patch definition. + */ @Fluent public final class GalleryImagesUpdateRequest { /* @@ -19,13 +21,15 @@ public final class GalleryImagesUpdateRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of GalleryImagesUpdateRequest class. */ + /** + * Creates an instance of GalleryImagesUpdateRequest class. + */ public GalleryImagesUpdateRequest() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the GalleryImagesUpdateRequest object itself. */ @@ -45,7 +49,7 @@ public GalleryImagesUpdateRequest withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryOSDiskImage.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryOSDiskImage.java index ea35ace9757d3..221d35c9ffa86 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryOSDiskImage.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GalleryOSDiskImage.java @@ -6,16 +6,20 @@ import com.azure.core.annotation.Immutable; -/** This is the OS disk image. */ +/** + * This is the OS disk image. + */ @Immutable public final class GalleryOSDiskImage extends GalleryDiskImage { - /** Creates an instance of GalleryOSDiskImage class. */ + /** + * Creates an instance of GalleryOSDiskImage class. + */ public GalleryOSDiskImage() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgent.java index 22687d1dea995..5dd7eeecdbd16 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgent.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgent.java @@ -7,67 +7,69 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.azurestackhci.fluent.models.GuestAgentInner; -/** An immutable client-side representation of GuestAgent. */ +/** + * An immutable client-side representation of GuestAgent. + */ public interface GuestAgent { /** * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the credentials property: Username / Password Credentials to provision guest agent. - * + * * @return the credentials value. */ GuestCredential credentials(); /** * Gets the provisioningAction property: The guest agent provisioning action. - * + * * @return the provisioningAction value. */ ProvisioningAction provisioningAction(); /** * Gets the status property: The guest agent status. - * + * * @return the status value. */ String status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ String provisioningState(); /** * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.GuestAgentInner object. - * + * * @return the inner object. */ GuestAgentInner innerModel(); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentInstallStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentInstallStatus.java index 69050f0880e6a..2313884da02a0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentInstallStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentInstallStatus.java @@ -10,7 +10,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Defines the status of a guest agent installation. */ +/** + * Defines the status of a guest agent installation. + */ @Immutable public final class GuestAgentInstallStatus { /* @@ -43,13 +45,15 @@ public final class GuestAgentInstallStatus { @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY) private List errorDetails; - /** Creates an instance of GuestAgentInstallStatus class. */ + /** + * Creates an instance of GuestAgentInstallStatus class. + */ public GuestAgentInstallStatus() { } /** * Get the vmUuid property: Specifies the VM's unique SMBIOS ID. - * + * * @return the vmUuid value. */ public String vmUuid() { @@ -58,7 +62,7 @@ public String vmUuid() { /** * Get the status property: The installation status of the hybrid machine agent installation. - * + * * @return the status value. */ public StatusTypes status() { @@ -67,7 +71,7 @@ public StatusTypes status() { /** * Get the lastStatusChange property: The time of the last status change. - * + * * @return the lastStatusChange value. */ public OffsetDateTime lastStatusChange() { @@ -76,7 +80,7 @@ public OffsetDateTime lastStatusChange() { /** * Get the agentVersion property: The hybrid machine agent full version. - * + * * @return the agentVersion value. */ public String agentVersion() { @@ -85,7 +89,7 @@ public String agentVersion() { /** * Get the errorDetails property: Details about the error state. - * + * * @return the errorDetails value. */ public List errorDetails() { @@ -94,7 +98,7 @@ public List errorDetails() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentList.java index 6f8fcd6d360a1..d6680a5033f18 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentList.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of GuestAgent. */ +/** + * List of GuestAgent. + */ @Fluent public final class GuestAgentList { /* @@ -25,13 +27,15 @@ public final class GuestAgentList { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of GuestAgentList class. */ + /** + * Creates an instance of GuestAgentList class. + */ public GuestAgentList() { } /** * Get the nextLink property: Url to follow for getting next page of GuestAgent. - * + * * @return the nextLink value. */ public String nextLink() { @@ -40,7 +44,7 @@ public String nextLink() { /** * Set the nextLink property: Url to follow for getting next page of GuestAgent. - * + * * @param nextLink the nextLink value to set. * @return the GuestAgentList object itself. */ @@ -51,7 +55,7 @@ public GuestAgentList withNextLink(String nextLink) { /** * Get the value property: Array of GuestAgent. - * + * * @return the value value. */ public List value() { @@ -60,7 +64,7 @@ public List value() { /** * Set the value property: Array of GuestAgent. - * + * * @param value the value value to set. * @return the GuestAgentList object itself. */ @@ -71,14 +75,13 @@ public GuestAgentList withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model GuestAgentList")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model GuestAgentList")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgents.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgents.java index 5f021fd47ad13..e563437fca7e3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgents.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgents.java @@ -8,15 +8,17 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.azurestackhci.fluent.models.GuestAgentInner; -/** Resource collection API of GuestAgents. */ +/** + * Resource collection API of GuestAgents. + */ public interface GuestAgents { /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -26,11 +28,11 @@ public interface GuestAgents { /** * Implements GuestAgent PUT method. - * - *

Create Or Update GuestAgent. - * + * + * Create Or Update GuestAgent. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param body Request payload. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -42,11 +44,11 @@ public interface GuestAgents { /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -57,11 +59,11 @@ public interface GuestAgents { /** * Gets GuestAgent. - * - *

Implements GuestAgent GET method. - * + * + * Implements GuestAgent GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -71,11 +73,11 @@ public interface GuestAgents { /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -84,11 +86,11 @@ public interface GuestAgents { /** * Deleted an GuestAgent. - * - *

Implements GuestAgent DELETE method. - * + * + * Implements GuestAgent DELETE method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentsOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentsOperations.java index 0269e3f058d7b..b2ae9de0bad51 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentsOperations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestAgentsOperations.java @@ -7,15 +7,17 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of GuestAgentsOperations. */ +/** + * Resource collection API of GuestAgentsOperations. + */ public interface GuestAgentsOperations { /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -25,11 +27,11 @@ public interface GuestAgentsOperations { /** * Implements GET GuestAgent in a vm. - * - *

Returns the list of GuestAgent of the given vm. - * + * + * Returns the list of GuestAgent of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestCredential.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestCredential.java index 4726ec54b76d6..829c93523f4c6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestCredential.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/GuestCredential.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Username / Password Credentials to connect to guest. */ +/** + * Username / Password Credentials to connect to guest. + */ @Fluent public final class GuestCredential { /* @@ -22,13 +24,15 @@ public final class GuestCredential { @JsonProperty(value = "password") private String password; - /** Creates an instance of GuestCredential class. */ + /** + * Creates an instance of GuestCredential class. + */ public GuestCredential() { } /** * Get the username property: The username to connect with the guest. - * + * * @return the username value. */ public String username() { @@ -37,7 +41,7 @@ public String username() { /** * Set the username property: The username to connect with the guest. - * + * * @param username the username value to set. * @return the GuestCredential object itself. */ @@ -48,7 +52,7 @@ public GuestCredential withUsername(String username) { /** * Get the password property: The password to connect with the guest. - * + * * @return the password value. */ public String password() { @@ -57,7 +61,7 @@ public String password() { /** * Set the password property: The password to connect with the guest. - * + * * @param password the password value to set. * @return the GuestCredential object itself. */ @@ -68,7 +72,7 @@ public GuestCredential withPassword(String password) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfileUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfileUpdate.java index 50605acb81d8d..b38a8099f0a2b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfileUpdate.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HardwareProfileUpdate.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** HardwareProfile - Specifies the hardware settings for the virtual machine instance. */ +/** + * HardwareProfile - Specifies the hardware settings for the virtual machine instance. + */ @Fluent public final class HardwareProfileUpdate { /* @@ -28,13 +30,15 @@ public final class HardwareProfileUpdate { @JsonProperty(value = "memoryMB") private Long memoryMB; - /** Creates an instance of HardwareProfileUpdate class. */ + /** + * Creates an instance of HardwareProfileUpdate class. + */ public HardwareProfileUpdate() { } /** * Get the vmSize property: The vmSize property. - * + * * @return the vmSize value. */ public VmSizeEnum vmSize() { @@ -43,7 +47,7 @@ public VmSizeEnum vmSize() { /** * Set the vmSize property: The vmSize property. - * + * * @param vmSize the vmSize value to set. * @return the HardwareProfileUpdate object itself. */ @@ -54,7 +58,7 @@ public HardwareProfileUpdate withVmSize(VmSizeEnum vmSize) { /** * Get the processors property: number of processors for the virtual machine instance. - * + * * @return the processors value. */ public Integer processors() { @@ -63,7 +67,7 @@ public Integer processors() { /** * Set the processors property: number of processors for the virtual machine instance. - * + * * @param processors the processors value to set. * @return the HardwareProfileUpdate object itself. */ @@ -74,7 +78,7 @@ public HardwareProfileUpdate withProcessors(Integer processors) { /** * Get the memoryMB property: RAM in MB for the virtual machine instance. - * + * * @return the memoryMB value. */ public Long memoryMB() { @@ -83,7 +87,7 @@ public Long memoryMB() { /** * Set the memoryMB property: RAM in MB for the virtual machine instance. - * + * * @param memoryMB the memoryMB value to set. * @return the HardwareProfileUpdate object itself. */ @@ -94,7 +98,7 @@ public HardwareProfileUpdate withMemoryMB(Long memoryMB) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java new file mode 100644 index 0000000000000..928464cf71b87 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HciUpdate.java @@ -0,0 +1,937 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of HciUpdate. + */ +public interface HciUpdate { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the Updates proxy resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the installedDate property: Date that the update was installed. + * + * @return the installedDate value. + */ + OffsetDateTime installedDate(); + + /** + * Gets the description property: Description of the update. + * + * @return the description value. + */ + String description(); + + /** + * Gets the state property: State of the update as it relates to this stamp. + * + * @return the state value. + */ + State state(); + + /** + * Gets the prerequisites property: If update State is HasPrerequisite, this property contains an array of objects + * describing prerequisite updates before installing this update. Otherwise, it is empty. + * + * @return the prerequisites value. + */ + List prerequisites(); + + /** + * Gets the componentVersions property: An array of component versions for a Solution Bundle update, and an empty + * array otherwise. + * + * @return the componentVersions value. + */ + List componentVersions(); + + /** + * Gets the rebootRequired property: The rebootRequired property. + * + * @return the rebootRequired value. + */ + RebootRequirement rebootRequired(); + + /** + * Gets the healthState property: Overall health state for update-specific health checks. + * + * @return the healthState value. + */ + HealthState healthState(); + + /** + * Gets the healthCheckResult property: An array of PrecheckResult objects. + * + * @return the healthCheckResult value. + */ + List healthCheckResult(); + + /** + * Gets the healthCheckDate property: Last time the package-specific checks were run. + * + * @return the healthCheckDate value. + */ + OffsetDateTime healthCheckDate(); + + /** + * Gets the packagePath property: Path where the update package is available. + * + * @return the packagePath value. + */ + String packagePath(); + + /** + * Gets the packageSizeInMb property: Size of the package. This value is a combination of the size from update + * metadata and size of the payload that results from the live scan operation for OS update content. + * + * @return the packageSizeInMb value. + */ + Float packageSizeInMb(); + + /** + * Gets the displayName property: Display name of the Update. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the version property: Version of the update. + * + * @return the version value. + */ + String version(); + + /** + * Gets the publisher property: Publisher of the update package. + * + * @return the publisher value. + */ + String publisher(); + + /** + * Gets the releaseLink property: Link to release notes for the update. + * + * @return the releaseLink value. + */ + String releaseLink(); + + /** + * Gets the availabilityType property: Indicates the way the update content can be downloaded. + * + * @return the availabilityType value. + */ + AvailabilityType availabilityType(); + + /** + * Gets the packageType property: Customer-visible type of the update. + * + * @return the packageType value. + */ + String packageType(); + + /** + * Gets the additionalProperties property: Extensible KV pairs serialized as a string. This is currently used to + * report the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp + * based on OEM type. + * + * @return the additionalProperties value. + */ + String additionalProperties(); + + /** + * Gets the progressPercentage property: Progress percentage of ongoing operation. Currently this property is only + * valid when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * + * @return the progressPercentage value. + */ + Float progressPercentage(); + + /** + * Gets the notifyMessage property: Brief message with instructions for updates of AvailabilityType Notify. + * + * @return the notifyMessage value. + */ + String notifyMessage(); + + /** + * 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.azurestackhci.fluent.models.HciUpdateInner object. + * + * @return the inner object. + */ + HciUpdateInner innerModel(); + + /** + * The entirety of the HciUpdate definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The HciUpdate definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the HciUpdate definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the HciUpdate definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @return the next definition stage. + */ + WithCreate withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the HciUpdate 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.WithInstalledDate, + DefinitionStages.WithDescription, DefinitionStages.WithState, DefinitionStages.WithPrerequisites, + DefinitionStages.WithComponentVersions, DefinitionStages.WithRebootRequired, + DefinitionStages.WithHealthState, DefinitionStages.WithHealthCheckResult, + DefinitionStages.WithHealthCheckDate, DefinitionStages.WithPackagePath, + DefinitionStages.WithPackageSizeInMb, DefinitionStages.WithDisplayName, DefinitionStages.WithVersion, + DefinitionStages.WithPublisher, DefinitionStages.WithReleaseLink, DefinitionStages.WithAvailabilityType, + DefinitionStages.WithPackageType, DefinitionStages.WithAdditionalProperties, + DefinitionStages.WithProgressPercentage, DefinitionStages.WithNotifyMessage { + /** + * Executes the create request. + * + * @return the created resource. + */ + HciUpdate create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + HciUpdate create(Context context); + } + + /** + * The stage of the HciUpdate 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. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + + /** + * The stage of the HciUpdate definition allowing to specify installedDate. + */ + interface WithInstalledDate { + /** + * Specifies the installedDate property: Date that the update was installed.. + * + * @param installedDate Date that the update was installed. + * @return the next definition stage. + */ + WithCreate withInstalledDate(OffsetDateTime installedDate); + } + + /** + * The stage of the HciUpdate definition allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: Description of the update.. + * + * @param description Description of the update. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + + /** + * The stage of the HciUpdate definition allowing to specify state. + */ + interface WithState { + /** + * Specifies the state property: State of the update as it relates to this stamp.. + * + * @param state State of the update as it relates to this stamp. + * @return the next definition stage. + */ + WithCreate withState(State state); + } + + /** + * The stage of the HciUpdate definition allowing to specify prerequisites. + */ + interface WithPrerequisites { + /** + * Specifies the prerequisites property: If update State is HasPrerequisite, this property contains an array + * of objects describing prerequisite updates before installing this update. Otherwise, it is empty.. + * + * @param prerequisites If update State is HasPrerequisite, this property contains an array of objects + * describing prerequisite updates before installing this update. Otherwise, it is empty. + * @return the next definition stage. + */ + WithCreate withPrerequisites(List prerequisites); + } + + /** + * The stage of the HciUpdate definition allowing to specify componentVersions. + */ + interface WithComponentVersions { + /** + * Specifies the componentVersions property: An array of component versions for a Solution Bundle update, + * and an empty array otherwise. . + * + * @param componentVersions An array of component versions for a Solution Bundle update, and an empty array + * otherwise. + * @return the next definition stage. + */ + WithCreate withComponentVersions(List componentVersions); + } + + /** + * The stage of the HciUpdate definition allowing to specify rebootRequired. + */ + interface WithRebootRequired { + /** + * Specifies the rebootRequired property: The rebootRequired property.. + * + * @param rebootRequired The rebootRequired property. + * @return the next definition stage. + */ + WithCreate withRebootRequired(RebootRequirement rebootRequired); + } + + /** + * The stage of the HciUpdate definition allowing to specify healthState. + */ + interface WithHealthState { + /** + * Specifies the healthState property: Overall health state for update-specific health checks.. + * + * @param healthState Overall health state for update-specific health checks. + * @return the next definition stage. + */ + WithCreate withHealthState(HealthState healthState); + } + + /** + * The stage of the HciUpdate definition allowing to specify healthCheckResult. + */ + interface WithHealthCheckResult { + /** + * Specifies the healthCheckResult property: An array of PrecheckResult objects.. + * + * @param healthCheckResult An array of PrecheckResult objects. + * @return the next definition stage. + */ + WithCreate withHealthCheckResult(List healthCheckResult); + } + + /** + * The stage of the HciUpdate definition allowing to specify healthCheckDate. + */ + interface WithHealthCheckDate { + /** + * Specifies the healthCheckDate property: Last time the package-specific checks were run.. + * + * @param healthCheckDate Last time the package-specific checks were run. + * @return the next definition stage. + */ + WithCreate withHealthCheckDate(OffsetDateTime healthCheckDate); + } + + /** + * The stage of the HciUpdate definition allowing to specify packagePath. + */ + interface WithPackagePath { + /** + * Specifies the packagePath property: Path where the update package is available.. + * + * @param packagePath Path where the update package is available. + * @return the next definition stage. + */ + WithCreate withPackagePath(String packagePath); + } + + /** + * The stage of the HciUpdate definition allowing to specify packageSizeInMb. + */ + interface WithPackageSizeInMb { + /** + * Specifies the packageSizeInMb property: Size of the package. This value is a combination of the size from + * update metadata and size of the payload that results from the live scan operation for OS update content.. + * + * @param packageSizeInMb Size of the package. This value is a combination of the size from update metadata + * and size of the payload that results from the live scan operation for OS update content. + * @return the next definition stage. + */ + WithCreate withPackageSizeInMb(Float packageSizeInMb); + } + + /** + * The stage of the HciUpdate definition allowing to specify displayName. + */ + interface WithDisplayName { + /** + * Specifies the displayName property: Display name of the Update. + * + * @param displayName Display name of the Update. + * @return the next definition stage. + */ + WithCreate withDisplayName(String displayName); + } + + /** + * The stage of the HciUpdate definition allowing to specify version. + */ + interface WithVersion { + /** + * Specifies the version property: Version of the update.. + * + * @param version Version of the update. + * @return the next definition stage. + */ + WithCreate withVersion(String version); + } + + /** + * The stage of the HciUpdate definition allowing to specify publisher. + */ + interface WithPublisher { + /** + * Specifies the publisher property: Publisher of the update package.. + * + * @param publisher Publisher of the update package. + * @return the next definition stage. + */ + WithCreate withPublisher(String publisher); + } + + /** + * The stage of the HciUpdate definition allowing to specify releaseLink. + */ + interface WithReleaseLink { + /** + * Specifies the releaseLink property: Link to release notes for the update.. + * + * @param releaseLink Link to release notes for the update. + * @return the next definition stage. + */ + WithCreate withReleaseLink(String releaseLink); + } + + /** + * The stage of the HciUpdate definition allowing to specify availabilityType. + */ + interface WithAvailabilityType { + /** + * Specifies the availabilityType property: Indicates the way the update content can be downloaded.. + * + * @param availabilityType Indicates the way the update content can be downloaded. + * @return the next definition stage. + */ + WithCreate withAvailabilityType(AvailabilityType availabilityType); + } + + /** + * The stage of the HciUpdate definition allowing to specify packageType. + */ + interface WithPackageType { + /** + * Specifies the packageType property: Customer-visible type of the update.. + * + * @param packageType Customer-visible type of the update. + * @return the next definition stage. + */ + WithCreate withPackageType(String packageType); + } + + /** + * The stage of the HciUpdate definition allowing to specify additionalProperties. + */ + interface WithAdditionalProperties { + /** + * Specifies the additionalProperties property: Extensible KV pairs serialized as a string. This is + * currently used to report the stamp OEM family and hardware model information when an update is flagged as + * Invalid for the stamp based on OEM type.. + * + * @param additionalProperties Extensible KV pairs serialized as a string. This is currently used to report + * the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp + * based on OEM type. + * @return the next definition stage. + */ + WithCreate withAdditionalProperties(String additionalProperties); + } + + /** + * The stage of the HciUpdate definition allowing to specify progressPercentage. + */ + interface WithProgressPercentage { + /** + * Specifies the progressPercentage property: Progress percentage of ongoing operation. Currently this + * property is only valid when the update is in the Downloading state, where it maps to how much of the + * update content has been downloaded.. + * + * @param progressPercentage Progress percentage of ongoing operation. Currently this property is only valid + * when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * @return the next definition stage. + */ + WithCreate withProgressPercentage(Float progressPercentage); + } + + /** + * The stage of the HciUpdate definition allowing to specify notifyMessage. + */ + interface WithNotifyMessage { + /** + * Specifies the notifyMessage property: Brief message with instructions for updates of AvailabilityType + * Notify.. + * + * @param notifyMessage Brief message with instructions for updates of AvailabilityType Notify. + * @return the next definition stage. + */ + WithCreate withNotifyMessage(String notifyMessage); + } + } + + /** + * Begins update for the HciUpdate resource. + * + * @return the stage of resource update. + */ + HciUpdate.Update update(); + + /** + * The template for HciUpdate update. + */ + interface Update extends UpdateStages.WithInstalledDate, UpdateStages.WithDescription, UpdateStages.WithState, + UpdateStages.WithPrerequisites, UpdateStages.WithComponentVersions, UpdateStages.WithRebootRequired, + UpdateStages.WithHealthState, UpdateStages.WithHealthCheckResult, UpdateStages.WithHealthCheckDate, + UpdateStages.WithPackagePath, UpdateStages.WithPackageSizeInMb, UpdateStages.WithDisplayName, + UpdateStages.WithVersion, UpdateStages.WithPublisher, UpdateStages.WithReleaseLink, + UpdateStages.WithAvailabilityType, UpdateStages.WithPackageType, UpdateStages.WithAdditionalProperties, + UpdateStages.WithProgressPercentage, UpdateStages.WithNotifyMessage { + /** + * Executes the update request. + * + * @return the updated resource. + */ + HciUpdate apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + HciUpdate apply(Context context); + } + + /** + * The HciUpdate update stages. + */ + interface UpdateStages { + /** + * The stage of the HciUpdate update allowing to specify installedDate. + */ + interface WithInstalledDate { + /** + * Specifies the installedDate property: Date that the update was installed.. + * + * @param installedDate Date that the update was installed. + * @return the next definition stage. + */ + Update withInstalledDate(OffsetDateTime installedDate); + } + + /** + * The stage of the HciUpdate update allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: Description of the update.. + * + * @param description Description of the update. + * @return the next definition stage. + */ + Update withDescription(String description); + } + + /** + * The stage of the HciUpdate update allowing to specify state. + */ + interface WithState { + /** + * Specifies the state property: State of the update as it relates to this stamp.. + * + * @param state State of the update as it relates to this stamp. + * @return the next definition stage. + */ + Update withState(State state); + } + + /** + * The stage of the HciUpdate update allowing to specify prerequisites. + */ + interface WithPrerequisites { + /** + * Specifies the prerequisites property: If update State is HasPrerequisite, this property contains an array + * of objects describing prerequisite updates before installing this update. Otherwise, it is empty.. + * + * @param prerequisites If update State is HasPrerequisite, this property contains an array of objects + * describing prerequisite updates before installing this update. Otherwise, it is empty. + * @return the next definition stage. + */ + Update withPrerequisites(List prerequisites); + } + + /** + * The stage of the HciUpdate update allowing to specify componentVersions. + */ + interface WithComponentVersions { + /** + * Specifies the componentVersions property: An array of component versions for a Solution Bundle update, + * and an empty array otherwise. . + * + * @param componentVersions An array of component versions for a Solution Bundle update, and an empty array + * otherwise. + * @return the next definition stage. + */ + Update withComponentVersions(List componentVersions); + } + + /** + * The stage of the HciUpdate update allowing to specify rebootRequired. + */ + interface WithRebootRequired { + /** + * Specifies the rebootRequired property: The rebootRequired property.. + * + * @param rebootRequired The rebootRequired property. + * @return the next definition stage. + */ + Update withRebootRequired(RebootRequirement rebootRequired); + } + + /** + * The stage of the HciUpdate update allowing to specify healthState. + */ + interface WithHealthState { + /** + * Specifies the healthState property: Overall health state for update-specific health checks.. + * + * @param healthState Overall health state for update-specific health checks. + * @return the next definition stage. + */ + Update withHealthState(HealthState healthState); + } + + /** + * The stage of the HciUpdate update allowing to specify healthCheckResult. + */ + interface WithHealthCheckResult { + /** + * Specifies the healthCheckResult property: An array of PrecheckResult objects.. + * + * @param healthCheckResult An array of PrecheckResult objects. + * @return the next definition stage. + */ + Update withHealthCheckResult(List healthCheckResult); + } + + /** + * The stage of the HciUpdate update allowing to specify healthCheckDate. + */ + interface WithHealthCheckDate { + /** + * Specifies the healthCheckDate property: Last time the package-specific checks were run.. + * + * @param healthCheckDate Last time the package-specific checks were run. + * @return the next definition stage. + */ + Update withHealthCheckDate(OffsetDateTime healthCheckDate); + } + + /** + * The stage of the HciUpdate update allowing to specify packagePath. + */ + interface WithPackagePath { + /** + * Specifies the packagePath property: Path where the update package is available.. + * + * @param packagePath Path where the update package is available. + * @return the next definition stage. + */ + Update withPackagePath(String packagePath); + } + + /** + * The stage of the HciUpdate update allowing to specify packageSizeInMb. + */ + interface WithPackageSizeInMb { + /** + * Specifies the packageSizeInMb property: Size of the package. This value is a combination of the size from + * update metadata and size of the payload that results from the live scan operation for OS update content.. + * + * @param packageSizeInMb Size of the package. This value is a combination of the size from update metadata + * and size of the payload that results from the live scan operation for OS update content. + * @return the next definition stage. + */ + Update withPackageSizeInMb(Float packageSizeInMb); + } + + /** + * The stage of the HciUpdate update allowing to specify displayName. + */ + interface WithDisplayName { + /** + * Specifies the displayName property: Display name of the Update. + * + * @param displayName Display name of the Update. + * @return the next definition stage. + */ + Update withDisplayName(String displayName); + } + + /** + * The stage of the HciUpdate update allowing to specify version. + */ + interface WithVersion { + /** + * Specifies the version property: Version of the update.. + * + * @param version Version of the update. + * @return the next definition stage. + */ + Update withVersion(String version); + } + + /** + * The stage of the HciUpdate update allowing to specify publisher. + */ + interface WithPublisher { + /** + * Specifies the publisher property: Publisher of the update package.. + * + * @param publisher Publisher of the update package. + * @return the next definition stage. + */ + Update withPublisher(String publisher); + } + + /** + * The stage of the HciUpdate update allowing to specify releaseLink. + */ + interface WithReleaseLink { + /** + * Specifies the releaseLink property: Link to release notes for the update.. + * + * @param releaseLink Link to release notes for the update. + * @return the next definition stage. + */ + Update withReleaseLink(String releaseLink); + } + + /** + * The stage of the HciUpdate update allowing to specify availabilityType. + */ + interface WithAvailabilityType { + /** + * Specifies the availabilityType property: Indicates the way the update content can be downloaded.. + * + * @param availabilityType Indicates the way the update content can be downloaded. + * @return the next definition stage. + */ + Update withAvailabilityType(AvailabilityType availabilityType); + } + + /** + * The stage of the HciUpdate update allowing to specify packageType. + */ + interface WithPackageType { + /** + * Specifies the packageType property: Customer-visible type of the update.. + * + * @param packageType Customer-visible type of the update. + * @return the next definition stage. + */ + Update withPackageType(String packageType); + } + + /** + * The stage of the HciUpdate update allowing to specify additionalProperties. + */ + interface WithAdditionalProperties { + /** + * Specifies the additionalProperties property: Extensible KV pairs serialized as a string. This is + * currently used to report the stamp OEM family and hardware model information when an update is flagged as + * Invalid for the stamp based on OEM type.. + * + * @param additionalProperties Extensible KV pairs serialized as a string. This is currently used to report + * the stamp OEM family and hardware model information when an update is flagged as Invalid for the stamp + * based on OEM type. + * @return the next definition stage. + */ + Update withAdditionalProperties(String additionalProperties); + } + + /** + * The stage of the HciUpdate update allowing to specify progressPercentage. + */ + interface WithProgressPercentage { + /** + * Specifies the progressPercentage property: Progress percentage of ongoing operation. Currently this + * property is only valid when the update is in the Downloading state, where it maps to how much of the + * update content has been downloaded.. + * + * @param progressPercentage Progress percentage of ongoing operation. Currently this property is only valid + * when the update is in the Downloading state, where it maps to how much of the update content has been + * downloaded. + * @return the next definition stage. + */ + Update withProgressPercentage(Float progressPercentage); + } + + /** + * The stage of the HciUpdate update allowing to specify notifyMessage. + */ + interface WithNotifyMessage { + /** + * Specifies the notifyMessage property: Brief message with instructions for updates of AvailabilityType + * Notify.. + * + * @param notifyMessage Brief message with instructions for updates of AvailabilityType Notify. + * @return the next definition stage. + */ + Update withNotifyMessage(String notifyMessage); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + HciUpdate refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + HciUpdate refresh(Context context); + + /** + * Apply Update. + * + * @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 post(); + + /** + * Apply Update. + * + * @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 post(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HealthState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HealthState.java new file mode 100644 index 0000000000000..32951664836be --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HealthState.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for HealthState. + */ +public final class HealthState extends ExpandableStringEnum { + /** + * Static value Unknown for HealthState. + */ + public static final HealthState UNKNOWN = fromString("Unknown"); + + /** + * Static value Success for HealthState. + */ + public static final HealthState SUCCESS = fromString("Success"); + + /** + * Static value Failure for HealthState. + */ + public static final HealthState FAILURE = fromString("Failure"); + + /** + * Static value Warning for HealthState. + */ + public static final HealthState WARNING = fromString("Warning"); + + /** + * Static value Error for HealthState. + */ + public static final HealthState ERROR = fromString("Error"); + + /** + * Static value InProgress for HealthState. + */ + public static final HealthState IN_PROGRESS = fromString("InProgress"); + + /** + * Creates a new instance of HealthState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HealthState() { + } + + /** + * Creates or finds a HealthState from its string representation. + * + * @param name a name to look for. + * @return the corresponding HealthState. + */ + @JsonCreator + public static HealthState fromString(String name) { + return fromString(name, HealthState.class); + } + + /** + * Gets known HealthState values. + * + * @return known HealthState values. + */ + public static Collection values() { + return values(HealthState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HostNetwork.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HostNetwork.java new file mode 100644 index 0000000000000..047ebadc315ec --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HostNetwork.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The HostNetwork of a cluster. + */ +@Fluent +public final class HostNetwork { + /* + * The network intents assigned to the network reference pattern used for the deployment. Each intent will define its own name, traffic type, adapter names, and overrides as recommended by your OEM. + */ + @JsonProperty(value = "intents") + private List intents; + + /* + * List of StorageNetworks config to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "storageNetworks") + private List storageNetworks; + + /* + * Defines how the storage adapters between nodes are connected either switch or switch less.. + */ + @JsonProperty(value = "storageConnectivitySwitchless") + private Boolean storageConnectivitySwitchless; + + /* + * Optional parameter required only for 3 Nodes Switchless deployments. This allows users to specify IPs and Mask for Storage NICs when Network ATC is not assigning the IPs for storage automatically. + */ + @JsonProperty(value = "enableStorageAutoIp") + private Boolean enableStorageAutoIp; + + /** + * Creates an instance of HostNetwork class. + */ + public HostNetwork() { + } + + /** + * Get the intents property: The network intents assigned to the network reference pattern used for the deployment. + * Each intent will define its own name, traffic type, adapter names, and overrides as recommended by your OEM. + * + * @return the intents value. + */ + public List intents() { + return this.intents; + } + + /** + * Set the intents property: The network intents assigned to the network reference pattern used for the deployment. + * Each intent will define its own name, traffic type, adapter names, and overrides as recommended by your OEM. + * + * @param intents the intents value to set. + * @return the HostNetwork object itself. + */ + public HostNetwork withIntents(List intents) { + this.intents = intents; + return this; + } + + /** + * Get the storageNetworks property: List of StorageNetworks config to deploy AzureStackHCI Cluster. + * + * @return the storageNetworks value. + */ + public List storageNetworks() { + return this.storageNetworks; + } + + /** + * Set the storageNetworks property: List of StorageNetworks config to deploy AzureStackHCI Cluster. + * + * @param storageNetworks the storageNetworks value to set. + * @return the HostNetwork object itself. + */ + public HostNetwork withStorageNetworks(List storageNetworks) { + this.storageNetworks = storageNetworks; + return this; + } + + /** + * Get the storageConnectivitySwitchless property: Defines how the storage adapters between nodes are connected + * either switch or switch less.. + * + * @return the storageConnectivitySwitchless value. + */ + public Boolean storageConnectivitySwitchless() { + return this.storageConnectivitySwitchless; + } + + /** + * Set the storageConnectivitySwitchless property: Defines how the storage adapters between nodes are connected + * either switch or switch less.. + * + * @param storageConnectivitySwitchless the storageConnectivitySwitchless value to set. + * @return the HostNetwork object itself. + */ + public HostNetwork withStorageConnectivitySwitchless(Boolean storageConnectivitySwitchless) { + this.storageConnectivitySwitchless = storageConnectivitySwitchless; + return this; + } + + /** + * Get the enableStorageAutoIp property: Optional parameter required only for 3 Nodes Switchless deployments. This + * allows users to specify IPs and Mask for Storage NICs when Network ATC is not assigning the IPs for storage + * automatically. + * + * @return the enableStorageAutoIp value. + */ + public Boolean enableStorageAutoIp() { + return this.enableStorageAutoIp; + } + + /** + * Set the enableStorageAutoIp property: Optional parameter required only for 3 Nodes Switchless deployments. This + * allows users to specify IPs and Mask for Storage NICs when Network ATC is not assigning the IPs for storage + * automatically. + * + * @param enableStorageAutoIp the enableStorageAutoIp value to set. + * @return the HostNetwork object itself. + */ + public HostNetwork withEnableStorageAutoIp(Boolean enableStorageAutoIp) { + this.enableStorageAutoIp = enableStorageAutoIp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (intents() != null) { + intents().forEach(e -> e.validate()); + } + if (storageNetworks() != null) { + storageNetworks().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HttpProxyConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HttpProxyConfiguration.java index bc459f65f3eaf..a54ba5261a01f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HttpProxyConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HttpProxyConfiguration.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** HTTP Proxy configuration for the VM. */ +/** + * HTTP Proxy configuration for the VM. + */ @Fluent public final class HttpProxyConfiguration { /* @@ -35,13 +37,15 @@ public final class HttpProxyConfiguration { @JsonProperty(value = "trustedCa") private String trustedCa; - /** Creates an instance of HttpProxyConfiguration class. */ + /** + * Creates an instance of HttpProxyConfiguration class. + */ public HttpProxyConfiguration() { } /** * Get the httpProxy property: The HTTP proxy server endpoint to use. - * + * * @return the httpProxy value. */ public String httpProxy() { @@ -50,7 +54,7 @@ public String httpProxy() { /** * Set the httpProxy property: The HTTP proxy server endpoint to use. - * + * * @param httpProxy the httpProxy value to set. * @return the HttpProxyConfiguration object itself. */ @@ -61,7 +65,7 @@ public HttpProxyConfiguration withHttpProxy(String httpProxy) { /** * Get the httpsProxy property: The HTTPS proxy server endpoint to use. - * + * * @return the httpsProxy value. */ public String httpsProxy() { @@ -70,7 +74,7 @@ public String httpsProxy() { /** * Set the httpsProxy property: The HTTPS proxy server endpoint to use. - * + * * @param httpsProxy the httpsProxy value to set. * @return the HttpProxyConfiguration object itself. */ @@ -81,7 +85,7 @@ public HttpProxyConfiguration withHttpsProxy(String httpsProxy) { /** * Get the noProxy property: The endpoints that should not go through proxy. - * + * * @return the noProxy value. */ public List noProxy() { @@ -90,7 +94,7 @@ public List noProxy() { /** * Set the noProxy property: The endpoints that should not go through proxy. - * + * * @param noProxy the noProxy value to set. * @return the HttpProxyConfiguration object itself. */ @@ -101,7 +105,7 @@ public HttpProxyConfiguration withNoProxy(List noProxy) { /** * Get the trustedCa property: Alternative CA cert to use for connecting to proxy servers. - * + * * @return the trustedCa value. */ public String trustedCa() { @@ -110,7 +114,7 @@ public String trustedCa() { /** * Set the trustedCa property: Alternative CA cert to use for connecting to proxy servers. - * + * * @param trustedCa the trustedCa value to set. * @return the HttpProxyConfiguration object itself. */ @@ -121,7 +125,7 @@ public HttpProxyConfiguration withTrustedCa(String trustedCa) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadata.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadata.java index 38a783d691906..4f776773bee08 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadata.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadata.java @@ -7,67 +7,69 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.azurestackhci.fluent.models.HybridIdentityMetadataInner; -/** An immutable client-side representation of HybridIdentityMetadata. */ +/** + * An immutable client-side representation of HybridIdentityMetadata. + */ public interface HybridIdentityMetadata { /** * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the resourceUid property: The unique identifier for the resource. - * + * * @return the resourceUid value. */ String resourceUid(); /** * Gets the publicKey property: The Public Key. - * + * * @return the publicKey value. */ String publicKey(); /** * Gets the identity property: Identity for the resource. - * + * * @return the identity value. */ Identity identity(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ String provisioningState(); /** * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.HybridIdentityMetadataInner object. - * + * * @return the inner object. */ HybridIdentityMetadataInner innerModel(); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadataList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadataList.java index f42f2d10f731a..36c63ce5f2828 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadataList.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadataList.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of HybridIdentityMetadata. */ +/** + * List of HybridIdentityMetadata. + */ @Fluent public final class HybridIdentityMetadataList { /* @@ -25,13 +27,15 @@ public final class HybridIdentityMetadataList { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of HybridIdentityMetadataList class. */ + /** + * Creates an instance of HybridIdentityMetadataList class. + */ public HybridIdentityMetadataList() { } /** * Get the nextLink property: Url to follow for getting next page of HybridIdentityMetadata. - * + * * @return the nextLink value. */ public String nextLink() { @@ -40,7 +44,7 @@ public String nextLink() { /** * Set the nextLink property: Url to follow for getting next page of HybridIdentityMetadata. - * + * * @param nextLink the nextLink value to set. * @return the HybridIdentityMetadataList object itself. */ @@ -51,7 +55,7 @@ public HybridIdentityMetadataList withNextLink(String nextLink) { /** * Get the value property: Array of HybridIdentityMetadata. - * + * * @return the value value. */ public List value() { @@ -60,7 +64,7 @@ public List value() { /** * Set the value property: Array of HybridIdentityMetadata. - * + * * @param value the value value to set. * @return the HybridIdentityMetadataList object itself. */ @@ -71,15 +75,14 @@ public HybridIdentityMetadataList withValue(List va /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model HybridIdentityMetadataList")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model HybridIdentityMetadataList")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadatas.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadatas.java index 0b5b161650438..f824e6f7fe03a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadatas.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HybridIdentityMetadatas.java @@ -8,15 +8,17 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of HybridIdentityMetadatas. */ +/** + * Resource collection API of HybridIdentityMetadatas. + */ public interface HybridIdentityMetadatas { /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -27,11 +29,11 @@ public interface HybridIdentityMetadatas { /** * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * + * + * Implements HybridIdentityMetadata GET method. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -41,11 +43,11 @@ public interface HybridIdentityMetadatas { /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -55,11 +57,11 @@ public interface HybridIdentityMetadatas { /** * Implements GET HybridIdentityMetadata in a vm. - * - *

Returns the list of HybridIdentityMetadata of the given vm. - * + * + * Returns the list of HybridIdentityMetadata of the given vm. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HyperVGeneration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HyperVGeneration.java index e5f05fad85dab..8522abe09c123 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HyperVGeneration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/HyperVGeneration.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The hypervisor generation of the Virtual Machine [V1, V2]. */ +/** + * The hypervisor generation of the Virtual Machine [V1, V2]. + */ public final class HyperVGeneration extends ExpandableStringEnum { - /** Static value V1 for HyperVGeneration. */ + /** + * Static value V1 for HyperVGeneration. + */ public static final HyperVGeneration V1 = fromString("V1"); - /** Static value V2 for HyperVGeneration. */ + /** + * Static value V2 for HyperVGeneration. + */ public static final HyperVGeneration V2 = fromString("V2"); /** * Creates a new instance of HyperVGeneration value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public HyperVGeneration() { /** * Creates or finds a HyperVGeneration from its string representation. - * + * * @param name a name to look for. * @return the corresponding HyperVGeneration. */ @@ -38,7 +44,7 @@ public static HyperVGeneration fromString(String name) { /** * Gets known HyperVGeneration values. - * + * * @return known HyperVGeneration values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Identity.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Identity.java index 0f80a93fb7cf0..b651d6fb045f8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Identity.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Identity.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Identity for the resource. */ +/** + * Identity for the resource. + */ @Fluent public final class Identity { /* @@ -28,13 +30,15 @@ public final class Identity { @JsonProperty(value = "type") private ResourceIdentityType type; - /** Creates an instance of Identity class. */ + /** + * Creates an instance of Identity class. + */ public Identity() { } /** * Get the principalId property: The principal ID of resource identity. - * + * * @return the principalId value. */ public String principalId() { @@ -43,7 +47,7 @@ public String principalId() { /** * Get the tenantId property: The tenant ID of resource. - * + * * @return the tenantId value. */ public String tenantId() { @@ -52,7 +56,7 @@ public String tenantId() { /** * Get the type property: The identity type. - * + * * @return the type value. */ public ResourceIdentityType type() { @@ -61,7 +65,7 @@ public ResourceIdentityType type() { /** * Set the type property: The identity type. - * + * * @param type the type value to set. * @return the Identity object itself. */ @@ -72,7 +76,7 @@ public Identity withType(ResourceIdentityType type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java new file mode 100644 index 0000000000000..43ddf70479102 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ImdsAttestation.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * IMDS attestation status of the cluster. + */ +public final class ImdsAttestation extends ExpandableStringEnum { + /** + * Static value Disabled for ImdsAttestation. + */ + public static final ImdsAttestation DISABLED = fromString("Disabled"); + + /** + * Static value Enabled for ImdsAttestation. + */ + public static final ImdsAttestation ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of ImdsAttestation value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ImdsAttestation() { + } + + /** + * Creates or finds a ImdsAttestation from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImdsAttestation. + */ + @JsonCreator + public static ImdsAttestation fromString(String name) { + return fromString(name, ImdsAttestation.class); + } + + /** + * Gets known ImdsAttestation values. + * + * @return known ImdsAttestation values. + */ + public static Collection values() { + return values(ImdsAttestation.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java new file mode 100644 index 0000000000000..20df77921010e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InfrastructureNetwork.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The InfrastructureNetwork of a AzureStackHCI Cluster. + */ +@Fluent +public final class InfrastructureNetwork { + /* + * Subnet mask that matches the provided IP address space. + */ + @JsonProperty(value = "subnetMask") + private String subnetMask; + + /* + * Default gateway that should be used for the provided IP address space. + */ + @JsonProperty(value = "gateway") + private String gateway; + + /* + * Range of IP addresses from which addresses are allocated for nodes within a subnet. + */ + @JsonProperty(value = "ipPools") + private List ipPools; + + /* + * IPv4 address of the DNS servers in your environment. + */ + @JsonProperty(value = "dnsServers") + private List dnsServers; + + /* + * Allows customers to use DHCP for Hosts and Cluster IPs. If not declared, the deployment will default to static IPs. When true, GW and DNS servers are not required + */ + @JsonProperty(value = "useDhcp") + private Boolean useDhcp; + + /** + * Creates an instance of InfrastructureNetwork class. + */ + public InfrastructureNetwork() { + } + + /** + * Get the subnetMask property: Subnet mask that matches the provided IP address space. + * + * @return the subnetMask value. + */ + public String subnetMask() { + return this.subnetMask; + } + + /** + * Set the subnetMask property: Subnet mask that matches the provided IP address space. + * + * @param subnetMask the subnetMask value to set. + * @return the InfrastructureNetwork object itself. + */ + public InfrastructureNetwork withSubnetMask(String subnetMask) { + this.subnetMask = subnetMask; + return this; + } + + /** + * Get the gateway property: Default gateway that should be used for the provided IP address space. + * + * @return the gateway value. + */ + public String gateway() { + return this.gateway; + } + + /** + * Set the gateway property: Default gateway that should be used for the provided IP address space. + * + * @param gateway the gateway value to set. + * @return the InfrastructureNetwork object itself. + */ + public InfrastructureNetwork withGateway(String gateway) { + this.gateway = gateway; + return this; + } + + /** + * Get the ipPools property: Range of IP addresses from which addresses are allocated for nodes within a subnet. + * + * @return the ipPools value. + */ + public List ipPools() { + return this.ipPools; + } + + /** + * Set the ipPools property: Range of IP addresses from which addresses are allocated for nodes within a subnet. + * + * @param ipPools the ipPools value to set. + * @return the InfrastructureNetwork object itself. + */ + public InfrastructureNetwork withIpPools(List ipPools) { + this.ipPools = ipPools; + return this; + } + + /** + * Get the dnsServers property: IPv4 address of the DNS servers in your environment. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: IPv4 address of the DNS servers in your environment. + * + * @param dnsServers the dnsServers value to set. + * @return the InfrastructureNetwork object itself. + */ + public InfrastructureNetwork withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get the useDhcp property: Allows customers to use DHCP for Hosts and Cluster IPs. If not declared, the deployment + * will default to static IPs. When true, GW and DNS servers are not required. + * + * @return the useDhcp value. + */ + public Boolean useDhcp() { + return this.useDhcp; + } + + /** + * Set the useDhcp property: Allows customers to use DHCP for Hosts and Cluster IPs. If not declared, the deployment + * will default to static IPs. When true, GW and DNS servers are not required. + * + * @param useDhcp the useDhcp value to set. + * @return the InfrastructureNetwork object itself. + */ + public InfrastructureNetwork withUseDhcp(Boolean useDhcp) { + this.useDhcp = useDhcp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipPools() != null) { + ipPools().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InstanceViewStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InstanceViewStatus.java index 55ebed95826c8..a0e15efe36428 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InstanceViewStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InstanceViewStatus.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Instance view status. */ +/** + * Instance view status. + */ @Fluent public final class InstanceViewStatus { /* @@ -41,13 +43,15 @@ public final class InstanceViewStatus { @JsonProperty(value = "time") private OffsetDateTime time; - /** Creates an instance of InstanceViewStatus class. */ + /** + * Creates an instance of InstanceViewStatus class. + */ public InstanceViewStatus() { } /** * Get the code property: The status code. - * + * * @return the code value. */ public String code() { @@ -56,7 +60,7 @@ public String code() { /** * Set the code property: The status code. - * + * * @param code the code value to set. * @return the InstanceViewStatus object itself. */ @@ -67,7 +71,7 @@ public InstanceViewStatus withCode(String code) { /** * Get the level property: The level code. - * + * * @return the level value. */ public StatusLevelTypes level() { @@ -76,7 +80,7 @@ public StatusLevelTypes level() { /** * Set the level property: The level code. - * + * * @param level the level value to set. * @return the InstanceViewStatus object itself. */ @@ -87,7 +91,7 @@ public InstanceViewStatus withLevel(StatusLevelTypes level) { /** * Get the displayStatus property: The short localizable label for the status. - * + * * @return the displayStatus value. */ public String displayStatus() { @@ -96,7 +100,7 @@ public String displayStatus() { /** * Set the displayStatus property: The short localizable label for the status. - * + * * @param displayStatus the displayStatus value to set. * @return the InstanceViewStatus object itself. */ @@ -107,7 +111,7 @@ public InstanceViewStatus withDisplayStatus(String displayStatus) { /** * Get the message property: The detailed status message, including for alerts and error messages. - * + * * @return the message value. */ public String message() { @@ -116,7 +120,7 @@ public String message() { /** * Set the message property: The detailed status message, including for alerts and error messages. - * + * * @param message the message value to set. * @return the InstanceViewStatus object itself. */ @@ -127,7 +131,7 @@ public InstanceViewStatus withMessage(String message) { /** * Get the time property: The time of the status. - * + * * @return the time value. */ public OffsetDateTime time() { @@ -136,7 +140,7 @@ public OffsetDateTime time() { /** * Set the time property: The time of the status. - * + * * @param time the time value to set. * @return the InstanceViewStatus object itself. */ @@ -147,7 +151,7 @@ public InstanceViewStatus withTime(OffsetDateTime time) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Intents.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Intents.java new file mode 100644 index 0000000000000..6a584588fd801 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Intents.java @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The Intents of a cluster. + */ +@Fluent +public final class Intents { + /* + * Name of the network intent you wish to create. + */ + @JsonProperty(value = "name") + private String name; + + /* + * List of network traffic types. Only allowed values are 'Compute', 'Storage', 'Management'. + */ + @JsonProperty(value = "trafficType") + private List trafficType; + + /* + * Array of network interfaces used for the network intent. + */ + @JsonProperty(value = "adapter") + private List adapter; + + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. + */ + @JsonProperty(value = "overrideVirtualSwitchConfiguration") + private Boolean overrideVirtualSwitchConfiguration; + + /* + * Set virtualSwitch ConfigurationOverrides for cluster. + */ + @JsonProperty(value = "virtualSwitchConfigurationOverrides") + private VirtualSwitchConfigurationOverrides virtualSwitchConfigurationOverrides; + + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. + */ + @JsonProperty(value = "overrideQosPolicy") + private Boolean overrideQosPolicy; + + /* + * Set QoS PolicyOverrides for cluster. + */ + @JsonProperty(value = "qosPolicyOverrides") + private QosPolicyOverrides qosPolicyOverrides; + + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. + */ + @JsonProperty(value = "overrideAdapterProperty") + private Boolean overrideAdapterProperty; + + /* + * Set Adapter PropertyOverrides for cluster. + */ + @JsonProperty(value = "adapterPropertyOverrides") + private AdapterPropertyOverrides adapterPropertyOverrides; + + /** + * Creates an instance of Intents class. + */ + public Intents() { + } + + /** + * Get the name property: Name of the network intent you wish to create. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the network intent you wish to create. + * + * @param name the name value to set. + * @return the Intents object itself. + */ + public Intents withName(String name) { + this.name = name; + return this; + } + + /** + * Get the trafficType property: List of network traffic types. Only allowed values are 'Compute', 'Storage', + * 'Management'. + * + * @return the trafficType value. + */ + public List trafficType() { + return this.trafficType; + } + + /** + * Set the trafficType property: List of network traffic types. Only allowed values are 'Compute', 'Storage', + * 'Management'. + * + * @param trafficType the trafficType value to set. + * @return the Intents object itself. + */ + public Intents withTrafficType(List trafficType) { + this.trafficType = trafficType; + return this; + } + + /** + * Get the adapter property: Array of network interfaces used for the network intent. + * + * @return the adapter value. + */ + public List adapter() { + return this.adapter; + } + + /** + * Set the adapter property: Array of network interfaces used for the network intent. + * + * @param adapter the adapter value to set. + * @return the Intents object itself. + */ + public Intents withAdapter(List adapter) { + this.adapter = adapter; + return this; + } + + /** + * Get the overrideVirtualSwitchConfiguration property: This parameter should only be modified based on your OEM + * guidance. Do not modify this parameter without OEM validation. + * + * @return the overrideVirtualSwitchConfiguration value. + */ + public Boolean overrideVirtualSwitchConfiguration() { + return this.overrideVirtualSwitchConfiguration; + } + + /** + * Set the overrideVirtualSwitchConfiguration property: This parameter should only be modified based on your OEM + * guidance. Do not modify this parameter without OEM validation. + * + * @param overrideVirtualSwitchConfiguration the overrideVirtualSwitchConfiguration value to set. + * @return the Intents object itself. + */ + public Intents withOverrideVirtualSwitchConfiguration(Boolean overrideVirtualSwitchConfiguration) { + this.overrideVirtualSwitchConfiguration = overrideVirtualSwitchConfiguration; + return this; + } + + /** + * Get the virtualSwitchConfigurationOverrides property: Set virtualSwitch ConfigurationOverrides for cluster. + * + * @return the virtualSwitchConfigurationOverrides value. + */ + public VirtualSwitchConfigurationOverrides virtualSwitchConfigurationOverrides() { + return this.virtualSwitchConfigurationOverrides; + } + + /** + * Set the virtualSwitchConfigurationOverrides property: Set virtualSwitch ConfigurationOverrides for cluster. + * + * @param virtualSwitchConfigurationOverrides the virtualSwitchConfigurationOverrides value to set. + * @return the Intents object itself. + */ + public Intents withVirtualSwitchConfigurationOverrides( + VirtualSwitchConfigurationOverrides virtualSwitchConfigurationOverrides) { + this.virtualSwitchConfigurationOverrides = virtualSwitchConfigurationOverrides; + return this; + } + + /** + * Get the overrideQosPolicy property: This parameter should only be modified based on your OEM guidance. Do not + * modify this parameter without OEM validation. + * + * @return the overrideQosPolicy value. + */ + public Boolean overrideQosPolicy() { + return this.overrideQosPolicy; + } + + /** + * Set the overrideQosPolicy property: This parameter should only be modified based on your OEM guidance. Do not + * modify this parameter without OEM validation. + * + * @param overrideQosPolicy the overrideQosPolicy value to set. + * @return the Intents object itself. + */ + public Intents withOverrideQosPolicy(Boolean overrideQosPolicy) { + this.overrideQosPolicy = overrideQosPolicy; + return this; + } + + /** + * Get the qosPolicyOverrides property: Set QoS PolicyOverrides for cluster. + * + * @return the qosPolicyOverrides value. + */ + public QosPolicyOverrides qosPolicyOverrides() { + return this.qosPolicyOverrides; + } + + /** + * Set the qosPolicyOverrides property: Set QoS PolicyOverrides for cluster. + * + * @param qosPolicyOverrides the qosPolicyOverrides value to set. + * @return the Intents object itself. + */ + public Intents withQosPolicyOverrides(QosPolicyOverrides qosPolicyOverrides) { + this.qosPolicyOverrides = qosPolicyOverrides; + return this; + } + + /** + * Get the overrideAdapterProperty property: This parameter should only be modified based on your OEM guidance. Do + * not modify this parameter without OEM validation. + * + * @return the overrideAdapterProperty value. + */ + public Boolean overrideAdapterProperty() { + return this.overrideAdapterProperty; + } + + /** + * Set the overrideAdapterProperty property: This parameter should only be modified based on your OEM guidance. Do + * not modify this parameter without OEM validation. + * + * @param overrideAdapterProperty the overrideAdapterProperty value to set. + * @return the Intents object itself. + */ + public Intents withOverrideAdapterProperty(Boolean overrideAdapterProperty) { + this.overrideAdapterProperty = overrideAdapterProperty; + return this; + } + + /** + * Get the adapterPropertyOverrides property: Set Adapter PropertyOverrides for cluster. + * + * @return the adapterPropertyOverrides value. + */ + public AdapterPropertyOverrides adapterPropertyOverrides() { + return this.adapterPropertyOverrides; + } + + /** + * Set the adapterPropertyOverrides property: Set Adapter PropertyOverrides for cluster. + * + * @param adapterPropertyOverrides the adapterPropertyOverrides value to set. + * @return the Intents object itself. + */ + public Intents withAdapterPropertyOverrides(AdapterPropertyOverrides adapterPropertyOverrides) { + this.adapterPropertyOverrides = adapterPropertyOverrides; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualSwitchConfigurationOverrides() != null) { + virtualSwitchConfigurationOverrides().validate(); + } + if (qosPolicyOverrides() != null) { + qosPolicyOverrides().validate(); + } + if (adapterPropertyOverrides() != null) { + adapterPropertyOverrides().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceDnsSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceDnsSettings.java index 5020b815a6798..208d5d07f684d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceDnsSettings.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/InterfaceDnsSettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The InterfaceDnsSettings model. */ +/** + * The InterfaceDnsSettings model. + */ @Fluent public final class InterfaceDnsSettings { /* @@ -17,13 +19,15 @@ public final class InterfaceDnsSettings { @JsonProperty(value = "dnsServers") private List dnsServers; - /** Creates an instance of InterfaceDnsSettings class. */ + /** + * Creates an instance of InterfaceDnsSettings class. + */ public InterfaceDnsSettings() { } /** * Get the dnsServers property: List of DNS server IP Addresses for the interface. - * + * * @return the dnsServers value. */ public List dnsServers() { @@ -32,7 +36,7 @@ public List dnsServers() { /** * Set the dnsServers property: List of DNS server IP Addresses for the interface. - * + * * @param dnsServers the dnsServers value to set. * @return the InterfaceDnsSettings object itself. */ @@ -43,7 +47,7 @@ public InterfaceDnsSettings withDnsServers(List dnsServers) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAllocationMethodEnum.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAllocationMethodEnum.java index 372b2b2b943a1..8e7171534fe8a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAllocationMethodEnum.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpAllocationMethodEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** IPAllocationMethod - The IP address allocation method. Possible values include: 'Static', 'Dynamic'. */ +/** + * IPAllocationMethod - The IP address allocation method. Possible values include: 'Static', 'Dynamic'. + */ public final class IpAllocationMethodEnum extends ExpandableStringEnum { - /** Static value Dynamic for IpAllocationMethodEnum. */ + /** + * Static value Dynamic for IpAllocationMethodEnum. + */ public static final IpAllocationMethodEnum DYNAMIC = fromString("Dynamic"); - /** Static value Static for IpAllocationMethodEnum. */ + /** + * Static value Static for IpAllocationMethodEnum. + */ public static final IpAllocationMethodEnum STATIC = fromString("Static"); /** * Creates a new instance of IpAllocationMethodEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public IpAllocationMethodEnum() { /** * Creates or finds a IpAllocationMethodEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding IpAllocationMethodEnum. */ @@ -38,7 +44,7 @@ public static IpAllocationMethodEnum fromString(String name) { /** * Gets known IpAllocationMethodEnum values. - * + * * @return known IpAllocationMethodEnum values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfiguration.java index 08f62574c41c1..e5aedabe0e7d3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfiguration.java @@ -7,12 +7,13 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** InterfaceIPConfiguration iPConfiguration in a network interface. */ +/** + * InterfaceIPConfiguration iPConfiguration in a network interface. + */ @Fluent public final class IpConfiguration { /* - * Name - The name of the resource that is unique within a resource group. This name can be used to access the - * resource. + * Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. */ @JsonProperty(value = "name") private String name; @@ -23,14 +24,16 @@ public final class IpConfiguration { @JsonProperty(value = "properties") private IpConfigurationProperties properties; - /** Creates an instance of IpConfiguration class. */ + /** + * Creates an instance of IpConfiguration class. + */ public IpConfiguration() { } /** * Get the name property: Name - The name of the resource that is unique within a resource group. This name can be * used to access the resource. - * + * * @return the name value. */ public String name() { @@ -40,7 +43,7 @@ public String name() { /** * Set the name property: Name - The name of the resource that is unique within a resource group. This name can be * used to access the resource. - * + * * @param name the name value to set. * @return the IpConfiguration object itself. */ @@ -51,7 +54,7 @@ public IpConfiguration withName(String name) { /** * Get the properties property: InterfaceIPConfigurationPropertiesFormat properties of IP configuration. - * + * * @return the properties value. */ public IpConfigurationProperties properties() { @@ -60,7 +63,7 @@ public IpConfigurationProperties properties() { /** * Set the properties property: InterfaceIPConfigurationPropertiesFormat properties of IP configuration. - * + * * @param properties the properties value to set. * @return the IpConfiguration object itself. */ @@ -71,7 +74,7 @@ public IpConfiguration withProperties(IpConfigurationProperties properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfigurationProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfigurationProperties.java index 4a635287f67ee..4e5806e1314a5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfigurationProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfigurationProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** InterfaceIPConfigurationPropertiesFormat properties of IP configuration. */ +/** + * InterfaceIPConfigurationPropertiesFormat properties of IP configuration. + */ @Fluent public final class IpConfigurationProperties { /* @@ -34,13 +36,15 @@ public final class IpConfigurationProperties { @JsonProperty(value = "subnet") private IpConfigurationPropertiesSubnet subnet; - /** Creates an instance of IpConfigurationProperties class. */ + /** + * Creates an instance of IpConfigurationProperties class. + */ public IpConfigurationProperties() { } /** * Get the gateway property: Gateway for network interface. - * + * * @return the gateway value. */ public String gateway() { @@ -49,7 +53,7 @@ public String gateway() { /** * Get the prefixLength property: prefixLength for network interface. - * + * * @return the prefixLength value. */ public String prefixLength() { @@ -58,7 +62,7 @@ public String prefixLength() { /** * Get the privateIpAddress property: PrivateIPAddress - Private IP address of the IP configuration. - * + * * @return the privateIpAddress value. */ public String privateIpAddress() { @@ -67,7 +71,7 @@ public String privateIpAddress() { /** * Set the privateIpAddress property: PrivateIPAddress - Private IP address of the IP configuration. - * + * * @param privateIpAddress the privateIpAddress value to set. * @return the IpConfigurationProperties object itself. */ @@ -78,7 +82,7 @@ public IpConfigurationProperties withPrivateIpAddress(String privateIpAddress) { /** * Get the subnet property: Subnet - Name of Subnet bound to the IP configuration. - * + * * @return the subnet value. */ public IpConfigurationPropertiesSubnet subnet() { @@ -87,7 +91,7 @@ public IpConfigurationPropertiesSubnet subnet() { /** * Set the subnet property: Subnet - Name of Subnet bound to the IP configuration. - * + * * @param subnet the subnet value to set. * @return the IpConfigurationProperties object itself. */ @@ -98,7 +102,7 @@ public IpConfigurationProperties withSubnet(IpConfigurationPropertiesSubnet subn /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfigurationPropertiesSubnet.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfigurationPropertiesSubnet.java index 3fb374bdaaedf..8f40735261d74 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfigurationPropertiesSubnet.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpConfigurationPropertiesSubnet.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Subnet - Name of Subnet bound to the IP configuration. */ +/** + * Subnet - Name of Subnet bound to the IP configuration. + */ @Fluent public final class IpConfigurationPropertiesSubnet { /* @@ -16,14 +18,16 @@ public final class IpConfigurationPropertiesSubnet { @JsonProperty(value = "id") private String id; - /** Creates an instance of IpConfigurationPropertiesSubnet class. */ + /** + * Creates an instance of IpConfigurationPropertiesSubnet class. + */ public IpConfigurationPropertiesSubnet() { } /** * Get the id property: ID - The ARM resource id in the form of * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - * + * * @return the id value. */ public String id() { @@ -33,7 +37,7 @@ public String id() { /** * Set the id property: ID - The ARM resource id in the form of * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... - * + * * @param id the id value to set. * @return the IpConfigurationPropertiesSubnet object itself. */ @@ -44,7 +48,7 @@ public IpConfigurationPropertiesSubnet withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPool.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPool.java index 4e1a4e3ec84a2..8780545f74846 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPool.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPool.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The IpPool model. */ +/** + * The IpPool model. + */ @Fluent public final class IpPool { /* @@ -40,13 +42,15 @@ public final class IpPool { @JsonProperty(value = "info") private IpPoolInfo info; - /** Creates an instance of IpPool class. */ + /** + * Creates an instance of IpPool class. + */ public IpPool() { } /** * Get the name property: Name of the IP-Pool. - * + * * @return the name value. */ public String name() { @@ -55,7 +59,7 @@ public String name() { /** * Set the name property: Name of the IP-Pool. - * + * * @param name the name value to set. * @return the IpPool object itself. */ @@ -66,7 +70,7 @@ public IpPool withName(String name) { /** * Get the ipPoolType property: Type of the IP Pool [vm, vippool]. - * + * * @return the ipPoolType value. */ public IpPoolTypeEnum ipPoolType() { @@ -75,7 +79,7 @@ public IpPoolTypeEnum ipPoolType() { /** * Set the ipPoolType property: Type of the IP Pool [vm, vippool]. - * + * * @param ipPoolType the ipPoolType value to set. * @return the IpPool object itself. */ @@ -86,7 +90,7 @@ public IpPool withIpPoolType(IpPoolTypeEnum ipPoolType) { /** * Get the start property: Start of the IP address pool. - * + * * @return the start value. */ public String start() { @@ -95,7 +99,7 @@ public String start() { /** * Set the start property: Start of the IP address pool. - * + * * @param start the start value to set. * @return the IpPool object itself. */ @@ -106,7 +110,7 @@ public IpPool withStart(String start) { /** * Get the end property: End of the IP address pool. - * + * * @return the end value. */ public String end() { @@ -115,7 +119,7 @@ public String end() { /** * Set the end property: End of the IP address pool. - * + * * @param end the end value to set. * @return the IpPool object itself. */ @@ -126,7 +130,7 @@ public IpPool withEnd(String end) { /** * Get the info property: The info property. - * + * * @return the info value. */ public IpPoolInfo info() { @@ -135,7 +139,7 @@ public IpPoolInfo info() { /** * Set the info property: The info property. - * + * * @param info the info value to set. * @return the IpPool object itself. */ @@ -146,7 +150,7 @@ public IpPool withInfo(IpPoolInfo info) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPoolInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPoolInfo.java index 6d2dd2e314d7a..bf567793e37e6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPoolInfo.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPoolInfo.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The IpPoolInfo model. */ +/** + * The IpPoolInfo model. + */ @Immutable public final class IpPoolInfo { /* @@ -22,13 +24,15 @@ public final class IpPoolInfo { @JsonProperty(value = "available", access = JsonProperty.Access.WRITE_ONLY) private String available; - /** Creates an instance of IpPoolInfo class. */ + /** + * Creates an instance of IpPoolInfo class. + */ public IpPoolInfo() { } /** * Get the used property: Number of IP addresses allocated from the IP Pool. - * + * * @return the used value. */ public String used() { @@ -37,7 +41,7 @@ public String used() { /** * Get the available property: Number of IP addresses available in the IP Pool. - * + * * @return the available value. */ public String available() { @@ -46,7 +50,7 @@ public String available() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPoolTypeEnum.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPoolTypeEnum.java index b300c2bb91c0e..185847c59a99f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPoolTypeEnum.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPoolTypeEnum.java @@ -7,15 +7,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Type of the IP Pool [vm, vippool]. */ +/** + * Type of the IP Pool [vm, vippool]. + */ public enum IpPoolTypeEnum { - /** Enum value vm. */ + /** + * Enum value vm. + */ VM("vm"), - /** Enum value vippool. */ + /** + * Enum value vippool. + */ VIPPOOL("vippool"); - /** The actual serialized value for a IpPoolTypeEnum instance. */ + /** + * The actual serialized value for a IpPoolTypeEnum instance. + */ private final String value; IpPoolTypeEnum(String value) { @@ -24,7 +32,7 @@ public enum IpPoolTypeEnum { /** * Parses a serialized value to a IpPoolTypeEnum instance. - * + * * @param value the serialized value to parse. * @return the parsed IpPoolTypeEnum object, or null if unable to parse. */ @@ -42,7 +50,9 @@ public static IpPoolTypeEnum fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java new file mode 100644 index 0000000000000..7b3e481ad4b66 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IpPools.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The dnsServers of a device. + */ +@Fluent +public final class IpPools { + /* + * Starting IP address for the management network. A minimum of six free, contiguous IPv4 addresses (excluding your host IPs) are needed for infrastructure services such as clustering. + */ + @JsonProperty(value = "startingAddress") + private String startingAddress; + + /* + * Ending IP address for the management network. A minimum of six free, contiguous IPv4 addresses (excluding your host IPs) are needed for infrastructure services such as clustering. + */ + @JsonProperty(value = "endingAddress") + private String endingAddress; + + /** + * Creates an instance of IpPools class. + */ + public IpPools() { + } + + /** + * Get the startingAddress property: Starting IP address for the management network. A minimum of six free, + * contiguous IPv4 addresses (excluding your host IPs) are needed for infrastructure services such as clustering. + * + * @return the startingAddress value. + */ + public String startingAddress() { + return this.startingAddress; + } + + /** + * Set the startingAddress property: Starting IP address for the management network. A minimum of six free, + * contiguous IPv4 addresses (excluding your host IPs) are needed for infrastructure services such as clustering. + * + * @param startingAddress the startingAddress value to set. + * @return the IpPools object itself. + */ + public IpPools withStartingAddress(String startingAddress) { + this.startingAddress = startingAddress; + return this; + } + + /** + * Get the endingAddress property: Ending IP address for the management network. A minimum of six free, contiguous + * IPv4 addresses (excluding your host IPs) are needed for infrastructure services such as clustering. + * + * @return the endingAddress value. + */ + public String endingAddress() { + return this.endingAddress; + } + + /** + * Set the endingAddress property: Ending IP address for the management network. A minimum of six free, contiguous + * IPv4 addresses (excluding your host IPs) are needed for infrastructure services such as clustering. + * + * @param endingAddress the endingAddress value to set. + * @return the IpPools object itself. + */ + public IpPools withEndingAddress(String endingAddress) { + this.endingAddress = endingAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java new file mode 100644 index 0000000000000..e2e1f25ef81be --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/IsolatedVmAttestationConfiguration.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Attestation configurations for isolated VM (e.g. TVM, CVM) of the cluster. + */ +@Immutable +public final class IsolatedVmAttestationConfiguration { + /* + * Fully qualified Azure resource id of the Microsoft Azure attestation resource associated with this cluster. + */ + @JsonProperty(value = "attestationResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String attestationResourceId; + + /* + * Region specific endpoint for relying party service. + */ + @JsonProperty(value = "relyingPartyServiceEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String relyingPartyServiceEndpoint; + + /* + * Region specific endpoint for Microsoft Azure Attestation service for the cluster + */ + @JsonProperty(value = "attestationServiceEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String attestationServiceEndpoint; + + /** + * Creates an instance of IsolatedVmAttestationConfiguration class. + */ + public IsolatedVmAttestationConfiguration() { + } + + /** + * Get the attestationResourceId property: Fully qualified Azure resource id of the Microsoft Azure attestation + * resource associated with this cluster. + * + * @return the attestationResourceId value. + */ + public String attestationResourceId() { + return this.attestationResourceId; + } + + /** + * Get the relyingPartyServiceEndpoint property: Region specific endpoint for relying party service. + * + * @return the relyingPartyServiceEndpoint value. + */ + public String relyingPartyServiceEndpoint() { + return this.relyingPartyServiceEndpoint; + } + + /** + * Get the attestationServiceEndpoint property: Region specific endpoint for Microsoft Azure Attestation service for + * the cluster. + * + * @return the attestationServiceEndpoint value. + */ + public String attestationServiceEndpoint() { + return this.attestationServiceEndpoint; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkPropertiesDhcpOptions.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkPropertiesDhcpOptions.java index 0be52c83c9f92..9e44ca86789e3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkPropertiesDhcpOptions.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkPropertiesDhcpOptions.java @@ -20,13 +20,15 @@ public final class LogicalNetworkPropertiesDhcpOptions { @JsonProperty(value = "dnsServers") private List dnsServers; - /** Creates an instance of LogicalNetworkPropertiesDhcpOptions class. */ + /** + * Creates an instance of LogicalNetworkPropertiesDhcpOptions class. + */ public LogicalNetworkPropertiesDhcpOptions() { } /** * Get the dnsServers property: The list of DNS servers IP addresses. - * + * * @return the dnsServers value. */ public List dnsServers() { @@ -35,7 +37,7 @@ public List dnsServers() { /** * Set the dnsServers property: The list of DNS servers IP addresses. - * + * * @param dnsServers the dnsServers value to set. * @return the LogicalNetworkPropertiesDhcpOptions object itself. */ @@ -46,7 +48,7 @@ public LogicalNetworkPropertiesDhcpOptions withDnsServers(List dnsServer /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkStatus.java index 9ee0a55ce7b49..c1a2c7e00d05a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The observed state of logical networks. */ +/** + * The observed state of logical networks. + */ @Fluent public final class LogicalNetworkStatus { /* @@ -28,13 +30,15 @@ public final class LogicalNetworkStatus { @JsonProperty(value = "provisioningStatus") private LogicalNetworkStatusProvisioningStatus provisioningStatus; - /** Creates an instance of LogicalNetworkStatus class. */ + /** + * Creates an instance of LogicalNetworkStatus class. + */ public LogicalNetworkStatus() { } /** * Get the errorCode property: LogicalNetwork provisioning error code. - * + * * @return the errorCode value. */ public String errorCode() { @@ -43,7 +47,7 @@ public String errorCode() { /** * Set the errorCode property: LogicalNetwork provisioning error code. - * + * * @param errorCode the errorCode value to set. * @return the LogicalNetworkStatus object itself. */ @@ -54,7 +58,7 @@ public LogicalNetworkStatus withErrorCode(String errorCode) { /** * Get the errorMessage property: Descriptive error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -63,7 +67,7 @@ public String errorMessage() { /** * Set the errorMessage property: Descriptive error message. - * + * * @param errorMessage the errorMessage value to set. * @return the LogicalNetworkStatus object itself. */ @@ -74,7 +78,7 @@ public LogicalNetworkStatus withErrorMessage(String errorMessage) { /** * Get the provisioningStatus property: The provisioningStatus property. - * + * * @return the provisioningStatus value. */ public LogicalNetworkStatusProvisioningStatus provisioningStatus() { @@ -83,7 +87,7 @@ public LogicalNetworkStatusProvisioningStatus provisioningStatus() { /** * Set the provisioningStatus property: The provisioningStatus property. - * + * * @param provisioningStatus the provisioningStatus value to set. * @return the LogicalNetworkStatus object itself. */ @@ -94,7 +98,7 @@ public LogicalNetworkStatus withProvisioningStatus(LogicalNetworkStatusProvision /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkStatusProvisioningStatus.java index 6602733fd75b1..94cba2565ccc6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkStatusProvisioningStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworkStatusProvisioningStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The LogicalNetworkStatusProvisioningStatus model. */ +/** + * The LogicalNetworkStatusProvisioningStatus model. + */ @Fluent public final class LogicalNetworkStatusProvisioningStatus { /* @@ -22,13 +24,15 @@ public final class LogicalNetworkStatusProvisioningStatus { @JsonProperty(value = "status") private Status status; - /** Creates an instance of LogicalNetworkStatusProvisioningStatus class. */ + /** + * Creates an instance of LogicalNetworkStatusProvisioningStatus class. + */ public LogicalNetworkStatusProvisioningStatus() { } /** * Get the operationId property: The ID of the operation performed on the logical network. - * + * * @return the operationId value. */ public String operationId() { @@ -37,7 +41,7 @@ public String operationId() { /** * Set the operationId property: The ID of the operation performed on the logical network. - * + * * @param operationId the operationId value to set. * @return the LogicalNetworkStatusProvisioningStatus object itself. */ @@ -49,7 +53,7 @@ public LogicalNetworkStatusProvisioningStatus withOperationId(String operationId /** * Get the status property: The status of the operation performed on the logical network [Succeeded, Failed, * InProgress]. - * + * * @return the status value. */ public Status status() { @@ -59,7 +63,7 @@ public Status status() { /** * Set the status property: The status of the operation performed on the logical network [Succeeded, Failed, * InProgress]. - * + * * @param status the status value to set. * @return the LogicalNetworkStatusProvisioningStatus object itself. */ @@ -70,7 +74,7 @@ public LogicalNetworkStatusProvisioningStatus withStatus(Status status) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworks.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworks.java index 3d10d21f536bb..773d035379bfa 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworks.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworks.java @@ -11,53 +11,55 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of LogicalNetworks. */ +/** + * An immutable client-side representation of LogicalNetworks. + */ public interface LogicalNetworks { /** * 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 tags(); /** * Gets the extendedLocation property: The extendedLocation of 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(); @@ -65,86 +67,91 @@ public interface LogicalNetworks { /** * Gets the dhcpOptions property: DhcpOptions contains an array of DNS servers available to VMs deployed in the * logical network. Standard DHCP option for a subnet overrides logical network DHCP options. - * + * * @return the dhcpOptions value. */ LogicalNetworkPropertiesDhcpOptions dhcpOptions(); /** * Gets the subnets property: Subnet - list of subnets under the logical network. - * + * * @return the subnets value. */ List subnets(); /** * Gets the provisioningState property: Provisioning state of the logical network. - * + * * @return the provisioningState value. */ ProvisioningStateEnum provisioningState(); /** * Gets the vmSwitchName property: name of the network switch to be used for VMs. - * + * * @return the vmSwitchName value. */ String vmSwitchName(); /** * Gets the status property: The observed state of logical networks. - * + * * @return the status value. */ LogicalNetworkStatus status(); /** * 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.azurestackhci.fluent.models.LogicalNetworksInner object. - * + * * @return the inner object. */ LogicalNetworksInner innerModel(); - /** The entirety of the LogicalNetworks definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the LogicalNetworks definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The LogicalNetworks definition stages. */ + /** + * The LogicalNetworks definition stages. + */ interface DefinitionStages { - /** The first stage of the LogicalNetworks definition. */ + /** + * The first stage of the LogicalNetworks definition. + */ interface Blank extends WithLocation { } - /** The stage of the LogicalNetworks definition allowing to specify location. */ + /** + * The stage of the LogicalNetworks 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. */ @@ -152,18 +159,20 @@ interface WithLocation { /** * 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 LogicalNetworks definition allowing to specify parent resource. */ + /** + * The stage of the LogicalNetworks 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. */ @@ -174,80 +183,86 @@ interface WithResourceGroup { * The stage of the LogicalNetworks 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.WithExtendedLocation, - DefinitionStages.WithDhcpOptions, - DefinitionStages.WithSubnets, - DefinitionStages.WithVmSwitchName { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, + DefinitionStages.WithDhcpOptions, DefinitionStages.WithSubnets, DefinitionStages.WithVmSwitchName { /** * Executes the create request. - * + * * @return the created resource. */ LogicalNetworks create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ LogicalNetworks create(Context context); } - /** The stage of the LogicalNetworks definition allowing to specify tags. */ + /** + * The stage of the LogicalNetworks 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 tags); } - /** The stage of the LogicalNetworks definition allowing to specify extendedLocation. */ + /** + * The stage of the LogicalNetworks definition allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The extendedLocation of the resource.. - * + * * @param extendedLocation The extendedLocation of the resource. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the LogicalNetworks definition allowing to specify dhcpOptions. */ + /** + * The stage of the LogicalNetworks definition allowing to specify dhcpOptions. + */ interface WithDhcpOptions { /** * Specifies the dhcpOptions property: DhcpOptions contains an array of DNS servers available to VMs * deployed in the logical network. Standard DHCP option for a subnet overrides logical network DHCP * options.. - * + * * @param dhcpOptions DhcpOptions contains an array of DNS servers available to VMs deployed in the logical - * network. Standard DHCP option for a subnet overrides logical network DHCP options. + * network. Standard DHCP option for a subnet overrides logical network DHCP options. * @return the next definition stage. */ WithCreate withDhcpOptions(LogicalNetworkPropertiesDhcpOptions dhcpOptions); } - /** The stage of the LogicalNetworks definition allowing to specify subnets. */ + /** + * The stage of the LogicalNetworks definition allowing to specify subnets. + */ interface WithSubnets { /** * Specifies the subnets property: Subnet - list of subnets under the logical network. - * + * * @param subnets Subnet - list of subnets under the logical network. * @return the next definition stage. */ WithCreate withSubnets(List subnets); } - /** The stage of the LogicalNetworks definition allowing to specify vmSwitchName. */ + /** + * The stage of the LogicalNetworks definition allowing to specify vmSwitchName. + */ interface WithVmSwitchName { /** * Specifies the vmSwitchName property: name of the network switch to be used for VMs. - * + * * @param vmSwitchName name of the network switch to be used for VMs. * @return the next definition stage. */ @@ -257,36 +272,42 @@ interface WithVmSwitchName { /** * Begins update for the LogicalNetworks resource. - * + * * @return the stage of resource update. */ LogicalNetworks.Update update(); - /** The template for LogicalNetworks update. */ + /** + * The template for LogicalNetworks update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ LogicalNetworks apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ LogicalNetworks apply(Context context); } - /** The LogicalNetworks update stages. */ + /** + * The LogicalNetworks update stages. + */ interface UpdateStages { - /** The stage of the LogicalNetworks update allowing to specify tags. */ + /** + * The stage of the LogicalNetworks update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -296,14 +317,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ LogicalNetworks refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksListResult.java index a46053639de59..6302d6a18778e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The LogicalNetworksListResult model. */ +/** + * The LogicalNetworksListResult model. + */ @Fluent public final class LogicalNetworksListResult { /* @@ -24,13 +26,15 @@ public final class LogicalNetworksListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of LogicalNetworksListResult class. */ + /** + * Creates an instance of LogicalNetworksListResult class. + */ public LogicalNetworksListResult() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the LogicalNetworksListResult object itself. */ @@ -50,7 +54,7 @@ public LogicalNetworksListResult withValue(List value) { /** * Get the nextLink property: The nextLink property. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: The nextLink property. - * + * * @param nextLink the nextLink value to set. * @return the LogicalNetworksListResult object itself. */ @@ -70,7 +74,7 @@ public LogicalNetworksListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksOperations.java index 54553a80db4b1..b68adcd17ec34 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksOperations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksOperations.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of LogicalNetworksOperations. */ +/** + * Resource collection API of LogicalNetworksOperations. + */ public interface LogicalNetworksOperations { /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -21,12 +23,12 @@ public interface LogicalNetworksOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the logical network resource definition along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String logicalNetworkName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String logicalNetworkName, + Context context); /** * The getByResourceGroup operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +51,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a logical network. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param logicalNetworkName Name of the logical network. * @param context The context to associate with this operation. @@ -62,7 +64,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,7 +76,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the logical networks in the specified resource group. Use the nextLink property in the response to * get the next page of logical networks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +89,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @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 paginated response with {@link PagedIterable}. @@ -97,7 +99,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the logical networks in the specified subscription. Use the nextLink property in the response to get * the next page of logical networks. - * + * * @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. @@ -108,7 +110,7 @@ Response getByResourceGroupWithResponse( /** * The getByResourceGroup operation. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,7 +121,7 @@ Response getByResourceGroupWithResponse( /** * The getByResourceGroup operation. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +133,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a logical network. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,7 +143,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a logical network. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +154,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new LogicalNetworks resource. - * + * * @param name resource name. * @return the first stage of the new LogicalNetworks definition. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksUpdateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksUpdateRequest.java index be53f339f277f..25e6b75880713 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksUpdateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/LogicalNetworksUpdateRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The logical network resource patch definition. */ +/** + * The logical network resource patch definition. + */ @Fluent public final class LogicalNetworksUpdateRequest { /* @@ -19,13 +21,15 @@ public final class LogicalNetworksUpdateRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of LogicalNetworksUpdateRequest class. */ + /** + * Creates an instance of LogicalNetworksUpdateRequest class. + */ public LogicalNetworksUpdateRequest() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the LogicalNetworksUpdateRequest object itself. */ @@ -45,7 +49,7 @@ public LogicalNetworksUpdateRequest withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java new file mode 100644 index 0000000000000..b540f281bc451 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ManagedServiceIdentityType.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ +public final class ManagedServiceIdentityType extends ExpandableStringEnum { + /** + * Static value None for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType NONE = fromString("None"); + + /** + * Static value SystemAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * Static value UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Static value SystemAssigned, UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + = fromString("SystemAssigned, UserAssigned"); + + /** + * Creates a new instance of ManagedServiceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedServiceIdentityType() { + } + + /** + * Creates or finds a ManagedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedServiceIdentityType. + */ + @JsonCreator + public static ManagedServiceIdentityType fromString(String name) { + return fromString(name, ManagedServiceIdentityType.class); + } + + /** + * Gets known ManagedServiceIdentityType values. + * + * @return known ManagedServiceIdentityType values. + */ + public static Collection values() { + return values(ManagedServiceIdentityType.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatus.java index cc7bf491fedda..417297fb4406a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The observed state of marketplace gallery images. */ +/** + * The observed state of marketplace gallery images. + */ @Fluent public final class MarketplaceGalleryImageStatus { /* @@ -40,13 +42,15 @@ public final class MarketplaceGalleryImageStatus { @JsonProperty(value = "progressPercentage") private Long progressPercentage; - /** Creates an instance of MarketplaceGalleryImageStatus class. */ + /** + * Creates an instance of MarketplaceGalleryImageStatus class. + */ public MarketplaceGalleryImageStatus() { } /** * Get the errorCode property: MarketplaceGalleryImage provisioning error code. - * + * * @return the errorCode value. */ public String errorCode() { @@ -55,7 +59,7 @@ public String errorCode() { /** * Set the errorCode property: MarketplaceGalleryImage provisioning error code. - * + * * @param errorCode the errorCode value to set. * @return the MarketplaceGalleryImageStatus object itself. */ @@ -66,7 +70,7 @@ public MarketplaceGalleryImageStatus withErrorCode(String errorCode) { /** * Get the errorMessage property: Descriptive error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -75,7 +79,7 @@ public String errorMessage() { /** * Set the errorMessage property: Descriptive error message. - * + * * @param errorMessage the errorMessage value to set. * @return the MarketplaceGalleryImageStatus object itself. */ @@ -86,7 +90,7 @@ public MarketplaceGalleryImageStatus withErrorMessage(String errorMessage) { /** * Get the provisioningStatus property: The provisioningStatus property. - * + * * @return the provisioningStatus value. */ public MarketplaceGalleryImageStatusProvisioningStatus provisioningStatus() { @@ -95,19 +99,19 @@ public MarketplaceGalleryImageStatusProvisioningStatus provisioningStatus() { /** * Set the provisioningStatus property: The provisioningStatus property. - * + * * @param provisioningStatus the provisioningStatus value to set. * @return the MarketplaceGalleryImageStatus object itself. */ - public MarketplaceGalleryImageStatus withProvisioningStatus( - MarketplaceGalleryImageStatusProvisioningStatus provisioningStatus) { + public MarketplaceGalleryImageStatus + withProvisioningStatus(MarketplaceGalleryImageStatusProvisioningStatus provisioningStatus) { this.provisioningStatus = provisioningStatus; return this; } /** * Get the downloadStatus property: The download status of the gallery image. - * + * * @return the downloadStatus value. */ public MarketplaceGalleryImageStatusDownloadStatus downloadStatus() { @@ -116,19 +120,19 @@ public MarketplaceGalleryImageStatusDownloadStatus downloadStatus() { /** * Set the downloadStatus property: The download status of the gallery image. - * + * * @param downloadStatus the downloadStatus value to set. * @return the MarketplaceGalleryImageStatus object itself. */ - public MarketplaceGalleryImageStatus withDownloadStatus( - MarketplaceGalleryImageStatusDownloadStatus downloadStatus) { + public MarketplaceGalleryImageStatus + withDownloadStatus(MarketplaceGalleryImageStatusDownloadStatus downloadStatus) { this.downloadStatus = downloadStatus; return this; } /** * Get the progressPercentage property: The progress of the operation in percentage. - * + * * @return the progressPercentage value. */ public Long progressPercentage() { @@ -137,7 +141,7 @@ public Long progressPercentage() { /** * Set the progressPercentage property: The progress of the operation in percentage. - * + * * @param progressPercentage the progressPercentage value to set. * @return the MarketplaceGalleryImageStatus object itself. */ @@ -148,7 +152,7 @@ public MarketplaceGalleryImageStatus withProgressPercentage(Long progressPercent /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatusDownloadStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatusDownloadStatus.java index 8c3c82f2506e8..4da1f6c81d8f6 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatusDownloadStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatusDownloadStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The download status of the gallery image. */ +/** + * The download status of the gallery image. + */ @Fluent public final class MarketplaceGalleryImageStatusDownloadStatus { /* @@ -16,13 +18,15 @@ public final class MarketplaceGalleryImageStatusDownloadStatus { @JsonProperty(value = "downloadSizeInMB") private Long downloadSizeInMB; - /** Creates an instance of MarketplaceGalleryImageStatusDownloadStatus class. */ + /** + * Creates an instance of MarketplaceGalleryImageStatusDownloadStatus class. + */ public MarketplaceGalleryImageStatusDownloadStatus() { } /** * Get the downloadSizeInMB property: The downloaded sized of the image in MB. - * + * * @return the downloadSizeInMB value. */ public Long downloadSizeInMB() { @@ -31,7 +35,7 @@ public Long downloadSizeInMB() { /** * Set the downloadSizeInMB property: The downloaded sized of the image in MB. - * + * * @param downloadSizeInMB the downloadSizeInMB value to set. * @return the MarketplaceGalleryImageStatusDownloadStatus object itself. */ @@ -42,7 +46,7 @@ public MarketplaceGalleryImageStatusDownloadStatus withDownloadSizeInMB(Long dow /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatusProvisioningStatus.java index 0fdf25ef0dfb7..e13cce52ca878 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatusProvisioningStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImageStatusProvisioningStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The MarketplaceGalleryImageStatusProvisioningStatus model. */ +/** + * The MarketplaceGalleryImageStatusProvisioningStatus model. + */ @Fluent public final class MarketplaceGalleryImageStatusProvisioningStatus { /* @@ -22,13 +24,15 @@ public final class MarketplaceGalleryImageStatusProvisioningStatus { @JsonProperty(value = "status") private Status status; - /** Creates an instance of MarketplaceGalleryImageStatusProvisioningStatus class. */ + /** + * Creates an instance of MarketplaceGalleryImageStatusProvisioningStatus class. + */ public MarketplaceGalleryImageStatusProvisioningStatus() { } /** * Get the operationId property: The ID of the operation performed on the gallery image. - * + * * @return the operationId value. */ public String operationId() { @@ -37,7 +41,7 @@ public String operationId() { /** * Set the operationId property: The ID of the operation performed on the gallery image. - * + * * @param operationId the operationId value to set. * @return the MarketplaceGalleryImageStatusProvisioningStatus object itself. */ @@ -49,7 +53,7 @@ public MarketplaceGalleryImageStatusProvisioningStatus withOperationId(String op /** * Get the status property: The status of the operation performed on the gallery image [Succeeded, Failed, * InProgress]. - * + * * @return the status value. */ public Status status() { @@ -59,7 +63,7 @@ public Status status() { /** * Set the status property: The status of the operation performed on the gallery image [Succeeded, Failed, * InProgress]. - * + * * @param status the status value to set. * @return the MarketplaceGalleryImageStatusProvisioningStatus object itself. */ @@ -70,7 +74,7 @@ public MarketplaceGalleryImageStatusProvisioningStatus withStatus(Status status) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImages.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImages.java index fe0fa8796d075..c1f672be6b07c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImages.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImages.java @@ -10,53 +10,55 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.MarketplaceGalleryImagesInner; import java.util.Map; -/** An immutable client-side representation of MarketplaceGalleryImages. */ +/** + * An immutable client-side representation of MarketplaceGalleryImages. + */ public interface MarketplaceGalleryImages { /** * 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 tags(); /** * Gets the extendedLocation property: The extendedLocation of 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(); @@ -64,14 +66,14 @@ public interface MarketplaceGalleryImages { /** * Gets the containerId property: Storage ContainerID of the storage container to be used for marketplace gallery * image. - * + * * @return the containerId value. */ String containerId(); /** * Gets the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @return the osType value. */ OperatingSystemTypes osType(); @@ -79,21 +81,21 @@ public interface MarketplaceGalleryImages { /** * Gets the cloudInitDataSource property: Datasource for the gallery image when provisioning with cloud-init * [NoCloud, Azure]. - * + * * @return the cloudInitDataSource value. */ CloudInitDataSource cloudInitDataSource(); /** * Gets the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ HyperVGeneration hyperVGeneration(); /** * Gets the identifier property: This is the gallery image definition identifier. - * + * * @return the identifier value. */ GalleryImageIdentifier identifier(); @@ -101,72 +103,77 @@ public interface MarketplaceGalleryImages { /** * Gets the version property: Specifies information about the gallery image version that you want to create or * update. - * + * * @return the version value. */ GalleryImageVersion version(); /** * Gets the provisioningState property: Provisioning state of the marketplace gallery image. - * + * * @return the provisioningState value. */ ProvisioningStateEnum provisioningState(); /** * Gets the status property: The observed state of marketplace gallery images. - * + * * @return the status value. */ MarketplaceGalleryImageStatus status(); /** * 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.azurestackhci.fluent.models.MarketplaceGalleryImagesInner object. - * + * * @return the inner object. */ MarketplaceGalleryImagesInner innerModel(); - /** The entirety of the MarketplaceGalleryImages definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the MarketplaceGalleryImages definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The MarketplaceGalleryImages definition stages. */ + /** + * The MarketplaceGalleryImages definition stages. + */ interface DefinitionStages { - /** The first stage of the MarketplaceGalleryImages definition. */ + /** + * The first stage of the MarketplaceGalleryImages definition. + */ interface Blank extends WithLocation { } - /** The stage of the MarketplaceGalleryImages definition allowing to specify location. */ + /** + * The stage of the MarketplaceGalleryImages 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. */ @@ -174,18 +181,20 @@ interface WithLocation { /** * 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 MarketplaceGalleryImages definition allowing to specify parent resource. */ + /** + * The stage of the MarketplaceGalleryImages 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. */ @@ -196,117 +205,127 @@ interface WithResourceGroup { * The stage of the MarketplaceGalleryImages 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.WithExtendedLocation, - DefinitionStages.WithContainerId, - DefinitionStages.WithOsType, - DefinitionStages.WithCloudInitDataSource, - DefinitionStages.WithHyperVGeneration, - DefinitionStages.WithIdentifier, - DefinitionStages.WithVersion { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, + DefinitionStages.WithContainerId, DefinitionStages.WithOsType, DefinitionStages.WithCloudInitDataSource, + DefinitionStages.WithHyperVGeneration, DefinitionStages.WithIdentifier, DefinitionStages.WithVersion { /** * Executes the create request. - * + * * @return the created resource. */ MarketplaceGalleryImages create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ MarketplaceGalleryImages create(Context context); } - /** The stage of the MarketplaceGalleryImages definition allowing to specify tags. */ + /** + * The stage of the MarketplaceGalleryImages 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 tags); } - /** The stage of the MarketplaceGalleryImages definition allowing to specify extendedLocation. */ + /** + * The stage of the MarketplaceGalleryImages definition allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The extendedLocation of the resource.. - * + * * @param extendedLocation The extendedLocation of the resource. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the MarketplaceGalleryImages definition allowing to specify containerId. */ + /** + * The stage of the MarketplaceGalleryImages definition allowing to specify containerId. + */ interface WithContainerId { /** * Specifies the containerId property: Storage ContainerID of the storage container to be used for * marketplace gallery image. - * + * * @param containerId Storage ContainerID of the storage container to be used for marketplace gallery image. * @return the next definition stage. */ WithCreate withContainerId(String containerId); } - /** The stage of the MarketplaceGalleryImages definition allowing to specify osType. */ + /** + * The stage of the MarketplaceGalleryImages definition allowing to specify osType. + */ interface WithOsType { /** * Specifies the osType property: Operating system type that the gallery image uses [Windows, Linux]. - * + * * @param osType Operating system type that the gallery image uses [Windows, Linux]. * @return the next definition stage. */ WithCreate withOsType(OperatingSystemTypes osType); } - /** The stage of the MarketplaceGalleryImages definition allowing to specify cloudInitDataSource. */ + /** + * The stage of the MarketplaceGalleryImages definition allowing to specify cloudInitDataSource. + */ interface WithCloudInitDataSource { /** * Specifies the cloudInitDataSource property: Datasource for the gallery image when provisioning with * cloud-init [NoCloud, Azure]. - * + * * @param cloudInitDataSource Datasource for the gallery image when provisioning with cloud-init [NoCloud, - * Azure]. + * Azure]. * @return the next definition stage. */ WithCreate withCloudInitDataSource(CloudInitDataSource cloudInitDataSource); } - /** The stage of the MarketplaceGalleryImages definition allowing to specify hyperVGeneration. */ + /** + * The stage of the MarketplaceGalleryImages definition allowing to specify hyperVGeneration. + */ interface WithHyperVGeneration { /** * Specifies the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration The hypervisor generation of the Virtual Machine [V1, V2]. * @return the next definition stage. */ WithCreate withHyperVGeneration(HyperVGeneration hyperVGeneration); } - /** The stage of the MarketplaceGalleryImages definition allowing to specify identifier. */ + /** + * The stage of the MarketplaceGalleryImages definition allowing to specify identifier. + */ interface WithIdentifier { /** * Specifies the identifier property: This is the gallery image definition identifier.. - * + * * @param identifier This is the gallery image definition identifier. * @return the next definition stage. */ WithCreate withIdentifier(GalleryImageIdentifier identifier); } - /** The stage of the MarketplaceGalleryImages definition allowing to specify version. */ + /** + * The stage of the MarketplaceGalleryImages definition allowing to specify version. + */ interface WithVersion { /** * Specifies the version property: Specifies information about the gallery image version that you want to * create or update.. - * + * * @param version Specifies information about the gallery image version that you want to create or update. * @return the next definition stage. */ @@ -316,36 +335,42 @@ interface WithVersion { /** * Begins update for the MarketplaceGalleryImages resource. - * + * * @return the stage of resource update. */ MarketplaceGalleryImages.Update update(); - /** The template for MarketplaceGalleryImages update. */ + /** + * The template for MarketplaceGalleryImages update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ MarketplaceGalleryImages apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ MarketplaceGalleryImages apply(Context context); } - /** The MarketplaceGalleryImages update stages. */ + /** + * The MarketplaceGalleryImages update stages. + */ interface UpdateStages { - /** The stage of the MarketplaceGalleryImages update allowing to specify tags. */ + /** + * The stage of the MarketplaceGalleryImages update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -355,14 +380,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ MarketplaceGalleryImages refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImagesListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImagesListResult.java index 4d83afc25681b..9c698629651cd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImagesListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImagesListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The MarketplaceGalleryImagesListResult model. */ +/** + * The MarketplaceGalleryImagesListResult model. + */ @Fluent public final class MarketplaceGalleryImagesListResult { /* @@ -24,13 +26,15 @@ public final class MarketplaceGalleryImagesListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of MarketplaceGalleryImagesListResult class. */ + /** + * Creates an instance of MarketplaceGalleryImagesListResult class. + */ public MarketplaceGalleryImagesListResult() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the MarketplaceGalleryImagesListResult object itself. */ @@ -50,7 +54,7 @@ public MarketplaceGalleryImagesListResult withValue(List getByResourceGroupWithResponse( - String resourceGroupName, String marketplaceGalleryImageName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String marketplaceGalleryImageName, Context context); /** * Gets a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +51,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a marketplace gallery image. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param marketplaceGalleryImageName Name of the marketplace gallery image. * @param context The context to associate with this operation. @@ -62,7 +64,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,7 +76,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the marketplace gallery images in the specified resource group. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +89,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @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 paginated response with {@link PagedIterable}. @@ -97,7 +99,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the marketplace gallery images in the specified subscription. Use the nextLink property in the * response to get the next page of marketplace gallery images. - * + * * @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. @@ -108,7 +110,7 @@ Response getByResourceGroupWithResponse( /** * Gets a marketplace gallery image. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,7 +121,7 @@ Response getByResourceGroupWithResponse( /** * Gets a marketplace gallery image. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +133,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a marketplace gallery image. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,7 +143,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a marketplace gallery image. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +154,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new MarketplaceGalleryImages resource. - * + * * @param name resource name. * @return the first stage of the new MarketplaceGalleryImages definition. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImagesUpdateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImagesUpdateRequest.java index f519104410bb4..37a19a6ed1a2f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImagesUpdateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/MarketplaceGalleryImagesUpdateRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The marketplace gallery image resource patch definition. */ +/** + * The marketplace gallery image resource patch definition. + */ @Fluent public final class MarketplaceGalleryImagesUpdateRequest { /* @@ -19,13 +21,15 @@ public final class MarketplaceGalleryImagesUpdateRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of MarketplaceGalleryImagesUpdateRequest class. */ + /** + * Creates an instance of MarketplaceGalleryImagesUpdateRequest class. + */ public MarketplaceGalleryImagesUpdateRequest() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the MarketplaceGalleryImagesUpdateRequest object itself. */ @@ -45,7 +49,7 @@ public MarketplaceGalleryImagesUpdateRequest withTags(Map tags) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceStatus.java index b4c2e0201454b..2fbd319188b7b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The observed state of network interfaces. */ +/** + * The observed state of network interfaces. + */ @Fluent public final class NetworkInterfaceStatus { /* @@ -28,13 +30,15 @@ public final class NetworkInterfaceStatus { @JsonProperty(value = "provisioningStatus") private NetworkInterfaceStatusProvisioningStatus provisioningStatus; - /** Creates an instance of NetworkInterfaceStatus class. */ + /** + * Creates an instance of NetworkInterfaceStatus class. + */ public NetworkInterfaceStatus() { } /** * Get the errorCode property: NetworkInterface provisioning error code. - * + * * @return the errorCode value. */ public String errorCode() { @@ -43,7 +47,7 @@ public String errorCode() { /** * Set the errorCode property: NetworkInterface provisioning error code. - * + * * @param errorCode the errorCode value to set. * @return the NetworkInterfaceStatus object itself. */ @@ -54,7 +58,7 @@ public NetworkInterfaceStatus withErrorCode(String errorCode) { /** * Get the errorMessage property: Descriptive error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -63,7 +67,7 @@ public String errorMessage() { /** * Set the errorMessage property: Descriptive error message. - * + * * @param errorMessage the errorMessage value to set. * @return the NetworkInterfaceStatus object itself. */ @@ -74,7 +78,7 @@ public NetworkInterfaceStatus withErrorMessage(String errorMessage) { /** * Get the provisioningStatus property: The provisioningStatus property. - * + * * @return the provisioningStatus value. */ public NetworkInterfaceStatusProvisioningStatus provisioningStatus() { @@ -83,7 +87,7 @@ public NetworkInterfaceStatusProvisioningStatus provisioningStatus() { /** * Set the provisioningStatus property: The provisioningStatus property. - * + * * @param provisioningStatus the provisioningStatus value to set. * @return the NetworkInterfaceStatus object itself. */ @@ -94,7 +98,7 @@ public NetworkInterfaceStatus withProvisioningStatus(NetworkInterfaceStatusProvi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceStatusProvisioningStatus.java index 648f20e05edad..9001cddf6476e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceStatusProvisioningStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaceStatusProvisioningStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The NetworkInterfaceStatusProvisioningStatus model. */ +/** + * The NetworkInterfaceStatusProvisioningStatus model. + */ @Fluent public final class NetworkInterfaceStatusProvisioningStatus { /* @@ -22,13 +24,15 @@ public final class NetworkInterfaceStatusProvisioningStatus { @JsonProperty(value = "status") private Status status; - /** Creates an instance of NetworkInterfaceStatusProvisioningStatus class. */ + /** + * Creates an instance of NetworkInterfaceStatusProvisioningStatus class. + */ public NetworkInterfaceStatusProvisioningStatus() { } /** * Get the operationId property: The ID of the operation performed on the network interface. - * + * * @return the operationId value. */ public String operationId() { @@ -37,7 +41,7 @@ public String operationId() { /** * Set the operationId property: The ID of the operation performed on the network interface. - * + * * @param operationId the operationId value to set. * @return the NetworkInterfaceStatusProvisioningStatus object itself. */ @@ -49,7 +53,7 @@ public NetworkInterfaceStatusProvisioningStatus withOperationId(String operation /** * Get the status property: The status of the operation performed on the network interface [Succeeded, Failed, * InProgress]. - * + * * @return the status value. */ public Status status() { @@ -59,7 +63,7 @@ public Status status() { /** * Set the status property: The status of the operation performed on the network interface [Succeeded, Failed, * InProgress]. - * + * * @param status the status value to set. * @return the NetworkInterfaceStatusProvisioningStatus object itself. */ @@ -70,7 +74,7 @@ public NetworkInterfaceStatusProvisioningStatus withStatus(Status status) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaces.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaces.java index 1e464fcbcdab2..8360ace87e840 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaces.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfaces.java @@ -11,139 +11,146 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of NetworkInterfaces. */ +/** + * An immutable client-side representation of NetworkInterfaces. + */ public interface NetworkInterfaces { /** * 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 tags(); /** * Gets the extendedLocation property: The extendedLocation of 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 ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network interface. - * + * * @return the ipConfigurations value. */ List ipConfigurations(); /** * Gets the macAddress property: MacAddress - The MAC address of the network interface. - * + * * @return the macAddress value. */ String macAddress(); /** * Gets the dnsSettings property: DNS Settings for the interface. - * + * * @return the dnsSettings value. */ InterfaceDnsSettings dnsSettings(); /** * Gets the provisioningState property: Provisioning state of the network interface. - * + * * @return the provisioningState value. */ ProvisioningStateEnum provisioningState(); /** * Gets the status property: The observed state of network interfaces. - * + * * @return the status value. */ NetworkInterfaceStatus status(); /** * 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.azurestackhci.fluent.models.NetworkInterfacesInner object. - * + * * @return the inner object. */ NetworkInterfacesInner innerModel(); - /** The entirety of the NetworkInterfaces definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the NetworkInterfaces definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The NetworkInterfaces definition stages. */ + /** + * The NetworkInterfaces definition stages. + */ interface DefinitionStages { - /** The first stage of the NetworkInterfaces definition. */ + /** + * The first stage of the NetworkInterfaces definition. + */ interface Blank extends WithLocation { } - /** The stage of the NetworkInterfaces definition allowing to specify location. */ + /** + * The stage of the NetworkInterfaces 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. */ @@ -151,18 +158,20 @@ interface WithLocation { /** * 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 NetworkInterfaces definition allowing to specify parent resource. */ + /** + * The stage of the NetworkInterfaces 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. */ @@ -173,78 +182,84 @@ interface WithResourceGroup { * The stage of the NetworkInterfaces 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.WithExtendedLocation, - DefinitionStages.WithIpConfigurations, - DefinitionStages.WithMacAddress, - DefinitionStages.WithDnsSettings { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, + DefinitionStages.WithIpConfigurations, DefinitionStages.WithMacAddress, DefinitionStages.WithDnsSettings { /** * Executes the create request. - * + * * @return the created resource. */ NetworkInterfaces create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ NetworkInterfaces create(Context context); } - /** The stage of the NetworkInterfaces definition allowing to specify tags. */ + /** + * The stage of the NetworkInterfaces 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 tags); } - /** The stage of the NetworkInterfaces definition allowing to specify extendedLocation. */ + /** + * The stage of the NetworkInterfaces definition allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The extendedLocation of the resource.. - * + * * @param extendedLocation The extendedLocation of the resource. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the NetworkInterfaces definition allowing to specify ipConfigurations. */ + /** + * The stage of the NetworkInterfaces definition allowing to specify ipConfigurations. + */ interface WithIpConfigurations { /** * Specifies the ipConfigurations property: IPConfigurations - A list of IPConfigurations of the network * interface.. - * + * * @param ipConfigurations IPConfigurations - A list of IPConfigurations of the network interface. * @return the next definition stage. */ WithCreate withIpConfigurations(List ipConfigurations); } - /** The stage of the NetworkInterfaces definition allowing to specify macAddress. */ + /** + * The stage of the NetworkInterfaces definition allowing to specify macAddress. + */ interface WithMacAddress { /** * Specifies the macAddress property: MacAddress - The MAC address of the network interface.. - * + * * @param macAddress MacAddress - The MAC address of the network interface. * @return the next definition stage. */ WithCreate withMacAddress(String macAddress); } - /** The stage of the NetworkInterfaces definition allowing to specify dnsSettings. */ + /** + * The stage of the NetworkInterfaces definition allowing to specify dnsSettings. + */ interface WithDnsSettings { /** * Specifies the dnsSettings property: DNS Settings for the interface. - * + * * @param dnsSettings DNS Settings for the interface. * @return the next definition stage. */ @@ -254,36 +269,42 @@ interface WithDnsSettings { /** * Begins update for the NetworkInterfaces resource. - * + * * @return the stage of resource update. */ NetworkInterfaces.Update update(); - /** The template for NetworkInterfaces update. */ + /** + * The template for NetworkInterfaces update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ NetworkInterfaces apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ NetworkInterfaces apply(Context context); } - /** The NetworkInterfaces update stages. */ + /** + * The NetworkInterfaces update stages. + */ interface UpdateStages { - /** The stage of the NetworkInterfaces update allowing to specify tags. */ + /** + * The stage of the NetworkInterfaces update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -293,14 +314,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ NetworkInterfaces refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesListResult.java index 4493cdeae4d09..40a47f7a4b363 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The NetworkInterfacesListResult model. */ +/** + * The NetworkInterfacesListResult model. + */ @Fluent public final class NetworkInterfacesListResult { /* @@ -24,13 +26,15 @@ public final class NetworkInterfacesListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of NetworkInterfacesListResult class. */ + /** + * Creates an instance of NetworkInterfacesListResult class. + */ public NetworkInterfacesListResult() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the NetworkInterfacesListResult object itself. */ @@ -50,7 +54,7 @@ public NetworkInterfacesListResult withValue(List value) /** * Get the nextLink property: The nextLink property. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: The nextLink property. - * + * * @param nextLink the nextLink value to set. * @return the NetworkInterfacesListResult object itself. */ @@ -70,7 +74,7 @@ public NetworkInterfacesListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesOperations.java index 930366df5ebea..5212ffdb9282f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesOperations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesOperations.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of NetworkInterfacesOperations. */ +/** + * Resource collection API of NetworkInterfacesOperations. + */ public interface NetworkInterfacesOperations { /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -21,12 +23,12 @@ public interface NetworkInterfacesOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a network interface along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String networkInterfaceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String networkInterfaceName, + Context context); /** * Gets a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +51,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a network interface. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param networkInterfaceName Name of the network interface. * @param context The context to associate with this operation. @@ -62,7 +64,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,7 +76,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the network interfaces in the specified resource group. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +89,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @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 paginated response with {@link PagedIterable}. @@ -97,7 +99,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the network interfaces in the specified subscription. Use the nextLink property in the response to * get the next page of network interfaces. - * + * * @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. @@ -108,7 +110,7 @@ Response getByResourceGroupWithResponse( /** * Gets a network interface. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,7 +121,7 @@ Response getByResourceGroupWithResponse( /** * Gets a network interface. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +133,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a network interface. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,7 +143,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a network interface. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +154,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new NetworkInterfaces resource. - * + * * @param name resource name. * @return the first stage of the new NetworkInterfaces definition. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesUpdateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesUpdateRequest.java index b5370c24c46db..2bfe57fdb9a96 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesUpdateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkInterfacesUpdateRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The network interface resource patch definition. */ +/** + * The network interface resource patch definition. + */ @Fluent public final class NetworkInterfacesUpdateRequest { /* @@ -19,13 +21,15 @@ public final class NetworkInterfacesUpdateRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of NetworkInterfacesUpdateRequest class. */ + /** + * Creates an instance of NetworkInterfacesUpdateRequest class. + */ public NetworkInterfacesUpdateRequest() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the NetworkInterfacesUpdateRequest object itself. */ @@ -45,7 +49,7 @@ public NetworkInterfacesUpdateRequest withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkProfileUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkProfileUpdate.java index 888e4bd5cdc49..915a13df9a02a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkProfileUpdate.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkProfileUpdate.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NetworkProfile - describes the network update configuration the virtual machine instance. */ +/** + * NetworkProfile - describes the network update configuration the virtual machine instance. + */ @Fluent public final class NetworkProfileUpdate { /* @@ -17,14 +19,16 @@ public final class NetworkProfileUpdate { @JsonProperty(value = "networkInterfaces") private List networkInterfaces; - /** Creates an instance of NetworkProfileUpdate class. */ + /** + * Creates an instance of NetworkProfileUpdate class. + */ public NetworkProfileUpdate() { } /** * Get the networkInterfaces property: NetworkInterfaces - list of network interfaces to be attached to the virtual * machine instance. - * + * * @return the networkInterfaces value. */ public List networkInterfaces() { @@ -34,19 +38,19 @@ public List networkInterfaces() { /** * Set the networkInterfaces property: NetworkInterfaces - list of network interfaces to be attached to the virtual * machine instance. - * + * * @param networkInterfaces the networkInterfaces value to set. * @return the NetworkProfileUpdate object itself. */ - public NetworkProfileUpdate withNetworkInterfaces( - List networkInterfaces) { + public NetworkProfileUpdate + withNetworkInterfaces(List networkInterfaces) { this.networkInterfaces = networkInterfaces; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkProfileUpdateNetworkInterfacesItem.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkProfileUpdateNetworkInterfacesItem.java index 7114a92fa8b6f..36a1de991188b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkProfileUpdateNetworkInterfacesItem.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NetworkProfileUpdateNetworkInterfacesItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The NetworkProfileUpdateNetworkInterfacesItem model. */ +/** + * The NetworkProfileUpdateNetworkInterfacesItem model. + */ @Fluent public final class NetworkProfileUpdateNetworkInterfacesItem { /* @@ -16,13 +18,15 @@ public final class NetworkProfileUpdateNetworkInterfacesItem { @JsonProperty(value = "id") private String id; - /** Creates an instance of NetworkProfileUpdateNetworkInterfacesItem class. */ + /** + * Creates an instance of NetworkProfileUpdateNetworkInterfacesItem class. + */ public NetworkProfileUpdateNetworkInterfacesItem() { } /** * Get the id property: ID - Resource ID of the network interface. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: ID - Resource ID of the network interface. - * + * * @param id the id value to set. * @return the NetworkProfileUpdateNetworkInterfacesItem object itself. */ @@ -42,7 +46,7 @@ public NetworkProfileUpdateNetworkInterfacesItem withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java new file mode 100644 index 0000000000000..8e4dbf51cb554 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NicDetail.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The NIC Detail of a device. + */ +@Fluent +public final class NicDetail { + /* + * Adapter Name of NIC + */ + @JsonProperty(value = "adapterName", required = true) + private String adapterName; + + /* + * Interface Description of NIC + */ + @JsonProperty(value = "interfaceDescription") + private String interfaceDescription; + + /* + * Component Id of NIC + */ + @JsonProperty(value = "componentId") + private String componentId; + + /* + * Driver Version of NIC + */ + @JsonProperty(value = "driverVersion") + private String driverVersion; + + /* + * Subnet Mask of NIC + */ + @JsonProperty(value = "ip4Address") + private String ip4Address; + + /* + * Subnet Mask of NIC + */ + @JsonProperty(value = "subnetMask") + private String subnetMask; + + /* + * Default Gateway of NIC + */ + @JsonProperty(value = "defaultGateway") + private String defaultGateway; + + /* + * DNS Servers for NIC + */ + @JsonProperty(value = "dnsServers") + private List dnsServers; + + /* + * Default Isolation of Management NIC + */ + @JsonProperty(value = "defaultIsolationId") + private String defaultIsolationId; + + /** + * Creates an instance of NicDetail class. + */ + public NicDetail() { + } + + /** + * Get the adapterName property: Adapter Name of NIC. + * + * @return the adapterName value. + */ + public String adapterName() { + return this.adapterName; + } + + /** + * Set the adapterName property: Adapter Name of NIC. + * + * @param adapterName the adapterName value to set. + * @return the NicDetail object itself. + */ + public NicDetail withAdapterName(String adapterName) { + this.adapterName = adapterName; + return this; + } + + /** + * Get the interfaceDescription property: Interface Description of NIC. + * + * @return the interfaceDescription value. + */ + public String interfaceDescription() { + return this.interfaceDescription; + } + + /** + * Set the interfaceDescription property: Interface Description of NIC. + * + * @param interfaceDescription the interfaceDescription value to set. + * @return the NicDetail object itself. + */ + public NicDetail withInterfaceDescription(String interfaceDescription) { + this.interfaceDescription = interfaceDescription; + return this; + } + + /** + * Get the componentId property: Component Id of NIC. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Set the componentId property: Component Id of NIC. + * + * @param componentId the componentId value to set. + * @return the NicDetail object itself. + */ + public NicDetail withComponentId(String componentId) { + this.componentId = componentId; + return this; + } + + /** + * Get the driverVersion property: Driver Version of NIC. + * + * @return the driverVersion value. + */ + public String driverVersion() { + return this.driverVersion; + } + + /** + * Set the driverVersion property: Driver Version of NIC. + * + * @param driverVersion the driverVersion value to set. + * @return the NicDetail object itself. + */ + public NicDetail withDriverVersion(String driverVersion) { + this.driverVersion = driverVersion; + return this; + } + + /** + * Get the ip4Address property: Subnet Mask of NIC. + * + * @return the ip4Address value. + */ + public String ip4Address() { + return this.ip4Address; + } + + /** + * Set the ip4Address property: Subnet Mask of NIC. + * + * @param ip4Address the ip4Address value to set. + * @return the NicDetail object itself. + */ + public NicDetail withIp4Address(String ip4Address) { + this.ip4Address = ip4Address; + return this; + } + + /** + * Get the subnetMask property: Subnet Mask of NIC. + * + * @return the subnetMask value. + */ + public String subnetMask() { + return this.subnetMask; + } + + /** + * Set the subnetMask property: Subnet Mask of NIC. + * + * @param subnetMask the subnetMask value to set. + * @return the NicDetail object itself. + */ + public NicDetail withSubnetMask(String subnetMask) { + this.subnetMask = subnetMask; + return this; + } + + /** + * Get the defaultGateway property: Default Gateway of NIC. + * + * @return the defaultGateway value. + */ + public String defaultGateway() { + return this.defaultGateway; + } + + /** + * Set the defaultGateway property: Default Gateway of NIC. + * + * @param defaultGateway the defaultGateway value to set. + * @return the NicDetail object itself. + */ + public NicDetail withDefaultGateway(String defaultGateway) { + this.defaultGateway = defaultGateway; + return this; + } + + /** + * Get the dnsServers property: DNS Servers for NIC. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: DNS Servers for NIC. + * + * @param dnsServers the dnsServers value to set. + * @return the NicDetail object itself. + */ + public NicDetail withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get the defaultIsolationId property: Default Isolation of Management NIC. + * + * @return the defaultIsolationId value. + */ + public String defaultIsolationId() { + return this.defaultIsolationId; + } + + /** + * Set the defaultIsolationId property: Default Isolation of Management NIC. + * + * @param defaultIsolationId the defaultIsolationId value to set. + * @return the NicDetail object itself. + */ + public NicDetail withDefaultIsolationId(String defaultIsolationId) { + this.defaultIsolationId = defaultIsolationId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (adapterName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property adapterName in model NicDetail")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NicDetail.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java new file mode 100644 index 0000000000000..6d1884d2e518e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeArcState.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * State of Arc agent in this node. + */ +public final class NodeArcState extends ExpandableStringEnum { + /** + * Static value NotSpecified for NodeArcState. + */ + public static final NodeArcState NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Error for NodeArcState. + */ + public static final NodeArcState ERROR = fromString("Error"); + + /** + * Static value Succeeded for NodeArcState. + */ + public static final NodeArcState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Canceled for NodeArcState. + */ + public static final NodeArcState CANCELED = fromString("Canceled"); + + /** + * Static value Failed for NodeArcState. + */ + public static final NodeArcState FAILED = fromString("Failed"); + + /** + * Static value Connected for NodeArcState. + */ + public static final NodeArcState CONNECTED = fromString("Connected"); + + /** + * Static value Disconnected for NodeArcState. + */ + public static final NodeArcState DISCONNECTED = fromString("Disconnected"); + + /** + * Static value Deleted for NodeArcState. + */ + public static final NodeArcState DELETED = fromString("Deleted"); + + /** + * Static value Creating for NodeArcState. + */ + public static final NodeArcState CREATING = fromString("Creating"); + + /** + * Static value Updating for NodeArcState. + */ + public static final NodeArcState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for NodeArcState. + */ + public static final NodeArcState DELETING = fromString("Deleting"); + + /** + * Static value Moving for NodeArcState. + */ + public static final NodeArcState MOVING = fromString("Moving"); + + /** + * Static value PartiallySucceeded for NodeArcState. + */ + public static final NodeArcState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); + + /** + * Static value PartiallyConnected for NodeArcState. + */ + public static final NodeArcState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); + + /** + * Static value InProgress for NodeArcState. + */ + public static final NodeArcState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Accepted for NodeArcState. + */ + public static final NodeArcState ACCEPTED = fromString("Accepted"); + + /** + * Static value Provisioning for NodeArcState. + */ + public static final NodeArcState PROVISIONING = fromString("Provisioning"); + + /** + * Static value DisableInProgress for NodeArcState. + */ + public static final NodeArcState DISABLE_IN_PROGRESS = fromString("DisableInProgress"); + + /** + * Creates a new instance of NodeArcState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodeArcState() { + } + + /** + * Creates or finds a NodeArcState from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeArcState. + */ + @JsonCreator + public static NodeArcState fromString(String name) { + return fromString(name, NodeArcState.class); + } + + /** + * Gets known NodeArcState values. + * + * @return known NodeArcState values. + */ + public static Collection values() { + return values(NodeArcState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java new file mode 100644 index 0000000000000..13e21a0164fa9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/NodeExtensionState.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * State of Arc Extension in this node. + */ +public final class NodeExtensionState extends ExpandableStringEnum { + /** + * Static value NotSpecified for NodeExtensionState. + */ + public static final NodeExtensionState NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Error for NodeExtensionState. + */ + public static final NodeExtensionState ERROR = fromString("Error"); + + /** + * Static value Succeeded for NodeExtensionState. + */ + public static final NodeExtensionState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Canceled for NodeExtensionState. + */ + public static final NodeExtensionState CANCELED = fromString("Canceled"); + + /** + * Static value Failed for NodeExtensionState. + */ + public static final NodeExtensionState FAILED = fromString("Failed"); + + /** + * Static value Connected for NodeExtensionState. + */ + public static final NodeExtensionState CONNECTED = fromString("Connected"); + + /** + * Static value Disconnected for NodeExtensionState. + */ + public static final NodeExtensionState DISCONNECTED = fromString("Disconnected"); + + /** + * Static value Deleted for NodeExtensionState. + */ + public static final NodeExtensionState DELETED = fromString("Deleted"); + + /** + * Static value Creating for NodeExtensionState. + */ + public static final NodeExtensionState CREATING = fromString("Creating"); + + /** + * Static value Updating for NodeExtensionState. + */ + public static final NodeExtensionState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for NodeExtensionState. + */ + public static final NodeExtensionState DELETING = fromString("Deleting"); + + /** + * Static value Moving for NodeExtensionState. + */ + public static final NodeExtensionState MOVING = fromString("Moving"); + + /** + * Static value PartiallySucceeded for NodeExtensionState. + */ + public static final NodeExtensionState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); + + /** + * Static value PartiallyConnected for NodeExtensionState. + */ + public static final NodeExtensionState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); + + /** + * Static value InProgress for NodeExtensionState. + */ + public static final NodeExtensionState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Accepted for NodeExtensionState. + */ + public static final NodeExtensionState ACCEPTED = fromString("Accepted"); + + /** + * Static value Provisioning for NodeExtensionState. + */ + public static final NodeExtensionState PROVISIONING = fromString("Provisioning"); + + /** + * Creates a new instance of NodeExtensionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NodeExtensionState() { + } + + /** + * Creates or finds a NodeExtensionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding NodeExtensionState. + */ + @JsonCreator + public static NodeExtensionState fromString(String name) { + return fromString(name, NodeExtensionState.class); + } + + /** + * Gets known NodeExtensionState values. + * + * @return known NodeExtensionState values. + */ + public static Collection values() { + return values(NodeExtensionState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java new file mode 100644 index 0000000000000..2e7475f68a837 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Observability.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Observability of AzureStackHCI Cluster. + */ +@Fluent +public final class Observability { + /* + * Enables telemetry data to be sent to Microsoft + */ + @JsonProperty(value = "streamingDataClient") + private Boolean streamingDataClient; + + /* + * Location of your cluster. The log and diagnostic data is sent to the appropriate diagnostics servers depending upon where your cluster resides. Setting this to false results in all data sent to Microsoft to be stored outside of the EU. + */ + @JsonProperty(value = "euLocation") + private Boolean euLocation; + + /* + * When set to true, collects log data to facilitate quicker issue resolution. + */ + @JsonProperty(value = "episodicDataUpload") + private Boolean episodicDataUpload; + + /** + * Creates an instance of Observability class. + */ + public Observability() { + } + + /** + * Get the streamingDataClient property: Enables telemetry data to be sent to Microsoft. + * + * @return the streamingDataClient value. + */ + public Boolean streamingDataClient() { + return this.streamingDataClient; + } + + /** + * Set the streamingDataClient property: Enables telemetry data to be sent to Microsoft. + * + * @param streamingDataClient the streamingDataClient value to set. + * @return the Observability object itself. + */ + public Observability withStreamingDataClient(Boolean streamingDataClient) { + this.streamingDataClient = streamingDataClient; + return this; + } + + /** + * Get the euLocation property: Location of your cluster. The log and diagnostic data is sent to the appropriate + * diagnostics servers depending upon where your cluster resides. Setting this to false results in all data sent to + * Microsoft to be stored outside of the EU. + * + * @return the euLocation value. + */ + public Boolean euLocation() { + return this.euLocation; + } + + /** + * Set the euLocation property: Location of your cluster. The log and diagnostic data is sent to the appropriate + * diagnostics servers depending upon where your cluster resides. Setting this to false results in all data sent to + * Microsoft to be stored outside of the EU. + * + * @param euLocation the euLocation value to set. + * @return the Observability object itself. + */ + public Observability withEuLocation(Boolean euLocation) { + this.euLocation = euLocation; + return this; + } + + /** + * Get the episodicDataUpload property: When set to true, collects log data to facilitate quicker issue resolution. + * + * @return the episodicDataUpload value. + */ + public Boolean episodicDataUpload() { + return this.episodicDataUpload; + } + + /** + * Set the episodicDataUpload property: When set to true, collects log data to facilitate quicker issue resolution. + * + * @param episodicDataUpload the episodicDataUpload value to set. + * @return the Observability object itself. + */ + public Observability withEpisodicDataUpload(Boolean episodicDataUpload) { + this.episodicDataUpload = episodicDataUpload; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java new file mode 100644 index 0000000000000..a29ed727f84d9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OemActivation.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * OEM activation status of the cluster. + */ +public final class OemActivation extends ExpandableStringEnum { + /** + * Static value Disabled for OemActivation. + */ + public static final OemActivation DISABLED = fromString("Disabled"); + + /** + * Static value Enabled for OemActivation. + */ + public static final OemActivation ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of OemActivation value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OemActivation() { + } + + /** + * Creates or finds a OemActivation from its string representation. + * + * @param name a name to look for. + * @return the corresponding OemActivation. + */ + @JsonCreator + public static OemActivation fromString(String name) { + return fromString(name, OemActivation.class); + } + + /** + * Gets known OemActivation values. + * + * @return known OemActivation values. + */ + public static Collection values() { + return values(OemActivation.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java new file mode 100644 index 0000000000000..7ff6efbab5bde --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offer.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner; +import java.util.List; + +/** + * An immutable client-side representation of Offer. + */ +public interface Offer { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the publisherId property: Identifier of the Publisher for the offer. + * + * @return the publisherId value. + */ + String publisherId(); + + /** + * Gets the content property: JSON serialized catalog content of the offer. + * + * @return the content value. + */ + String content(); + + /** + * Gets the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @return the contentVersion value. + */ + String contentVersion(); + + /** + * Gets the skuMappings property: Array of SKU mappings. + * + * @return the skuMappings value. + */ + List skuMappings(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner object. + * + * @return the inner object. + */ + OfferInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OfferList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OfferList.java new file mode 100644 index 0000000000000..1b508038c10df --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OfferList.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of Offer proxy resources for the HCI cluster. + */ +@Immutable +public final class OfferList { + /* + * List of Offer proxy resources. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of OfferList class. + */ + public OfferList() { + } + + /** + * Get the value property: List of Offer proxy resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java new file mode 100644 index 0000000000000..5e90dee67f558 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Offers.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Offers. + */ +public interface Offers { + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @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 list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName); + + /** + * List Offers available for a publisher within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPublisher(String resourceGroupName, String clusterName, String publisherName, + String expand, Context context); + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * List Offers available across publishers for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 list of Offer proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCluster(String resourceGroupName, String clusterName, String expand, Context context); + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 offer resource details within a publisher of HCI Cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + String offerName, String expand, Context context); + + /** + * Get Offer resource details within a publisher of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @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 offer resource details within a publisher of HCI Cluster. + */ + Offer get(String resourceGroupName, String clusterName, String publisherName, String offerName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperatingSystemTypes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperatingSystemTypes.java index 8514fa16699ff..f3298b3bb58b0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperatingSystemTypes.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperatingSystemTypes.java @@ -7,15 +7,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Operating system type that the gallery image uses [Windows, Linux]. */ +/** + * Operating system type that the gallery image uses [Windows, Linux]. + */ public enum OperatingSystemTypes { - /** Enum value Windows. */ + /** + * Enum value Windows. + */ WINDOWS("Windows"), - /** Enum value Linux. */ + /** + * Enum value Linux. + */ LINUX("Linux"); - /** The actual serialized value for a OperatingSystemTypes instance. */ + /** + * The actual serialized value for a OperatingSystemTypes instance. + */ private final String value; OperatingSystemTypes(String value) { @@ -24,7 +32,7 @@ public enum OperatingSystemTypes { /** * Parses a serialized value to a OperatingSystemTypes instance. - * + * * @param value the serialized value to parse. * @return the parsed OperatingSystemTypes object, or null if unable to parse. */ @@ -42,7 +50,9 @@ public static OperatingSystemTypes fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java index 6f019b09ee2cc..daeb9f6e74e42 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operation.java @@ -4,53 +4,120 @@ package com.azure.resourcemanager.azurestackhci.models; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API Operation + * + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Fluent +public final class Operation { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + + /** + * Creates an instance of Operation class. + */ + public Operation() { + } -/** An immutable client-side representation of Operation. */ -public interface Operation { /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ - String name(); + public String name() { + return this.name; + } /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ - Boolean isDataAction(); + public Boolean isDataAction() { + return this.isDataAction; + } /** - * Gets the display property: Localized display information for this particular operation. - * + * Get the display property: Localized display information for this particular operation. + * * @return the display value. */ - OperationDisplay display(); + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the Operation object itself. + */ + public Operation withDisplay(OperationDisplay display) { + this.display = display; + return this; + } /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ - Origin origin(); + public Origin origin() { + return this.origin; + } /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ - ActionType actionType(); + public ActionType actionType() { + return this.actionType; + } /** - * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner object. - * - * @return the inner object. + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. */ - OperationInner innerModel(); + public void validate() { + if (display() != null) { + display().validate(); + } + } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java index 2d240728b7e43..357b911eae825 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationDisplay.java @@ -7,26 +7,25 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localized display information for this particular operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable public final class OperationDisplay { /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft - * Compute". + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". */ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job - * Schedule Collections". + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". */ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual - * Machine", "Restart Virtual Machine". + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". */ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; @@ -37,14 +36,16 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -54,7 +55,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -64,7 +65,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -74,7 +75,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -83,7 +84,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationListResult.java index 3f4e7b24e1f61..378e27c91296a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OperationListResult.java @@ -4,59 +4,31 @@ package com.azure.resourcemanager.azurestackhci.models; -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner; import java.util.List; /** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. + * An immutable client-side representation of OperationListResult. */ -@Immutable -public final class OperationListResult { - /* - * List of operations supported by the resource provider - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of OperationListResult class. */ - public OperationListResult() { - } - +public interface OperationListResult { /** - * Get the value property: List of operations supported by the resource provider. - * + * Gets the value property: List of operations supported by the resource provider. + * * @return the value value. */ - public List value() { - return this.value; - } + List value(); /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * Gets the nextLink property: URL to get the next set of operation list results (if there are any). + * * @return the nextLink value. */ - public String nextLink() { - return this.nextLink; - } + String nextLink(); /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner object. + * + * @return the inner object. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } + OperationListResultInner innerModel(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java index 79d9ebf8b0cdb..5ee0ff63bb53c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Operations.java @@ -4,30 +4,30 @@ package com.azure.resourcemanager.azurestackhci.models; -import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** - * List all the supported operations. - * + * List all available Microsoft.AzureStackHCI provider operations. + * + * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link Response}. */ - PagedIterable list(); + Response listWithResponse(Context context); /** - * List all the supported operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List all available Microsoft.AzureStackHCI provider operations. + * * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider. */ - PagedIterable list(Context context); + OperationListResult list(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java new file mode 100644 index 0000000000000..3d805e9086955 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OptionalServices.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The OptionalServices of AzureStackHCI Cluster. + */ +@Fluent +public final class OptionalServices { + /* + * The name of custom location. + */ + @JsonProperty(value = "customLocation") + private String customLocation; + + /** + * Creates an instance of OptionalServices class. + */ + public OptionalServices() { + } + + /** + * Get the customLocation property: The name of custom location. + * + * @return the customLocation value. + */ + public String customLocation() { + return this.customLocation; + } + + /** + * Set the customLocation property: The name of custom location. + * + * @param customLocation the customLocation value to set. + * @return the OptionalServices object itself. + */ + public OptionalServices withCustomLocation(String customLocation) { + this.customLocation = customLocation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java index d45e549be2fa1..bb2b99627a6ce 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Origin.java @@ -13,18 +13,24 @@ * is "user,system". */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); /** * Creates a new instance of Origin value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public Origin() { /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ @@ -44,7 +50,7 @@ public static Origin fromString(String name) { /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdate.java index 92be1b0c560d5..5b424596f7095 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdate.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdate.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** OsProfile - describes the update configuration of the operating system. */ +/** + * OsProfile - describes the update configuration of the operating system. + */ @Fluent public final class OsProfileUpdate { /* @@ -28,13 +30,15 @@ public final class OsProfileUpdate { @JsonProperty(value = "windowsConfiguration") private OsProfileUpdateWindowsConfiguration windowsConfiguration; - /** Creates an instance of OsProfileUpdate class. */ + /** + * Creates an instance of OsProfileUpdate class. + */ public OsProfileUpdate() { } /** * Get the computerName property: ComputerName - name of the computer. - * + * * @return the computerName value. */ public String computerName() { @@ -43,7 +47,7 @@ public String computerName() { /** * Set the computerName property: ComputerName - name of the computer. - * + * * @param computerName the computerName value to set. * @return the OsProfileUpdate object itself. */ @@ -54,7 +58,7 @@ public OsProfileUpdate withComputerName(String computerName) { /** * Get the linuxConfiguration property: The linuxConfiguration property. - * + * * @return the linuxConfiguration value. */ public OsProfileUpdateLinuxConfiguration linuxConfiguration() { @@ -63,7 +67,7 @@ public OsProfileUpdateLinuxConfiguration linuxConfiguration() { /** * Set the linuxConfiguration property: The linuxConfiguration property. - * + * * @param linuxConfiguration the linuxConfiguration value to set. * @return the OsProfileUpdate object itself. */ @@ -74,7 +78,7 @@ public OsProfileUpdate withLinuxConfiguration(OsProfileUpdateLinuxConfiguration /** * Get the windowsConfiguration property: The windowsConfiguration property. - * + * * @return the windowsConfiguration value. */ public OsProfileUpdateWindowsConfiguration windowsConfiguration() { @@ -83,7 +87,7 @@ public OsProfileUpdateWindowsConfiguration windowsConfiguration() { /** * Set the windowsConfiguration property: The windowsConfiguration property. - * + * * @param windowsConfiguration the windowsConfiguration value to set. * @return the OsProfileUpdate object itself. */ @@ -94,7 +98,7 @@ public OsProfileUpdate withWindowsConfiguration(OsProfileUpdateWindowsConfigurat /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdateLinuxConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdateLinuxConfiguration.java index 5f14bd85973bb..18beaaac998b7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdateLinuxConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdateLinuxConfiguration.java @@ -7,12 +7,13 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The OsProfileUpdateLinuxConfiguration model. */ +/** + * The OsProfileUpdateLinuxConfiguration model. + */ @Fluent public final class OsProfileUpdateLinuxConfiguration { /* - * Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine - * instance creation process. + * Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. */ @JsonProperty(value = "provisionVMAgent") private Boolean provisionVMAgent; @@ -23,14 +24,16 @@ public final class OsProfileUpdateLinuxConfiguration { @JsonProperty(value = "provisionVMConfigAgent") private Boolean provisionVMConfigAgent; - /** Creates an instance of OsProfileUpdateLinuxConfiguration class. */ + /** + * Creates an instance of OsProfileUpdateLinuxConfiguration class. + */ public OsProfileUpdateLinuxConfiguration() { } /** * Get the provisionVMAgent property: Used to indicate whether Arc for Servers agent onboarding should be triggered * during the virtual machine instance creation process. - * + * * @return the provisionVMAgent value. */ public Boolean provisionVMAgent() { @@ -40,7 +43,7 @@ public Boolean provisionVMAgent() { /** * Set the provisionVMAgent property: Used to indicate whether Arc for Servers agent onboarding should be triggered * during the virtual machine instance creation process. - * + * * @param provisionVMAgent the provisionVMAgent value to set. * @return the OsProfileUpdateLinuxConfiguration object itself. */ @@ -52,7 +55,7 @@ public OsProfileUpdateLinuxConfiguration withProvisionVMAgent(Boolean provisionV /** * Get the provisionVMConfigAgent property: Used to indicate whether the VM Config Agent should be installed during * the virtual machine creation process. - * + * * @return the provisionVMConfigAgent value. */ public Boolean provisionVMConfigAgent() { @@ -62,7 +65,7 @@ public Boolean provisionVMConfigAgent() { /** * Set the provisionVMConfigAgent property: Used to indicate whether the VM Config Agent should be installed during * the virtual machine creation process. - * + * * @param provisionVMConfigAgent the provisionVMConfigAgent value to set. * @return the OsProfileUpdateLinuxConfiguration object itself. */ @@ -73,7 +76,7 @@ public OsProfileUpdateLinuxConfiguration withProvisionVMConfigAgent(Boolean prov /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdateWindowsConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdateWindowsConfiguration.java index 10167da39c0a0..e2f2efb20d4b7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdateWindowsConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/OsProfileUpdateWindowsConfiguration.java @@ -7,12 +7,13 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The OsProfileUpdateWindowsConfiguration model. */ +/** + * The OsProfileUpdateWindowsConfiguration model. + */ @Fluent public final class OsProfileUpdateWindowsConfiguration { /* - * Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine - * instance creation process. + * Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. */ @JsonProperty(value = "provisionVMAgent") private Boolean provisionVMAgent; @@ -23,14 +24,16 @@ public final class OsProfileUpdateWindowsConfiguration { @JsonProperty(value = "provisionVMConfigAgent") private Boolean provisionVMConfigAgent; - /** Creates an instance of OsProfileUpdateWindowsConfiguration class. */ + /** + * Creates an instance of OsProfileUpdateWindowsConfiguration class. + */ public OsProfileUpdateWindowsConfiguration() { } /** * Get the provisionVMAgent property: Used to indicate whether Arc for Servers agent onboarding should be triggered * during the virtual machine instance creation process. - * + * * @return the provisionVMAgent value. */ public Boolean provisionVMAgent() { @@ -40,7 +43,7 @@ public Boolean provisionVMAgent() { /** * Set the provisionVMAgent property: Used to indicate whether Arc for Servers agent onboarding should be triggered * during the virtual machine instance creation process. - * + * * @param provisionVMAgent the provisionVMAgent value to set. * @return the OsProfileUpdateWindowsConfiguration object itself. */ @@ -52,7 +55,7 @@ public OsProfileUpdateWindowsConfiguration withProvisionVMAgent(Boolean provisio /** * Get the provisionVMConfigAgent property: Used to indicate whether the VM Config Agent should be installed during * the virtual machine creation process. - * + * * @return the provisionVMConfigAgent value. */ public Boolean provisionVMConfigAgent() { @@ -62,7 +65,7 @@ public Boolean provisionVMConfigAgent() { /** * Set the provisionVMConfigAgent property: Used to indicate whether the VM Config Agent should be installed during * the virtual machine creation process. - * + * * @param provisionVMConfigAgent the provisionVMConfigAgent value to set. * @return the OsProfileUpdateWindowsConfiguration object itself. */ @@ -73,7 +76,7 @@ public OsProfileUpdateWindowsConfiguration withProvisionVMConfigAgent(Boolean pr /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java new file mode 100644 index 0000000000000..4d959c012217c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PackageVersionInfo.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Current version of each updatable component. + */ +@Fluent +public final class PackageVersionInfo { + /* + * Package type + */ + @JsonProperty(value = "packageType") + private String packageType; + + /* + * Package version + */ + @JsonProperty(value = "version") + private String version; + + /* + * Last time this component was updated. + */ + @JsonProperty(value = "lastUpdated") + private OffsetDateTime lastUpdated; + + /** + * Creates an instance of PackageVersionInfo class. + */ + public PackageVersionInfo() { + } + + /** + * Get the packageType property: Package type. + * + * @return the packageType value. + */ + public String packageType() { + return this.packageType; + } + + /** + * Set the packageType property: Package type. + * + * @param packageType the packageType value to set. + * @return the PackageVersionInfo object itself. + */ + public PackageVersionInfo withPackageType(String packageType) { + this.packageType = packageType; + return this; + } + + /** + * Get the version property: Package version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Package version. + * + * @param version the version value to set. + * @return the PackageVersionInfo object itself. + */ + public PackageVersionInfo withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the lastUpdated property: Last time this component was updated. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the lastUpdated property: Last time this component was updated. + * + * @param lastUpdated the lastUpdated value to set. + * @return the PackageVersionInfo object itself. + */ + public PackageVersionInfo withLastUpdated(OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java new file mode 100644 index 0000000000000..a148be1e3cc80 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PasswordCredential.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of PasswordCredential. + */ +public interface PasswordCredential { + /** + * Gets the secretText property: The secretText property. + * + * @return the secretText value. + */ + String secretText(); + + /** + * Gets the keyId property: The keyId property. + * + * @return the keyId value. + */ + String keyId(); + + /** + * Gets the startDateTime property: The startDateTime property. + * + * @return the startDateTime value. + */ + OffsetDateTime startDateTime(); + + /** + * Gets the endDateTime property: The endDateTime property. + * + * @return the endDateTime value. + */ + OffsetDateTime endDateTime(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner object. + * + * @return the inner object. + */ + PasswordCredentialInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java new file mode 100644 index 0000000000000..5cc4bf9bede23 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeExtensionState.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Status of Arc Extension for a particular node in HCI Cluster. + */ +@Immutable +public final class PerNodeExtensionState { + /* + * Name of the node in HCI Cluster. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Fully qualified resource ID for the particular Arc Extension on this node. + */ + @JsonProperty(value = "extension", access = JsonProperty.Access.WRITE_ONLY) + private String extension; + + /* + * Specifies the version of the script handler. + */ + @JsonProperty(value = "typeHandlerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String typeHandlerVersion; + + /* + * State of Arc Extension in this node. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private NodeExtensionState state; + + /* + * The extension instance view. + */ + @JsonProperty(value = "instanceView", access = JsonProperty.Access.WRITE_ONLY) + private ExtensionInstanceView instanceView; + + /** + * Creates an instance of PerNodeExtensionState class. + */ + public PerNodeExtensionState() { + } + + /** + * Get the name property: Name of the node in HCI Cluster. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the extension property: Fully qualified resource ID for the particular Arc Extension on this node. + * + * @return the extension value. + */ + public String extension() { + return this.extension; + } + + /** + * Get the typeHandlerVersion property: Specifies the version of the script handler. + * + * @return the typeHandlerVersion value. + */ + public String typeHandlerVersion() { + return this.typeHandlerVersion; + } + + /** + * Get the state property: State of Arc Extension in this node. + * + * @return the state value. + */ + public NodeExtensionState state() { + return this.state; + } + + /** + * Get the instanceView property: The extension instance view. + * + * @return the instanceView value. + */ + public ExtensionInstanceView instanceView() { + return this.instanceView; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (instanceView() != null) { + instanceView().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeState.java new file mode 100644 index 0000000000000..0ee447256a073 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PerNodeState.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Status of Arc agent for a particular node in HCI Cluster. + */ +@Immutable +public final class PerNodeState { + /* + * Name of the Node in HCI Cluster + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Fully qualified resource ID for the Arc agent of this node. + */ + @JsonProperty(value = "arcInstance", access = JsonProperty.Access.WRITE_ONLY) + private String arcInstance; + + /* + * The service principal id of the arc for server node + */ + @JsonProperty(value = "arcNodeServicePrincipalObjectId", access = JsonProperty.Access.WRITE_ONLY) + private String arcNodeServicePrincipalObjectId; + + /* + * State of Arc agent in this node. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private NodeArcState state; + + /** + * Creates an instance of PerNodeState class. + */ + public PerNodeState() { + } + + /** + * Get the name property: Name of the Node in HCI Cluster. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the arcInstance property: Fully qualified resource ID for the Arc agent of this node. + * + * @return the arcInstance value. + */ + public String arcInstance() { + return this.arcInstance; + } + + /** + * Get the arcNodeServicePrincipalObjectId property: The service principal id of the arc for server node. + * + * @return the arcNodeServicePrincipalObjectId value. + */ + public String arcNodeServicePrincipalObjectId() { + return this.arcNodeServicePrincipalObjectId; + } + + /** + * Get the state property: State of Arc agent in this node. + * + * @return the state value. + */ + public NodeArcState state() { + return this.state; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java new file mode 100644 index 0000000000000..895b593398576 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PhysicalNodes.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The PhysicalNodes of a cluster. + */ +@Fluent +public final class PhysicalNodes { + /* + * NETBIOS name of each physical server on your Azure Stack HCI cluster. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The IPv4 address assigned to each physical server on your Azure Stack HCI cluster. + */ + @JsonProperty(value = "ipv4Address") + private String ipv4Address; + + /** + * Creates an instance of PhysicalNodes class. + */ + public PhysicalNodes() { + } + + /** + * Get the name property: NETBIOS name of each physical server on your Azure Stack HCI cluster. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: NETBIOS name of each physical server on your Azure Stack HCI cluster. + * + * @param name the name value to set. + * @return the PhysicalNodes object itself. + */ + public PhysicalNodes withName(String name) { + this.name = name; + return this; + } + + /** + * Get the ipv4Address property: The IPv4 address assigned to each physical server on your Azure Stack HCI cluster. + * + * @return the ipv4Address value. + */ + public String ipv4Address() { + return this.ipv4Address; + } + + /** + * Set the ipv4Address property: The IPv4 address assigned to each physical server on your Azure Stack HCI cluster. + * + * @param ipv4Address the ipv4Address value to set. + * @return the PhysicalNodes object itself. + */ + public PhysicalNodes withIpv4Address(String ipv4Address) { + this.ipv4Address = ipv4Address; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PowerStateEnum.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PowerStateEnum.java index 7691d9454c9ef..011b884e9d5e9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PowerStateEnum.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PowerStateEnum.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The power state of the virtual machine instance. */ +/** + * The power state of the virtual machine instance. + */ public final class PowerStateEnum extends ExpandableStringEnum { - /** Static value Deallocated for PowerStateEnum. */ + /** + * Static value Deallocated for PowerStateEnum. + */ public static final PowerStateEnum DEALLOCATED = fromString("Deallocated"); - /** Static value Deallocating for PowerStateEnum. */ + /** + * Static value Deallocating for PowerStateEnum. + */ public static final PowerStateEnum DEALLOCATING = fromString("Deallocating"); - /** Static value Running for PowerStateEnum. */ + /** + * Static value Running for PowerStateEnum. + */ public static final PowerStateEnum RUNNING = fromString("Running"); - /** Static value Starting for PowerStateEnum. */ + /** + * Static value Starting for PowerStateEnum. + */ public static final PowerStateEnum STARTING = fromString("Starting"); - /** Static value Stopped for PowerStateEnum. */ + /** + * Static value Stopped for PowerStateEnum. + */ public static final PowerStateEnum STOPPED = fromString("Stopped"); - /** Static value Stopping for PowerStateEnum. */ + /** + * Static value Stopping for PowerStateEnum. + */ public static final PowerStateEnum STOPPING = fromString("Stopping"); - /** Static value Unknown for PowerStateEnum. */ + /** + * Static value Unknown for PowerStateEnum. + */ public static final PowerStateEnum UNKNOWN = fromString("Unknown"); /** * Creates a new instance of PowerStateEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public PowerStateEnum() { /** * Creates or finds a PowerStateEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding PowerStateEnum. */ @@ -53,7 +69,7 @@ public static PowerStateEnum fromString(String name) { /** * Gets known PowerStateEnum values. - * + * * @return known PowerStateEnum values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java new file mode 100644 index 0000000000000..4d0db11ff8667 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResult.java @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * The PrecheckResult model. + */ +@Fluent +public final class PrecheckResult { + /* + * Name of the individual test/rule/alert that was executed. Unique, not exposed to the customer. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The health check DisplayName localized of the individual test executed. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Key-value pairs that allow grouping/filtering individual tests. + */ + @JsonProperty(value = "tags") + private PrecheckResultTags tags; + + /* + * User-facing name; one or more sentences indicating the direct issue. + */ + @JsonProperty(value = "title") + private String title; + + /* + * The status of the check running (i.e. Failed, Succeeded, In Progress). This answers whether the check ran, and passed or failed. + */ + @JsonProperty(value = "status") + private Status status; + + /* + * Severity of the result (Critical, Warning, Informational, Hidden). This answers how important the result is. Critical is the only update-blocking severity. + */ + @JsonProperty(value = "severity") + private Severity severity; + + /* + * Detailed overview of the issue and what impact the issue has on the stamp. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Set of steps that can be taken to resolve the issue found. + */ + @JsonProperty(value = "remediation") + private String remediation; + + /* + * The unique identifier for the affected resource (such as a node or drive). + */ + @JsonProperty(value = "targetResourceID") + private String targetResourceId; + + /* + * The name of the affected resource. + */ + @JsonProperty(value = "targetResourceName") + private String targetResourceName; + + /* + * The Time in which the HealthCheck was called. + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * Property bag of key value pairs for additional information. + */ + @JsonProperty(value = "additionalData") + private String additionalData; + + /* + * The name of the services called for the HealthCheck (I.E. Test-AzureStack, Test-Cluster). + */ + @JsonProperty(value = "healthCheckSource") + private String healthCheckSource; + + /** + * Creates an instance of PrecheckResult class. + */ + public PrecheckResult() { + } + + /** + * Get the name property: Name of the individual test/rule/alert that was executed. Unique, not exposed to the + * customer. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the individual test/rule/alert that was executed. Unique, not exposed to the + * customer. + * + * @param name the name value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName property: The health check DisplayName localized of the individual test executed. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The health check DisplayName localized of the individual test executed. + * + * @param displayName the displayName value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the tags property: Key-value pairs that allow grouping/filtering individual tests. + * + * @return the tags value. + */ + public PrecheckResultTags tags() { + return this.tags; + } + + /** + * Set the tags property: Key-value pairs that allow grouping/filtering individual tests. + * + * @param tags the tags value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withTags(PrecheckResultTags tags) { + this.tags = tags; + return this; + } + + /** + * Get the title property: User-facing name; one or more sentences indicating the direct issue. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: User-facing name; one or more sentences indicating the direct issue. + * + * @param title the title value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the status property: The status of the check running (i.e. Failed, Succeeded, In Progress). This answers + * whether the check ran, and passed or failed. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Set the status property: The status of the check running (i.e. Failed, Succeeded, In Progress). This answers + * whether the check ran, and passed or failed. + * + * @param status the status value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withStatus(Status status) { + this.status = status; + return this; + } + + /** + * Get the severity property: Severity of the result (Critical, Warning, Informational, Hidden). This answers how + * important the result is. Critical is the only update-blocking severity. + * + * @return the severity value. + */ + public Severity severity() { + return this.severity; + } + + /** + * Set the severity property: Severity of the result (Critical, Warning, Informational, Hidden). This answers how + * important the result is. Critical is the only update-blocking severity. + * + * @param severity the severity value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withSeverity(Severity severity) { + this.severity = severity; + return this; + } + + /** + * Get the description property: Detailed overview of the issue and what impact the issue has on the stamp. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Detailed overview of the issue and what impact the issue has on the stamp. + * + * @param description the description value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the remediation property: Set of steps that can be taken to resolve the issue found. + * + * @return the remediation value. + */ + public String remediation() { + return this.remediation; + } + + /** + * Set the remediation property: Set of steps that can be taken to resolve the issue found. + * + * @param remediation the remediation value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withRemediation(String remediation) { + this.remediation = remediation; + return this; + } + + /** + * Get the targetResourceId property: The unique identifier for the affected resource (such as a node or drive). + * + * @return the targetResourceId value. + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the targetResourceId property: The unique identifier for the affected resource (such as a node or drive). + * + * @param targetResourceId the targetResourceId value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get the targetResourceName property: The name of the affected resource. + * + * @return the targetResourceName value. + */ + public String targetResourceName() { + return this.targetResourceName; + } + + /** + * Set the targetResourceName property: The name of the affected resource. + * + * @param targetResourceName the targetResourceName value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withTargetResourceName(String targetResourceName) { + this.targetResourceName = targetResourceName; + return this; + } + + /** + * Get the timestamp property: The Time in which the HealthCheck was called. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The Time in which the HealthCheck was called. + * + * @param timestamp the timestamp value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the additionalData property: Property bag of key value pairs for additional information. + * + * @return the additionalData value. + */ + public String additionalData() { + return this.additionalData; + } + + /** + * Set the additionalData property: Property bag of key value pairs for additional information. + * + * @param additionalData the additionalData value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withAdditionalData(String additionalData) { + this.additionalData = additionalData; + return this; + } + + /** + * Get the healthCheckSource property: The name of the services called for the HealthCheck (I.E. Test-AzureStack, + * Test-Cluster). + * + * @return the healthCheckSource value. + */ + public String healthCheckSource() { + return this.healthCheckSource; + } + + /** + * Set the healthCheckSource property: The name of the services called for the HealthCheck (I.E. Test-AzureStack, + * Test-Cluster). + * + * @param healthCheckSource the healthCheckSource value to set. + * @return the PrecheckResult object itself. + */ + public PrecheckResult withHealthCheckSource(String healthCheckSource) { + this.healthCheckSource = healthCheckSource; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (tags() != null) { + tags().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java new file mode 100644 index 0000000000000..769aca9686cf6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PrecheckResultTags.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Key-value pairs that allow grouping/filtering individual tests. + */ +@Fluent +public final class PrecheckResultTags { + /* + * Key that allow grouping/filtering individual tests. + */ + @JsonProperty(value = "key") + private String key; + + /* + * Value of the key that allow grouping/filtering individual tests. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Creates an instance of PrecheckResultTags class. + */ + public PrecheckResultTags() { + } + + /** + * Get the key property: Key that allow grouping/filtering individual tests. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Key that allow grouping/filtering individual tests. + * + * @param key the key value to set. + * @return the PrecheckResultTags object itself. + */ + public PrecheckResultTags withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value property: Value of the key that allow grouping/filtering individual tests. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Value of the key that allow grouping/filtering individual tests. + * + * @param value the value value to set. + * @return the PrecheckResultTags object itself. + */ + public PrecheckResultTags withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningAction.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningAction.java index 9c8b56e4f67c7..0c38f5fb1b917 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningAction.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningAction.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines the different types of operations for guest agent. */ +/** + * Defines the different types of operations for guest agent. + */ public final class ProvisioningAction extends ExpandableStringEnum { - /** Static value install for ProvisioningAction. */ + /** + * Static value install for ProvisioningAction. + */ public static final ProvisioningAction INSTALL = fromString("install"); - /** Static value uninstall for ProvisioningAction. */ + /** + * Static value uninstall for ProvisioningAction. + */ public static final ProvisioningAction UNINSTALL = fromString("uninstall"); - /** Static value repair for ProvisioningAction. */ + /** + * Static value repair for ProvisioningAction. + */ public static final ProvisioningAction REPAIR = fromString("repair"); /** * Creates a new instance of ProvisioningAction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ProvisioningAction() { /** * Creates or finds a ProvisioningAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningAction. */ @@ -41,7 +49,7 @@ public static ProvisioningAction fromString(String name) { /** * Gets known ProvisioningAction values. - * + * * @return known ProvisioningAction values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java new file mode 100644 index 0000000000000..35948d24abdd1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningState.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Provisioning state of the ArcSetting proxy resource. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** + * Static value NotSpecified for ProvisioningState. + */ + public static final ProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value Error for ProvisioningState. + */ + public static final ProvisioningState ERROR = fromString("Error"); + + /** + * Static value Succeeded for ProvisioningState. + */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ProvisioningState. + */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ProvisioningState. + */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Connected for ProvisioningState. + */ + public static final ProvisioningState CONNECTED = fromString("Connected"); + + /** + * Static value Disconnected for ProvisioningState. + */ + public static final ProvisioningState DISCONNECTED = fromString("Disconnected"); + + /** + * Static value Deleted for ProvisioningState. + */ + public static final ProvisioningState DELETED = fromString("Deleted"); + + /** + * Static value Creating for ProvisioningState. + */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for ProvisioningState. + */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for ProvisioningState. + */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Moving for ProvisioningState. + */ + public static final ProvisioningState MOVING = fromString("Moving"); + + /** + * Static value PartiallySucceeded for ProvisioningState. + */ + public static final ProvisioningState PARTIALLY_SUCCEEDED = fromString("PartiallySucceeded"); + + /** + * Static value PartiallyConnected for ProvisioningState. + */ + public static final ProvisioningState PARTIALLY_CONNECTED = fromString("PartiallyConnected"); + + /** + * Static value InProgress for ProvisioningState. + */ + public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Accepted for ProvisioningState. + */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Static value Provisioning for ProvisioningState. + */ + public static final ProvisioningState PROVISIONING = fromString("Provisioning"); + + /** + * Static value DisableInProgress for ProvisioningState. + */ + public static final ProvisioningState DISABLE_IN_PROGRESS = fromString("DisableInProgress"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningStateEnum.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningStateEnum.java index 8216560bfdd9d..5929df857539d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningStateEnum.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ProvisioningStateEnum.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the gallery image. */ +/** + * Provisioning state of the gallery image. + */ public final class ProvisioningStateEnum extends ExpandableStringEnum { - /** Static value Succeeded for ProvisioningStateEnum. */ + /** + * Static value Succeeded for ProvisioningStateEnum. + */ public static final ProvisioningStateEnum SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningStateEnum. */ + /** + * Static value Failed for ProvisioningStateEnum. + */ public static final ProvisioningStateEnum FAILED = fromString("Failed"); - /** Static value InProgress for ProvisioningStateEnum. */ + /** + * Static value InProgress for ProvisioningStateEnum. + */ public static final ProvisioningStateEnum IN_PROGRESS = fromString("InProgress"); - /** Static value Accepted for ProvisioningStateEnum. */ + /** + * Static value Accepted for ProvisioningStateEnum. + */ public static final ProvisioningStateEnum ACCEPTED = fromString("Accepted"); - /** Static value Deleting for ProvisioningStateEnum. */ + /** + * Static value Deleting for ProvisioningStateEnum. + */ public static final ProvisioningStateEnum DELETING = fromString("Deleting"); - /** Static value Canceled for ProvisioningStateEnum. */ + /** + * Static value Canceled for ProvisioningStateEnum. + */ public static final ProvisioningStateEnum CANCELED = fromString("Canceled"); /** * Creates a new instance of ProvisioningStateEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public ProvisioningStateEnum() { /** * Creates or finds a ProvisioningStateEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningStateEnum. */ @@ -50,7 +64,7 @@ public static ProvisioningStateEnum fromString(String name) { /** * Gets known ProvisioningStateEnum values. - * + * * @return known ProvisioningStateEnum values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publisher.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publisher.java new file mode 100644 index 0000000000000..89707328f4908 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publisher.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; + +/** + * An immutable client-side representation of Publisher. + */ +public interface Publisher { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner object. + * + * @return the inner object. + */ + PublisherInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PublisherList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PublisherList.java new file mode 100644 index 0000000000000..0069a3cd70e56 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/PublisherList.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of Publisher proxy resources for the HCI cluster. + */ +@Immutable +public final class PublisherList { + /* + * List of Publisher proxy resources. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of PublisherList class. + */ + public PublisherList() { + } + + /** + * Get the value property: List of Publisher proxy resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.java new file mode 100644 index 0000000000000..e948fc8e29975 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Publishers.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Publishers. + */ +public interface Publishers { + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCluster(String resourceGroupName, String clusterName); + + /** + * List Publishers available for the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Publisher proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context); + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @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 publisher resource details of HCI Cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, + Context context); + + /** + * Get Publisher resource details of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @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 publisher resource details of HCI Cluster. + */ + Publisher get(String resourceGroupName, String clusterName, String publisherName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java new file mode 100644 index 0000000000000..04488e50a5c88 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/QosPolicyOverrides.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The QoSPolicyOverrides of a cluster. + */ +@Fluent +public final class QosPolicyOverrides { + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. + */ + @JsonProperty(value = "priorityValue8021Action_Cluster") + private String priorityValue8021ActionCluster; + + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. + */ + @JsonProperty(value = "priorityValue8021Action_SMB") + private String priorityValue8021ActionSmb; + + /* + * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation. + */ + @JsonProperty(value = "bandwidthPercentage_SMB") + private String bandwidthPercentageSmb; + + /** + * Creates an instance of QosPolicyOverrides class. + */ + public QosPolicyOverrides() { + } + + /** + * Get the priorityValue8021ActionCluster property: This parameter should only be modified based on your OEM + * guidance. Do not modify this parameter without OEM validation. + * + * @return the priorityValue8021ActionCluster value. + */ + public String priorityValue8021ActionCluster() { + return this.priorityValue8021ActionCluster; + } + + /** + * Set the priorityValue8021ActionCluster property: This parameter should only be modified based on your OEM + * guidance. Do not modify this parameter without OEM validation. + * + * @param priorityValue8021ActionCluster the priorityValue8021ActionCluster value to set. + * @return the QosPolicyOverrides object itself. + */ + public QosPolicyOverrides withPriorityValue8021ActionCluster(String priorityValue8021ActionCluster) { + this.priorityValue8021ActionCluster = priorityValue8021ActionCluster; + return this; + } + + /** + * Get the priorityValue8021ActionSmb property: This parameter should only be modified based on your OEM guidance. + * Do not modify this parameter without OEM validation. + * + * @return the priorityValue8021ActionSmb value. + */ + public String priorityValue8021ActionSmb() { + return this.priorityValue8021ActionSmb; + } + + /** + * Set the priorityValue8021ActionSmb property: This parameter should only be modified based on your OEM guidance. + * Do not modify this parameter without OEM validation. + * + * @param priorityValue8021ActionSmb the priorityValue8021ActionSmb value to set. + * @return the QosPolicyOverrides object itself. + */ + public QosPolicyOverrides withPriorityValue8021ActionSmb(String priorityValue8021ActionSmb) { + this.priorityValue8021ActionSmb = priorityValue8021ActionSmb; + return this; + } + + /** + * Get the bandwidthPercentageSmb property: This parameter should only be modified based on your OEM guidance. Do + * not modify this parameter without OEM validation. + * + * @return the bandwidthPercentageSmb value. + */ + public String bandwidthPercentageSmb() { + return this.bandwidthPercentageSmb; + } + + /** + * Set the bandwidthPercentageSmb property: This parameter should only be modified based on your OEM guidance. Do + * not modify this parameter without OEM validation. + * + * @param bandwidthPercentageSmb the bandwidthPercentageSmb value to set. + * @return the QosPolicyOverrides object itself. + */ + public QosPolicyOverrides withBandwidthPercentageSmb(String bandwidthPercentageSmb) { + this.bandwidthPercentageSmb = bandwidthPercentageSmb; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java new file mode 100644 index 0000000000000..8360f5c4bb5ad --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RawCertificateData.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The RawCertificateData model. + */ +@Fluent +public final class RawCertificateData { + /* + * The certificates property. + */ + @JsonProperty(value = "certificates") + private List certificates; + + /** + * Creates an instance of RawCertificateData class. + */ + public RawCertificateData() { + } + + /** + * Get the certificates property: The certificates property. + * + * @return the certificates value. + */ + public List certificates() { + return this.certificates; + } + + /** + * Set the certificates property: The certificates property. + * + * @param certificates the certificates value to set. + * @return the RawCertificateData object itself. + */ + public RawCertificateData withCertificates(List certificates) { + this.certificates = certificates; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java new file mode 100644 index 0000000000000..11e95cf3ddd63 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RebootRequirement.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for RebootRequirement. + */ +public final class RebootRequirement extends ExpandableStringEnum { + /** + * Static value Unknown for RebootRequirement. + */ + public static final RebootRequirement UNKNOWN = fromString("Unknown"); + + /** + * Static value True for RebootRequirement. + */ + public static final RebootRequirement TRUE = fromString("True"); + + /** + * Static value False for RebootRequirement. + */ + public static final RebootRequirement FALSE = fromString("False"); + + /** + * Creates a new instance of RebootRequirement value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RebootRequirement() { + } + + /** + * Creates or finds a RebootRequirement from its string representation. + * + * @param name a name to look for. + * @return the corresponding RebootRequirement. + */ + @JsonCreator + public static RebootRequirement fromString(String name) { + return fromString(name, RebootRequirement.class); + } + + /** + * Gets known RebootRequirement values. + * + * @return known RebootRequirement values. + */ + public static Collection values() { + return values(RebootRequirement.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java new file mode 100644 index 0000000000000..a06af94eafdcb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ReportedProperties.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The DeploymentStatus of AzureStackHCI Cluster. + */ +@Immutable +public final class ReportedProperties { + /* + * validation status of AzureStackHCI Cluster Deployment. + */ + @JsonProperty(value = "validationStatus", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus validationStatus; + + /* + * Deployment status of AzureStackHCI Cluster Deployment. + */ + @JsonProperty(value = "deploymentStatus", access = JsonProperty.Access.WRITE_ONLY) + private DeploymentStatus deploymentStatus; + + /** + * Creates an instance of ReportedProperties class. + */ + public ReportedProperties() { + } + + /** + * Get the validationStatus property: validation status of AzureStackHCI Cluster Deployment. + * + * @return the validationStatus value. + */ + public ValidationStatus validationStatus() { + return this.validationStatus; + } + + /** + * Get the deploymentStatus property: Deployment status of AzureStackHCI Cluster Deployment. + * + * @return the deploymentStatus value. + */ + public DeploymentStatus deploymentStatus() { + return this.deploymentStatus; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (validationStatus() != null) { + validationStatus().validate(); + } + if (deploymentStatus() != null) { + deploymentStatus().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ResourceIdentityType.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ResourceIdentityType.java index f8756dc42fa80..f59ad844cdd71 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ResourceIdentityType.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ResourceIdentityType.java @@ -7,12 +7,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The identity type. */ +/** + * The identity type. + */ public enum ResourceIdentityType { - /** Enum value SystemAssigned. */ + /** + * Enum value SystemAssigned. + */ SYSTEM_ASSIGNED("SystemAssigned"); - /** The actual serialized value for a ResourceIdentityType instance. */ + /** + * The actual serialized value for a ResourceIdentityType instance. + */ private final String value; ResourceIdentityType(String value) { @@ -21,7 +27,7 @@ public enum ResourceIdentityType { /** * Parses a serialized value to a ResourceIdentityType instance. - * + * * @param value the serialized value to parse. * @return the parsed ResourceIdentityType object, or null if unable to parse. */ @@ -39,7 +45,9 @@ public static ResourceIdentityType fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Route.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Route.java index 04f511550b73a..959ad923f58d5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Route.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Route.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.RoutePropertiesFormat; import com.fasterxml.jackson.annotation.JsonProperty; -/** Route - Route resource. */ +/** + * Route - Route resource. + */ @Fluent public final class Route { /* @@ -23,13 +25,15 @@ public final class Route { @JsonProperty(value = "name") private String name; - /** Creates an instance of Route class. */ + /** + * Creates an instance of Route class. + */ public Route() { } /** * Get the innerProperties property: Properties of the route. - * + * * @return the innerProperties value. */ private RoutePropertiesFormat innerProperties() { @@ -38,7 +42,7 @@ private RoutePropertiesFormat innerProperties() { /** * Get the name property: Name - name of the subnet. - * + * * @return the name value. */ public String name() { @@ -47,7 +51,7 @@ public String name() { /** * Set the name property: Name - name of the subnet. - * + * * @param name the name value to set. * @return the Route object itself. */ @@ -58,7 +62,7 @@ public Route withName(String name) { /** * Get the addressPrefix property: The destination CIDR to which the route applies. - * + * * @return the addressPrefix value. */ public String addressPrefix() { @@ -67,7 +71,7 @@ public String addressPrefix() { /** * Set the addressPrefix property: The destination CIDR to which the route applies. - * + * * @param addressPrefix the addressPrefix value to set. * @return the Route object itself. */ @@ -82,7 +86,7 @@ public Route withAddressPrefix(String addressPrefix) { /** * Get the nextHopIpAddress property: The IP address packets should be forwarded to. Next hop values are only * allowed in routes where the next hop type is VirtualAppliance. - * + * * @return the nextHopIpAddress value. */ public String nextHopIpAddress() { @@ -92,7 +96,7 @@ public String nextHopIpAddress() { /** * Set the nextHopIpAddress property: The IP address packets should be forwarded to. Next hop values are only * allowed in routes where the next hop type is VirtualAppliance. - * + * * @param nextHopIpAddress the nextHopIpAddress value to set. * @return the Route object itself. */ @@ -106,7 +110,7 @@ public Route withNextHopIpAddress(String nextHopIpAddress) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RouteTable.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RouteTable.java index 91caf6ab6f72e..b5685521937f4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RouteTable.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/RouteTable.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Route table resource. */ +/** + * Route table resource. + */ @Fluent public final class RouteTable { /* @@ -36,13 +38,15 @@ public final class RouteTable { @JsonProperty(value = "properties") private RouteTablePropertiesFormat innerProperties; - /** Creates an instance of RouteTable class. */ + /** + * Creates an instance of RouteTable class. + */ public RouteTable() { } /** * Get the etag property: A unique read-only string that changes whenever the resource is updated. - * + * * @return the etag value. */ public String etag() { @@ -51,7 +55,7 @@ public String etag() { /** * Get the name property: Resource name. - * + * * @return the name value. */ public String name() { @@ -60,7 +64,7 @@ public String name() { /** * Get the type property: Resource type. - * + * * @return the type value. */ public String type() { @@ -69,7 +73,7 @@ public String type() { /** * Get the innerProperties property: Properties of the route table. - * + * * @return the innerProperties value. */ private RouteTablePropertiesFormat innerProperties() { @@ -78,7 +82,7 @@ private RouteTablePropertiesFormat innerProperties() { /** * Get the routes property: Collection of routes contained within a route table. - * + * * @return the routes value. */ public List routes() { @@ -87,7 +91,7 @@ public List routes() { /** * Set the routes property: Collection of routes contained within a route table. - * + * * @param routes the routes value to set. * @return the RouteTable object itself. */ @@ -101,7 +105,7 @@ public RouteTable withRoutes(List routes) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java new file mode 100644 index 0000000000000..5b5f592427307 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ScaleUnits.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Scale units will contains list of deployment data. + */ +@Fluent +public final class ScaleUnits { + /* + * Deployment Data to deploy AzureStackHCI Cluster. + */ + @JsonProperty(value = "deploymentData", required = true) + private DeploymentData deploymentData; + + /** + * Creates an instance of ScaleUnits class. + */ + public ScaleUnits() { + } + + /** + * Get the deploymentData property: Deployment Data to deploy AzureStackHCI Cluster. + * + * @return the deploymentData value. + */ + public DeploymentData deploymentData() { + return this.deploymentData; + } + + /** + * Set the deploymentData property: Deployment Data to deploy AzureStackHCI Cluster. + * + * @param deploymentData the deploymentData value to set. + * @return the ScaleUnits object itself. + */ + public ScaleUnits withDeploymentData(DeploymentData deploymentData) { + this.deploymentData = deploymentData; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deploymentData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property deploymentData in model ScaleUnits")); + } else { + deploymentData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScaleUnits.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java new file mode 100644 index 0000000000000..3bdcd070bb1eb --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityComplianceStatus.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Security compliance properties of the resource. + */ +@Immutable +public final class SecurityComplianceStatus { + /* + * Indicates whether HCI hosts meets secured-core server requirements. + */ + @JsonProperty(value = "securedCoreCompliance", access = JsonProperty.Access.WRITE_ONLY) + private ComplianceStatus securedCoreCompliance; + + /* + * Indicates whether HCI hosts have enforced consistent Windows Defender Application Control. + */ + @JsonProperty(value = "wdacCompliance", access = JsonProperty.Access.WRITE_ONLY) + private ComplianceStatus wdacCompliance; + + /* + * Indicates whether data at-rest encryption is enabled on Azure Stack HCI clustered volumes. + */ + @JsonProperty(value = "dataAtRestEncrypted", access = JsonProperty.Access.WRITE_ONLY) + private ComplianceStatus dataAtRestEncrypted; + + /* + * Indicates whether HCI cluster has data in-transit protection. + */ + @JsonProperty(value = "dataInTransitProtected", access = JsonProperty.Access.WRITE_ONLY) + private ComplianceStatus dataInTransitProtected; + + /* + * Time in UTC when compliance status was last updated. + */ + @JsonProperty(value = "lastUpdated", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastUpdated; + + /** + * Creates an instance of SecurityComplianceStatus class. + */ + public SecurityComplianceStatus() { + } + + /** + * Get the securedCoreCompliance property: Indicates whether HCI hosts meets secured-core server requirements. + * + * @return the securedCoreCompliance value. + */ + public ComplianceStatus securedCoreCompliance() { + return this.securedCoreCompliance; + } + + /** + * Get the wdacCompliance property: Indicates whether HCI hosts have enforced consistent Windows Defender + * Application Control. + * + * @return the wdacCompliance value. + */ + public ComplianceStatus wdacCompliance() { + return this.wdacCompliance; + } + + /** + * Get the dataAtRestEncrypted property: Indicates whether data at-rest encryption is enabled on Azure Stack HCI + * clustered volumes. + * + * @return the dataAtRestEncrypted value. + */ + public ComplianceStatus dataAtRestEncrypted() { + return this.dataAtRestEncrypted; + } + + /** + * Get the dataInTransitProtected property: Indicates whether HCI cluster has data in-transit protection. + * + * @return the dataInTransitProtected value. + */ + public ComplianceStatus dataInTransitProtected() { + return this.dataInTransitProtected; + } + + /** + * Get the lastUpdated property: Time in UTC when compliance status was last updated. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySetting.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySetting.java new file mode 100644 index 0000000000000..87dcdc2d96cd4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySetting.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; + +/** + * An immutable client-side representation of SecuritySetting. + */ +public interface SecuritySetting { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the securedCoreComplianceAssignment property: Secured Core Compliance Assignment. + * + * @return the securedCoreComplianceAssignment value. + */ + ComplianceAssignmentType securedCoreComplianceAssignment(); + + /** + * Gets the securityComplianceStatus property: Security Compliance Status. + * + * @return the securityComplianceStatus value. + */ + SecurityComplianceStatus securityComplianceStatus(); + + /** + * 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.azurestackhci.fluent.models.SecuritySettingInner object. + * + * @return the inner object. + */ + SecuritySettingInner innerModel(); + + /** + * The entirety of the SecuritySetting definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The SecuritySetting definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the SecuritySetting definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the SecuritySetting definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @return the next definition stage. + */ + WithCreate withExistingCluster(String resourceGroupName, String clusterName); + } + + /** + * The stage of the SecuritySetting 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.WithSecuredCoreComplianceAssignment, DefinitionStages.WithProvisioningState { + /** + * Executes the create request. + * + * @return the created resource. + */ + SecuritySetting create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + SecuritySetting create(Context context); + } + + /** + * The stage of the SecuritySetting definition allowing to specify securedCoreComplianceAssignment. + */ + interface WithSecuredCoreComplianceAssignment { + /** + * Specifies the securedCoreComplianceAssignment property: Secured Core Compliance Assignment. + * + * @param securedCoreComplianceAssignment Secured Core Compliance Assignment. + * @return the next definition stage. + */ + WithCreate withSecuredCoreComplianceAssignment(ComplianceAssignmentType securedCoreComplianceAssignment); + } + + /** + * The stage of the SecuritySetting definition allowing to specify provisioningState. + */ + interface WithProvisioningState { + /** + * Specifies the provisioningState property: The status of the last operation.. + * + * @param provisioningState The status of the last operation. + * @return the next definition stage. + */ + WithCreate withProvisioningState(ProvisioningState provisioningState); + } + } + + /** + * Begins update for the SecuritySetting resource. + * + * @return the stage of resource update. + */ + SecuritySetting.Update update(); + + /** + * The template for SecuritySetting update. + */ + interface Update extends UpdateStages.WithSecuredCoreComplianceAssignment, UpdateStages.WithProvisioningState { + /** + * Executes the update request. + * + * @return the updated resource. + */ + SecuritySetting apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + SecuritySetting apply(Context context); + } + + /** + * The SecuritySetting update stages. + */ + interface UpdateStages { + /** + * The stage of the SecuritySetting update allowing to specify securedCoreComplianceAssignment. + */ + interface WithSecuredCoreComplianceAssignment { + /** + * Specifies the securedCoreComplianceAssignment property: Secured Core Compliance Assignment. + * + * @param securedCoreComplianceAssignment Secured Core Compliance Assignment. + * @return the next definition stage. + */ + Update withSecuredCoreComplianceAssignment(ComplianceAssignmentType securedCoreComplianceAssignment); + } + + /** + * The stage of the SecuritySetting update allowing to specify provisioningState. + */ + interface WithProvisioningState { + /** + * Specifies the provisioningState property: The status of the last operation.. + * + * @param provisioningState The status of the last operation. + * @return the next definition stage. + */ + Update withProvisioningState(ProvisioningState provisioningState); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + SecuritySetting refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + SecuritySetting refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettingListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettingListResult.java new file mode 100644 index 0000000000000..9fac860196b20 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettingListResult.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a SecuritySetting list operation. + */ +@Fluent +public final class SecuritySettingListResult { + /* + * The SecuritySetting items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of SecuritySettingListResult class. + */ + public SecuritySettingListResult() { + } + + /** + * Get the value property: The SecuritySetting items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The SecuritySetting items on this page. + * + * @param value the value value to set. + * @return the SecuritySettingListResult object itself. + */ + public SecuritySettingListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the SecuritySettingListResult object itself. + */ + public SecuritySettingListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model SecuritySettingListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecuritySettingListResult.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettings.java new file mode 100644 index 0000000000000..ec1c1e6b2359b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecuritySettings.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of SecuritySettings. + */ +public interface SecuritySettings { + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByClusters(String resourceGroupName, String clusterName); + + /** + * List SecuritySetting resources by Clusters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 of a SecuritySetting list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByClusters(String resourceGroupName, String clusterName, Context context); + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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 a SecuritySetting along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String securitySettingsName, + Context context); + + /** + * Get a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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 a SecuritySetting. + */ + SecuritySetting get(String resourceGroupName, String clusterName, String securitySettingsName); + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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 delete(String resourceGroupName, String clusterName, String securitySettingsName); + + /** + * Delete a SecuritySetting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param securitySettingsName Name of security setting. + * @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 delete(String resourceGroupName, String clusterName, String securitySettingsName, Context context); + + /** + * Get a SecuritySetting. + * + * @param id the resource ID. + * @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 a SecuritySetting along with {@link Response}. + */ + SecuritySetting getById(String id); + + /** + * Get a SecuritySetting. + * + * @param id the resource ID. + * @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 a SecuritySetting along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a SecuritySetting. + * + * @param id the resource ID. + * @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 deleteById(String id); + + /** + * Delete a SecuritySetting. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new SecuritySetting resource. + * + * @param name resource name. + * @return the first stage of the new SecuritySetting definition. + */ + SecuritySetting.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityTypes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityTypes.java index 5d8926382c65f..c67109c033e02 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityTypes.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SecurityTypes.java @@ -13,15 +13,19 @@ * SecurityType to function. */ public final class SecurityTypes extends ExpandableStringEnum { - /** Static value TrustedLaunch for SecurityTypes. */ + /** + * Static value TrustedLaunch for SecurityTypes. + */ public static final SecurityTypes TRUSTED_LAUNCH = fromString("TrustedLaunch"); - /** Static value ConfidentialVM for SecurityTypes. */ + /** + * Static value ConfidentialVM for SecurityTypes. + */ public static final SecurityTypes CONFIDENTIAL_VM = fromString("ConfidentialVM"); /** * Creates a new instance of SecurityTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +34,7 @@ public SecurityTypes() { /** * Creates or finds a SecurityTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecurityTypes. */ @@ -41,7 +45,7 @@ public static SecurityTypes fromString(String name) { /** * Gets known SecurityTypes values. - * + * * @return known SecurityTypes values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java new file mode 100644 index 0000000000000..6fb69c5a214a1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Severity.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Severity of the result (Critical, Warning, Informational, Hidden). This answers how important the result is. Critical + * is the only update-blocking severity. + */ +public final class Severity extends ExpandableStringEnum { + /** + * Static value Critical for Severity. + */ + public static final Severity CRITICAL = fromString("Critical"); + + /** + * Static value Warning for Severity. + */ + public static final Severity WARNING = fromString("Warning"); + + /** + * Static value Informational for Severity. + */ + public static final Severity INFORMATIONAL = fromString("Informational"); + + /** + * Static value Hidden for Severity. + */ + public static final Severity HIDDEN = fromString("Hidden"); + + /** + * Creates a new instance of Severity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Severity() { + } + + /** + * Creates or finds a Severity from its string representation. + * + * @param name a name to look for. + * @return the corresponding Severity. + */ + @JsonCreator + public static Severity fromString(String name) { + return fromString(name, Severity.class); + } + + /** + * Gets known Severity values. + * + * @return known Severity values. + */ + public static Collection values() { + return values(Severity.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java new file mode 100644 index 0000000000000..0afd618342cae --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Sku.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner; +import java.util.List; + +/** + * An immutable client-side representation of Sku. + */ +public interface Sku { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the publisherId property: Identifier of the Publisher for the offer. + * + * @return the publisherId value. + */ + String publisherId(); + + /** + * Gets the offerId property: Identifier of the Offer for the sku. + * + * @return the offerId value. + */ + String offerId(); + + /** + * Gets the content property: JSON serialized catalog content of the sku offer. + * + * @return the content value. + */ + String content(); + + /** + * Gets the contentVersion property: The API version of the catalog service used to serve the catalog content. + * + * @return the contentVersion value. + */ + String contentVersion(); + + /** + * Gets the skuMappings property: Array of SKU mappings. + * + * @return the skuMappings value. + */ + List skuMappings(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner object. + * + * @return the inner object. + */ + SkuInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuList.java new file mode 100644 index 0000000000000..243b02c348946 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuList.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of SKU proxy resources for the HCI cluster. + */ +@Immutable +public final class SkuList { + /* + * List of SKU proxy resources. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of SkuList class. + */ + public SkuList() { + } + + /** + * Get the value property: List of SKU proxy resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java new file mode 100644 index 0000000000000..01b90ea7f608d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SkuMappings.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * SKU Mapping details. + */ +@Fluent +public final class SkuMappings { + /* + * Identifier of the CatalogPlan for the sku + */ + @JsonProperty(value = "catalogPlanId") + private String catalogPlanId; + + /* + * Identifier for the sku + */ + @JsonProperty(value = "marketplaceSkuId") + private String marketplaceSkuId; + + /* + * Array of SKU versions available + */ + @JsonProperty(value = "marketplaceSkuVersions") + private List marketplaceSkuVersions; + + /** + * Creates an instance of SkuMappings class. + */ + public SkuMappings() { + } + + /** + * Get the catalogPlanId property: Identifier of the CatalogPlan for the sku. + * + * @return the catalogPlanId value. + */ + public String catalogPlanId() { + return this.catalogPlanId; + } + + /** + * Set the catalogPlanId property: Identifier of the CatalogPlan for the sku. + * + * @param catalogPlanId the catalogPlanId value to set. + * @return the SkuMappings object itself. + */ + public SkuMappings withCatalogPlanId(String catalogPlanId) { + this.catalogPlanId = catalogPlanId; + return this; + } + + /** + * Get the marketplaceSkuId property: Identifier for the sku. + * + * @return the marketplaceSkuId value. + */ + public String marketplaceSkuId() { + return this.marketplaceSkuId; + } + + /** + * Set the marketplaceSkuId property: Identifier for the sku. + * + * @param marketplaceSkuId the marketplaceSkuId value to set. + * @return the SkuMappings object itself. + */ + public SkuMappings withMarketplaceSkuId(String marketplaceSkuId) { + this.marketplaceSkuId = marketplaceSkuId; + return this; + } + + /** + * Get the marketplaceSkuVersions property: Array of SKU versions available. + * + * @return the marketplaceSkuVersions value. + */ + public List marketplaceSkuVersions() { + return this.marketplaceSkuVersions; + } + + /** + * Set the marketplaceSkuVersions property: Array of SKU versions available. + * + * @param marketplaceSkuVersions the marketplaceSkuVersions value to set. + * @return the SkuMappings object itself. + */ + public SkuMappings withMarketplaceSkuVersions(List marketplaceSkuVersions) { + this.marketplaceSkuVersions = marketplaceSkuVersions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java new file mode 100644 index 0000000000000..8bbe0d59885a1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Skus.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Skus. + */ +public interface Skus { + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @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 list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, + String offerName); + + /** + * List Skus available for a offer within the HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 list of SKU proxy resources for the HCI cluster as paginated response with {@link PagedIterable}. + */ + PagedIterable listByOffer(String resourceGroupName, String clusterName, String publisherName, String offerName, + String expand, Context context); + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @param expand Specify $expand=content,contentVersion to populate additional fields related to the marketplace + * offer. + * @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 sKU resource details within a offer of HCI Cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String publisherName, String offerName, + String skuName, String expand, Context context); + + /** + * Get SKU resource details within a offer of HCI Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param publisherName The name of the publisher available within HCI cluster. + * @param offerName The name of the offer available within HCI cluster. + * @param skuName The name of the SKU available within HCI cluster. + * @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 sKU resource details within a offer of HCI Cluster. + */ + Sku get(String resourceGroupName, String clusterName, String publisherName, String offerName, String skuName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java new file mode 100644 index 0000000000000..956f23b6778cc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequest.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SoftwareAssuranceChangeRequest model. + */ +@Fluent +public final class SoftwareAssuranceChangeRequest { + /* + * The properties property. + */ + @JsonProperty(value = "properties") + private SoftwareAssuranceChangeRequestProperties properties; + + /** + * Creates an instance of SoftwareAssuranceChangeRequest class. + */ + public SoftwareAssuranceChangeRequest() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public SoftwareAssuranceChangeRequestProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the SoftwareAssuranceChangeRequest object itself. + */ + public SoftwareAssuranceChangeRequest withProperties(SoftwareAssuranceChangeRequestProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java new file mode 100644 index 0000000000000..8f3b1ccf5f29f --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceChangeRequestProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SoftwareAssuranceChangeRequestProperties model. + */ +@Fluent +public final class SoftwareAssuranceChangeRequestProperties { + /* + * Customer Intent for Software Assurance Benefit. + */ + @JsonProperty(value = "softwareAssuranceIntent") + private SoftwareAssuranceIntent softwareAssuranceIntent; + + /** + * Creates an instance of SoftwareAssuranceChangeRequestProperties class. + */ + public SoftwareAssuranceChangeRequestProperties() { + } + + /** + * Get the softwareAssuranceIntent property: Customer Intent for Software Assurance Benefit. + * + * @return the softwareAssuranceIntent value. + */ + public SoftwareAssuranceIntent softwareAssuranceIntent() { + return this.softwareAssuranceIntent; + } + + /** + * Set the softwareAssuranceIntent property: Customer Intent for Software Assurance Benefit. + * + * @param softwareAssuranceIntent the softwareAssuranceIntent value to set. + * @return the SoftwareAssuranceChangeRequestProperties object itself. + */ + public SoftwareAssuranceChangeRequestProperties + withSoftwareAssuranceIntent(SoftwareAssuranceIntent softwareAssuranceIntent) { + this.softwareAssuranceIntent = softwareAssuranceIntent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java new file mode 100644 index 0000000000000..0120f1ccc0ac4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceIntent.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Customer Intent for Software Assurance Benefit. + */ +public final class SoftwareAssuranceIntent extends ExpandableStringEnum { + /** + * Static value Enable for SoftwareAssuranceIntent. + */ + public static final SoftwareAssuranceIntent ENABLE = fromString("Enable"); + + /** + * Static value Disable for SoftwareAssuranceIntent. + */ + public static final SoftwareAssuranceIntent DISABLE = fromString("Disable"); + + /** + * Creates a new instance of SoftwareAssuranceIntent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SoftwareAssuranceIntent() { + } + + /** + * Creates or finds a SoftwareAssuranceIntent from its string representation. + * + * @param name a name to look for. + * @return the corresponding SoftwareAssuranceIntent. + */ + @JsonCreator + public static SoftwareAssuranceIntent fromString(String name) { + return fromString(name, SoftwareAssuranceIntent.class); + } + + /** + * Gets known SoftwareAssuranceIntent values. + * + * @return known SoftwareAssuranceIntent values. + */ + public static Collection values() { + return values(SoftwareAssuranceIntent.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java new file mode 100644 index 0000000000000..a846748d09db5 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceProperties.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Software Assurance properties of the cluster. + */ +@Fluent +public final class SoftwareAssuranceProperties { + /* + * Status of the Software Assurance for the cluster. + */ + @JsonProperty(value = "softwareAssuranceStatus", access = JsonProperty.Access.WRITE_ONLY) + private SoftwareAssuranceStatus softwareAssuranceStatus; + + /* + * Customer Intent for Software Assurance Benefit. + */ + @JsonProperty(value = "softwareAssuranceIntent") + private SoftwareAssuranceIntent softwareAssuranceIntent; + + /* + * TimeStamp denoting the latest SA benefit applicability is validated. + */ + @JsonProperty(value = "lastUpdated", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastUpdated; + + /** + * Creates an instance of SoftwareAssuranceProperties class. + */ + public SoftwareAssuranceProperties() { + } + + /** + * Get the softwareAssuranceStatus property: Status of the Software Assurance for the cluster. + * + * @return the softwareAssuranceStatus value. + */ + public SoftwareAssuranceStatus softwareAssuranceStatus() { + return this.softwareAssuranceStatus; + } + + /** + * Get the softwareAssuranceIntent property: Customer Intent for Software Assurance Benefit. + * + * @return the softwareAssuranceIntent value. + */ + public SoftwareAssuranceIntent softwareAssuranceIntent() { + return this.softwareAssuranceIntent; + } + + /** + * Set the softwareAssuranceIntent property: Customer Intent for Software Assurance Benefit. + * + * @param softwareAssuranceIntent the softwareAssuranceIntent value to set. + * @return the SoftwareAssuranceProperties object itself. + */ + public SoftwareAssuranceProperties withSoftwareAssuranceIntent(SoftwareAssuranceIntent softwareAssuranceIntent) { + this.softwareAssuranceIntent = softwareAssuranceIntent; + return this; + } + + /** + * Get the lastUpdated property: TimeStamp denoting the latest SA benefit applicability is validated. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java new file mode 100644 index 0000000000000..a17c80135aa92 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SoftwareAssuranceStatus.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Status of the Software Assurance for the cluster. + */ +public final class SoftwareAssuranceStatus extends ExpandableStringEnum { + /** + * Static value Enabled for SoftwareAssuranceStatus. + */ + public static final SoftwareAssuranceStatus ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for SoftwareAssuranceStatus. + */ + public static final SoftwareAssuranceStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of SoftwareAssuranceStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SoftwareAssuranceStatus() { + } + + /** + * Creates or finds a SoftwareAssuranceStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SoftwareAssuranceStatus. + */ + @JsonCreator + public static SoftwareAssuranceStatus fromString(String name) { + return fromString(name, SoftwareAssuranceStatus.class); + } + + /** + * Gets known SoftwareAssuranceStatus values. + * + * @return known SoftwareAssuranceStatus values. + */ + public static Collection values() { + return values(SoftwareAssuranceStatus.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SshConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SshConfiguration.java index 7bbc1dbc3055d..157f42067566c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SshConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SshConfiguration.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** SSH configuration for Linux based VMs running on Azure. */ +/** + * SSH configuration for Linux based VMs running on Azure. + */ @Fluent public final class SshConfiguration { /* @@ -17,13 +19,15 @@ public final class SshConfiguration { @JsonProperty(value = "publicKeys") private List publicKeys; - /** Creates an instance of SshConfiguration class. */ + /** + * Creates an instance of SshConfiguration class. + */ public SshConfiguration() { } /** * Get the publicKeys property: The list of SSH public keys used to authenticate with linux based VMs. - * + * * @return the publicKeys value. */ public List publicKeys() { @@ -32,7 +36,7 @@ public List publicKeys() { /** * Set the publicKeys property: The list of SSH public keys used to authenticate with linux based VMs. - * + * * @param publicKeys the publicKeys value to set. * @return the SshConfiguration object itself. */ @@ -43,7 +47,7 @@ public SshConfiguration withPublicKeys(List publicKeys) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SshPublicKey.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SshPublicKey.java index 9f5d9a30483b3..ee0bb1fb604d3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SshPublicKey.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SshPublicKey.java @@ -13,28 +13,27 @@ @Fluent public final class SshPublicKey { /* - * Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the - * specified key is appended to the file. Example: /home/user/.ssh/authorized_keys + * Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys */ @JsonProperty(value = "path") private String path; /* - * SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit - * and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in - * Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + * SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). */ @JsonProperty(value = "keyData") private String keyData; - /** Creates an instance of SshPublicKey class. */ + /** + * Creates an instance of SshPublicKey class. + */ public SshPublicKey() { } /** * Get the path property: Specifies the full path on the created VM where ssh public key is stored. If the file * already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. - * + * * @return the path value. */ public String path() { @@ -44,7 +43,7 @@ public String path() { /** * Set the path property: Specifies the full path on the created VM where ssh public key is stored. If the file * already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys. - * + * * @param path the path value to set. * @return the SshPublicKey object itself. */ @@ -58,7 +57,7 @@ public SshPublicKey withPath(String path) { * to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys * on Linux and Mac for Linux VMs in * Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). - * + * * @return the keyData value. */ public String keyData() { @@ -70,7 +69,7 @@ public String keyData() { * to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys * on Linux and Mac for Linux VMs in * Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). - * + * * @param keyData the keyData value to set. * @return the SshPublicKey object itself. */ @@ -81,7 +80,7 @@ public SshPublicKey withKeyData(String keyData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java new file mode 100644 index 0000000000000..66beb11b79994 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/State.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * State of the update as it relates to this stamp. + */ +public final class State extends ExpandableStringEnum { + /** + * Static value HasPrerequisite for State. + */ + public static final State HAS_PREREQUISITE = fromString("HasPrerequisite"); + + /** + * Static value Obsolete for State. + */ + public static final State OBSOLETE = fromString("Obsolete"); + + /** + * Static value Ready for State. + */ + public static final State READY = fromString("Ready"); + + /** + * Static value NotApplicableBecauseAnotherUpdateIsInProgress for State. + */ + public static final State NOT_APPLICABLE_BECAUSE_ANOTHER_UPDATE_IS_IN_PROGRESS + = fromString("NotApplicableBecauseAnotherUpdateIsInProgress"); + + /** + * Static value Preparing for State. + */ + public static final State PREPARING = fromString("Preparing"); + + /** + * Static value Installing for State. + */ + public static final State INSTALLING = fromString("Installing"); + + /** + * Static value Installed for State. + */ + public static final State INSTALLED = fromString("Installed"); + + /** + * Static value PreparationFailed for State. + */ + public static final State PREPARATION_FAILED = fromString("PreparationFailed"); + + /** + * Static value InstallationFailed for State. + */ + public static final State INSTALLATION_FAILED = fromString("InstallationFailed"); + + /** + * Static value Invalid for State. + */ + public static final State INVALID = fromString("Invalid"); + + /** + * Static value Recalled for State. + */ + public static final State RECALLED = fromString("Recalled"); + + /** + * Static value Downloading for State. + */ + public static final State DOWNLOADING = fromString("Downloading"); + + /** + * Static value DownloadFailed for State. + */ + public static final State DOWNLOAD_FAILED = fromString("DownloadFailed"); + + /** + * Static value HealthChecking for State. + */ + public static final State HEALTH_CHECKING = fromString("HealthChecking"); + + /** + * Static value HealthCheckFailed for State. + */ + public static final State HEALTH_CHECK_FAILED = fromString("HealthCheckFailed"); + + /** + * Static value ReadyToInstall for State. + */ + public static final State READY_TO_INSTALL = fromString("ReadyToInstall"); + + /** + * Static value ScanInProgress for State. + */ + public static final State SCAN_IN_PROGRESS = fromString("ScanInProgress"); + + /** + * Static value ScanFailed for State. + */ + public static final State SCAN_FAILED = fromString("ScanFailed"); + + /** + * Static value AdditionalContentRequired for State. + */ + public static final State ADDITIONAL_CONTENT_REQUIRED = fromString("AdditionalContentRequired"); + + /** + * Creates a new instance of State value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public State() { + } + + /** + * Creates or finds a State from its string representation. + * + * @param name a name to look for. + * @return the corresponding State. + */ + @JsonCreator + public static State fromString(String name) { + return fromString(name, State.class); + } + + /** + * Gets known State values. + * + * @return known State values. + */ + public static Collection values() { + return values(State.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java index 28bf6efd61dfa..2f43826150b4b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Status.java @@ -8,20 +8,88 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of the operation performed on the gallery image [Succeeded, Failed, InProgress]. */ +/** + * Status of the cluster agent. + */ public final class Status extends ExpandableStringEnum { - /** Static value Succeeded for Status. */ + /** + * Static value NotYetRegistered for Status. + */ + public static final Status NOT_YET_REGISTERED = fromString("NotYetRegistered"); + + /** + * Static value ConnectedRecently for Status. + */ + public static final Status CONNECTED_RECENTLY = fromString("ConnectedRecently"); + + /** + * Static value NotConnectedRecently for Status. + */ + public static final Status NOT_CONNECTED_RECENTLY = fromString("NotConnectedRecently"); + + /** + * Static value Disconnected for Status. + */ + public static final Status DISCONNECTED = fromString("Disconnected"); + + /** + * Static value Error for Status. + */ + public static final Status ERROR = fromString("Error"); + + /** + * Static value NotSpecified for Status. + */ + public static final Status NOT_SPECIFIED = fromString("NotSpecified"); + + /** + * Static value ValidationInProgress for Status. + */ + public static final Status VALIDATION_IN_PROGRESS = fromString("ValidationInProgress"); + + /** + * Static value ValidationSuccess for Status. + */ + public static final Status VALIDATION_SUCCESS = fromString("ValidationSuccess"); + + /** + * Static value ValidationFailed for Status. + */ + public static final Status VALIDATION_FAILED = fromString("ValidationFailed"); + + /** + * Static value DeploymentInProgress for Status. + */ + public static final Status DEPLOYMENT_IN_PROGRESS = fromString("DeploymentInProgress"); + + /** + * Static value DeploymentFailed for Status. + */ + public static final Status DEPLOYMENT_FAILED = fromString("DeploymentFailed"); + + /** + * Static value DeploymentSuccess for Status. + */ + public static final Status DEPLOYMENT_SUCCESS = fromString("DeploymentSuccess"); + + /** + * Static value Succeeded for Status. + */ public static final Status SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for Status. */ + /** + * Static value Failed for Status. + */ public static final Status FAILED = fromString("Failed"); - /** Static value InProgress for Status. */ + /** + * Static value InProgress for Status. + */ public static final Status IN_PROGRESS = fromString("InProgress"); /** * Creates a new instance of Status value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +98,7 @@ public Status() { /** * Creates or finds a Status from its string representation. - * + * * @param name a name to look for. * @return the corresponding Status. */ @@ -41,7 +109,7 @@ public static Status fromString(String name) { /** * Gets known Status values. - * + * * @return known Status values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java index 961c0cb87ee50..d435d91525fa0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusLevelTypes.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The level code. */ +/** + * The level code. + */ public final class StatusLevelTypes extends ExpandableStringEnum { - /** Static value Info for StatusLevelTypes. */ + /** + * Static value Info for StatusLevelTypes. + */ public static final StatusLevelTypes INFO = fromString("Info"); - /** Static value Warning for StatusLevelTypes. */ + /** + * Static value Warning for StatusLevelTypes. + */ public static final StatusLevelTypes WARNING = fromString("Warning"); - /** Static value Error for StatusLevelTypes. */ + /** + * Static value Error for StatusLevelTypes. + */ public static final StatusLevelTypes ERROR = fromString("Error"); /** * Creates a new instance of StatusLevelTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public StatusLevelTypes() { /** * Creates or finds a StatusLevelTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding StatusLevelTypes. */ @@ -41,7 +49,7 @@ public static StatusLevelTypes fromString(String name) { /** * Gets known StatusLevelTypes values. - * + * * @return known StatusLevelTypes values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusTypes.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusTypes.java index af8474403d214..494bbb50cfc60 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusTypes.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StatusTypes.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The installation status of the hybrid machine agent installation. */ +/** + * The installation status of the hybrid machine agent installation. + */ public final class StatusTypes extends ExpandableStringEnum { - /** Static value Succeeded for StatusTypes. */ + /** + * Static value Succeeded for StatusTypes. + */ public static final StatusTypes SUCCEEDED = fromString("Succeeded"); - /** Static value InProgress for StatusTypes. */ + /** + * Static value InProgress for StatusTypes. + */ public static final StatusTypes IN_PROGRESS = fromString("InProgress"); - /** Static value Failed for StatusTypes. */ + /** + * Static value Failed for StatusTypes. + */ public static final StatusTypes FAILED = fromString("Failed"); /** * Creates a new instance of StatusTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public StatusTypes() { /** * Creates or finds a StatusTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding StatusTypes. */ @@ -41,7 +49,7 @@ public static StatusTypes fromString(String name) { /** * Gets known StatusTypes values. - * + * * @return known StatusTypes values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java new file mode 100644 index 0000000000000..f1e1ba12025d3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Storage.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Storage config of AzureStackHCI Cluster. + */ +@Fluent +public final class Storage { + /* + * By default, this mode is set to Express and your storage is configured as per best practices based on the number of nodes in the cluster. Allowed values are 'Express','InfraOnly', 'KeepStorage' + */ + @JsonProperty(value = "configurationMode") + private String configurationMode; + + /** + * Creates an instance of Storage class. + */ + public Storage() { + } + + /** + * Get the configurationMode property: By default, this mode is set to Express and your storage is configured as per + * best practices based on the number of nodes in the cluster. Allowed values are 'Express','InfraOnly', + * 'KeepStorage'. + * + * @return the configurationMode value. + */ + public String configurationMode() { + return this.configurationMode; + } + + /** + * Set the configurationMode property: By default, this mode is set to Express and your storage is configured as per + * best practices based on the number of nodes in the cluster. Allowed values are 'Express','InfraOnly', + * 'KeepStorage'. + * + * @param configurationMode the configurationMode value to set. + * @return the Storage object itself. + */ + public Storage withConfigurationMode(String configurationMode) { + this.configurationMode = configurationMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainerStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainerStatus.java index a8603a5725f33..e78008e037b30 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainerStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainerStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The observed state of storage containers. */ +/** + * The observed state of storage containers. + */ @Fluent public final class StorageContainerStatus { /* @@ -40,13 +42,15 @@ public final class StorageContainerStatus { @JsonProperty(value = "provisioningStatus") private StorageContainerStatusProvisioningStatus provisioningStatus; - /** Creates an instance of StorageContainerStatus class. */ + /** + * Creates an instance of StorageContainerStatus class. + */ public StorageContainerStatus() { } /** * Get the errorCode property: StorageContainer provisioning error code. - * + * * @return the errorCode value. */ public String errorCode() { @@ -55,7 +59,7 @@ public String errorCode() { /** * Set the errorCode property: StorageContainer provisioning error code. - * + * * @param errorCode the errorCode value to set. * @return the StorageContainerStatus object itself. */ @@ -66,7 +70,7 @@ public StorageContainerStatus withErrorCode(String errorCode) { /** * Get the errorMessage property: Descriptive error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -75,7 +79,7 @@ public String errorMessage() { /** * Set the errorMessage property: Descriptive error message. - * + * * @param errorMessage the errorMessage value to set. * @return the StorageContainerStatus object itself. */ @@ -86,7 +90,7 @@ public StorageContainerStatus withErrorMessage(String errorMessage) { /** * Get the availableSizeMB property: Amount of space available on the disk in MB. - * + * * @return the availableSizeMB value. */ public Long availableSizeMB() { @@ -95,7 +99,7 @@ public Long availableSizeMB() { /** * Set the availableSizeMB property: Amount of space available on the disk in MB. - * + * * @param availableSizeMB the availableSizeMB value to set. * @return the StorageContainerStatus object itself. */ @@ -106,7 +110,7 @@ public StorageContainerStatus withAvailableSizeMB(Long availableSizeMB) { /** * Get the containerSizeMB property: Total size of the disk in MB. - * + * * @return the containerSizeMB value. */ public Long containerSizeMB() { @@ -115,7 +119,7 @@ public Long containerSizeMB() { /** * Set the containerSizeMB property: Total size of the disk in MB. - * + * * @param containerSizeMB the containerSizeMB value to set. * @return the StorageContainerStatus object itself. */ @@ -126,7 +130,7 @@ public StorageContainerStatus withContainerSizeMB(Long containerSizeMB) { /** * Get the provisioningStatus property: The provisioningStatus property. - * + * * @return the provisioningStatus value. */ public StorageContainerStatusProvisioningStatus provisioningStatus() { @@ -135,7 +139,7 @@ public StorageContainerStatusProvisioningStatus provisioningStatus() { /** * Set the provisioningStatus property: The provisioningStatus property. - * + * * @param provisioningStatus the provisioningStatus value to set. * @return the StorageContainerStatus object itself. */ @@ -146,7 +150,7 @@ public StorageContainerStatus withProvisioningStatus(StorageContainerStatusProvi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainerStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainerStatusProvisioningStatus.java index 895cf66c5d7e5..284de7d6b7291 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainerStatusProvisioningStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainerStatusProvisioningStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The StorageContainerStatusProvisioningStatus model. */ +/** + * The StorageContainerStatusProvisioningStatus model. + */ @Fluent public final class StorageContainerStatusProvisioningStatus { /* @@ -22,13 +24,15 @@ public final class StorageContainerStatusProvisioningStatus { @JsonProperty(value = "status") private Status status; - /** Creates an instance of StorageContainerStatusProvisioningStatus class. */ + /** + * Creates an instance of StorageContainerStatusProvisioningStatus class. + */ public StorageContainerStatusProvisioningStatus() { } /** * Get the operationId property: The ID of the operation performed on the storage container. - * + * * @return the operationId value. */ public String operationId() { @@ -37,7 +41,7 @@ public String operationId() { /** * Set the operationId property: The ID of the operation performed on the storage container. - * + * * @param operationId the operationId value to set. * @return the StorageContainerStatusProvisioningStatus object itself. */ @@ -49,7 +53,7 @@ public StorageContainerStatusProvisioningStatus withOperationId(String operation /** * Get the status property: The status of the operation performed on the storage container [Succeeded, Failed, * InProgress]. - * + * * @return the status value. */ public Status status() { @@ -59,7 +63,7 @@ public Status status() { /** * Set the status property: The status of the operation performed on the storage container [Succeeded, Failed, * InProgress]. - * + * * @param status the status value to set. * @return the StorageContainerStatusProvisioningStatus object itself. */ @@ -70,7 +74,7 @@ public StorageContainerStatusProvisioningStatus withStatus(Status status) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainers.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainers.java index 52560f11a3421..5c703074eb368 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainers.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainers.java @@ -10,125 +10,132 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.StorageContainersInner; import java.util.Map; -/** An immutable client-side representation of StorageContainers. */ +/** + * An immutable client-side representation of StorageContainers. + */ public interface StorageContainers { /** * 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 tags(); /** * Gets the extendedLocation property: The extendedLocation of 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 path property: Path of the storage container on the disk. - * + * * @return the path value. */ String path(); /** * Gets the provisioningState property: Provisioning state of the storage container. - * + * * @return the provisioningState value. */ ProvisioningStateEnum provisioningState(); /** * Gets the status property: The observed state of storage containers. - * + * * @return the status value. */ StorageContainerStatus status(); /** * 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.azurestackhci.fluent.models.StorageContainersInner object. - * + * * @return the inner object. */ StorageContainersInner innerModel(); - /** The entirety of the StorageContainers definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the StorageContainers definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The StorageContainers definition stages. */ + /** + * The StorageContainers definition stages. + */ interface DefinitionStages { - /** The first stage of the StorageContainers definition. */ + /** + * The first stage of the StorageContainers definition. + */ interface Blank extends WithLocation { } - /** The stage of the StorageContainers definition allowing to specify location. */ + /** + * The stage of the StorageContainers 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. */ @@ -136,18 +143,20 @@ interface WithLocation { /** * 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 StorageContainers definition allowing to specify parent resource. */ + /** + * The stage of the StorageContainers 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. */ @@ -162,47 +171,53 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, DefinitionStages.WithPath { /** * Executes the create request. - * + * * @return the created resource. */ StorageContainers create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ StorageContainers create(Context context); } - /** The stage of the StorageContainers definition allowing to specify tags. */ + /** + * The stage of the StorageContainers 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 tags); } - /** The stage of the StorageContainers definition allowing to specify extendedLocation. */ + /** + * The stage of the StorageContainers definition allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The extendedLocation of the resource.. - * + * * @param extendedLocation The extendedLocation of the resource. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the StorageContainers definition allowing to specify path. */ + /** + * The stage of the StorageContainers definition allowing to specify path. + */ interface WithPath { /** * Specifies the path property: Path of the storage container on the disk. - * + * * @param path Path of the storage container on the disk. * @return the next definition stage. */ @@ -212,36 +227,42 @@ interface WithPath { /** * Begins update for the StorageContainers resource. - * + * * @return the stage of resource update. */ StorageContainers.Update update(); - /** The template for StorageContainers update. */ + /** + * The template for StorageContainers update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ StorageContainers apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ StorageContainers apply(Context context); } - /** The StorageContainers update stages. */ + /** + * The StorageContainers update stages. + */ interface UpdateStages { - /** The stage of the StorageContainers update allowing to specify tags. */ + /** + * The stage of the StorageContainers update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -251,14 +272,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ StorageContainers refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersListResult.java index 48abe2a4e5c6c..89cdcee3675da 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The StorageContainersListResult model. */ +/** + * The StorageContainersListResult model. + */ @Fluent public final class StorageContainersListResult { /* @@ -24,13 +26,15 @@ public final class StorageContainersListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of StorageContainersListResult class. */ + /** + * Creates an instance of StorageContainersListResult class. + */ public StorageContainersListResult() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the StorageContainersListResult object itself. */ @@ -50,7 +54,7 @@ public StorageContainersListResult withValue(List value) /** * Get the nextLink property: The nextLink property. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: The nextLink property. - * + * * @param nextLink the nextLink value to set. * @return the StorageContainersListResult object itself. */ @@ -70,7 +74,7 @@ public StorageContainersListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersOperations.java index ae754fde86a59..81970d075ceb2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersOperations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersOperations.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of StorageContainersOperations. */ +/** + * Resource collection API of StorageContainersOperations. + */ public interface StorageContainersOperations { /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -21,12 +23,12 @@ public interface StorageContainersOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a storage container along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String storageContainerName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String storageContainerName, + Context context); /** * Gets a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +51,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a storage container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageContainerName Name of the storage container. * @param context The context to associate with this operation. @@ -62,7 +64,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,7 +76,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the storage containers in the specified resource group. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +89,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @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 paginated response with {@link PagedIterable}. @@ -97,7 +99,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the storage containers in the specified subscription. Use the nextLink property in the response to * get the next page of storage containers. - * + * * @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. @@ -108,7 +110,7 @@ Response getByResourceGroupWithResponse( /** * Gets a storage container. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,7 +121,7 @@ Response getByResourceGroupWithResponse( /** * Gets a storage container. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +133,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a storage container. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,7 +143,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a storage container. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +154,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new StorageContainers resource. - * + * * @param name resource name. * @return the first stage of the new StorageContainers definition. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersUpdateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersUpdateRequest.java index 90a85e3dce0c1..425ed6904bd3f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersUpdateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageContainersUpdateRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The storage container resource patch definition. */ +/** + * The storage container resource patch definition. + */ @Fluent public final class StorageContainersUpdateRequest { /* @@ -19,13 +21,15 @@ public final class StorageContainersUpdateRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of StorageContainersUpdateRequest class. */ + /** + * Creates an instance of StorageContainersUpdateRequest class. + */ public StorageContainersUpdateRequest() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the StorageContainersUpdateRequest object itself. */ @@ -45,7 +49,7 @@ public StorageContainersUpdateRequest withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageNetworks.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageNetworks.java new file mode 100644 index 0000000000000..5c5c3d5200328 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageNetworks.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The StorageNetworks of a cluster. + */ +@Fluent +public final class StorageNetworks { + /* + * Name of the storage network. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Name of the storage network adapter. + */ + @JsonProperty(value = "networkAdapterName") + private String networkAdapterName; + + /* + * ID specified for the VLAN storage network. This setting is applied to the network interfaces that route the storage and VM migration traffic. + */ + @JsonProperty(value = "vlanId") + private String vlanId; + + /** + * Creates an instance of StorageNetworks class. + */ + public StorageNetworks() { + } + + /** + * Get the name property: Name of the storage network. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the storage network. + * + * @param name the name value to set. + * @return the StorageNetworks object itself. + */ + public StorageNetworks withName(String name) { + this.name = name; + return this; + } + + /** + * Get the networkAdapterName property: Name of the storage network adapter. + * + * @return the networkAdapterName value. + */ + public String networkAdapterName() { + return this.networkAdapterName; + } + + /** + * Set the networkAdapterName property: Name of the storage network adapter. + * + * @param networkAdapterName the networkAdapterName value to set. + * @return the StorageNetworks object itself. + */ + public StorageNetworks withNetworkAdapterName(String networkAdapterName) { + this.networkAdapterName = networkAdapterName; + return this; + } + + /** + * Get the vlanId property: ID specified for the VLAN storage network. This setting is applied to the network + * interfaces that route the storage and VM migration traffic. + * + * @return the vlanId value. + */ + public String vlanId() { + return this.vlanId; + } + + /** + * Set the vlanId property: ID specified for the VLAN storage network. This setting is applied to the network + * interfaces that route the storage and VM migration traffic. + * + * @param vlanId the vlanId value to set. + * @return the StorageNetworks object itself. + */ + public StorageNetworks withVlanId(String vlanId) { + this.vlanId = vlanId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfileUpdate.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfileUpdate.java index 16dbf2a6ecace..1f9d30c0c560c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfileUpdate.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/StorageProfileUpdate.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The StorageProfileUpdate model. */ +/** + * The StorageProfileUpdate model. + */ @Fluent public final class StorageProfileUpdate { /* @@ -17,13 +19,15 @@ public final class StorageProfileUpdate { @JsonProperty(value = "dataDisks") private List dataDisks; - /** Creates an instance of StorageProfileUpdate class. */ + /** + * Creates an instance of StorageProfileUpdate class. + */ public StorageProfileUpdate() { } /** * Get the dataDisks property: adds data disks to the virtual machine instance for the update call. - * + * * @return the dataDisks value. */ public List dataDisks() { @@ -32,7 +36,7 @@ public List dataDisks() { /** * Set the dataDisks property: adds data disks to the virtual machine instance for the update call. - * + * * @param dataDisks the dataDisks value to set. * @return the StorageProfileUpdate object itself. */ @@ -43,7 +47,7 @@ public StorageProfileUpdate withDataDisks(List addressPrefixes() { @@ -94,7 +97,7 @@ public List addressPrefixes() { /** * Set the addressPrefixes property: List of address prefixes for the subnet. - * + * * @param addressPrefixes the addressPrefixes value to set. * @return the Subnet object itself. */ @@ -109,7 +112,7 @@ public Subnet withAddressPrefixes(List addressPrefixes) { /** * Get the ipAllocationMethod property: IPAllocationMethod - The IP address allocation method. Possible values * include: 'Static', 'Dynamic'. - * + * * @return the ipAllocationMethod value. */ public IpAllocationMethodEnum ipAllocationMethod() { @@ -119,7 +122,7 @@ public IpAllocationMethodEnum ipAllocationMethod() { /** * Set the ipAllocationMethod property: IPAllocationMethod - The IP address allocation method. Possible values * include: 'Static', 'Dynamic'. - * + * * @param ipAllocationMethod the ipAllocationMethod value to set. * @return the Subnet object itself. */ @@ -133,7 +136,7 @@ public Subnet withIpAllocationMethod(IpAllocationMethodEnum ipAllocationMethod) /** * Get the ipConfigurationReferences property: IPConfigurationReferences - list of IPConfigurationReferences. - * + * * @return the ipConfigurationReferences value. */ public List ipConfigurationReferences() { @@ -142,7 +145,7 @@ public List ipConfiguration /** * Set the ipConfigurationReferences property: IPConfigurationReferences - list of IPConfigurationReferences. - * + * * @param ipConfigurationReferences the ipConfigurationReferences value to set. * @return the Subnet object itself. */ @@ -157,7 +160,7 @@ public Subnet withIpConfigurationReferences( /** * Get the routeTable property: Route table resource. - * + * * @return the routeTable value. */ public RouteTable routeTable() { @@ -166,7 +169,7 @@ public RouteTable routeTable() { /** * Set the routeTable property: Route table resource. - * + * * @param routeTable the routeTable value to set. * @return the Subnet object itself. */ @@ -180,7 +183,7 @@ public Subnet withRouteTable(RouteTable routeTable) { /** * Get the ipPools property: network associated pool of IP Addresses. - * + * * @return the ipPools value. */ public List ipPools() { @@ -189,7 +192,7 @@ public List ipPools() { /** * Set the ipPools property: network associated pool of IP Addresses. - * + * * @param ipPools the ipPools value to set. * @return the Subnet object itself. */ @@ -203,7 +206,7 @@ public Subnet withIpPools(List ipPools) { /** * Get the vlan property: Vlan to use for the subnet. - * + * * @return the vlan value. */ public Integer vlan() { @@ -212,7 +215,7 @@ public Integer vlan() { /** * Set the vlan property: Vlan to use for the subnet. - * + * * @param vlan the vlan value to set. * @return the Subnet object itself. */ @@ -226,7 +229,7 @@ public Subnet withVlan(Integer vlan) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SubnetPropertiesFormatIpConfigurationReferencesItem.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SubnetPropertiesFormatIpConfigurationReferencesItem.java index d9ab517dca3d9..59b7aecdb90a7 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SubnetPropertiesFormatIpConfigurationReferencesItem.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/SubnetPropertiesFormatIpConfigurationReferencesItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** IPConfigurationReference - Describes a IPConfiguration under the virtual network. */ +/** + * IPConfigurationReference - Describes a IPConfiguration under the virtual network. + */ @Fluent public final class SubnetPropertiesFormatIpConfigurationReferencesItem { /* @@ -16,13 +18,15 @@ public final class SubnetPropertiesFormatIpConfigurationReferencesItem { @JsonProperty(value = "ID") private String id; - /** Creates an instance of SubnetPropertiesFormatIpConfigurationReferencesItem class. */ + /** + * Creates an instance of SubnetPropertiesFormatIpConfigurationReferencesItem class. + */ public SubnetPropertiesFormatIpConfigurationReferencesItem() { } /** * Get the id property: IPConfigurationID. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: IPConfigurationID. - * + * * @param id the id value to set. * @return the SubnetPropertiesFormatIpConfigurationReferencesItem object itself. */ @@ -42,7 +46,7 @@ public SubnetPropertiesFormatIpConfigurationReferencesItem withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateList.java new file mode 100644 index 0000000000000..fedf73cdde65b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of Updates. + */ +@Fluent +public final class UpdateList { + /* + * List of Updates + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of UpdateList class. + */ + public UpdateList() { + } + + /** + * Get the value property: List of Updates. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of Updates. + * + * @param value the value value to set. + * @return the UpdateList object itself. + */ + public UpdateList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java new file mode 100644 index 0000000000000..2ce086fe8412c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdatePrerequisite.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * If update State is HasPrerequisite, this property contains an array of objects describing prerequisite updates before + * installing this update. Otherwise, it is empty. + */ +@Fluent +public final class UpdatePrerequisite { + /* + * Updatable component type. + */ + @JsonProperty(value = "updateType") + private String updateType; + + /* + * Version of the prerequisite. + */ + @JsonProperty(value = "version") + private String version; + + /* + * Friendly name of the prerequisite. + */ + @JsonProperty(value = "packageName") + private String packageName; + + /** + * Creates an instance of UpdatePrerequisite class. + */ + public UpdatePrerequisite() { + } + + /** + * Get the updateType property: Updatable component type. + * + * @return the updateType value. + */ + public String updateType() { + return this.updateType; + } + + /** + * Set the updateType property: Updatable component type. + * + * @param updateType the updateType value to set. + * @return the UpdatePrerequisite object itself. + */ + public UpdatePrerequisite withUpdateType(String updateType) { + this.updateType = updateType; + return this; + } + + /** + * Get the version property: Version of the prerequisite. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the prerequisite. + * + * @param version the version value to set. + * @return the UpdatePrerequisite object itself. + */ + public UpdatePrerequisite withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the packageName property: Friendly name of the prerequisite. + * + * @return the packageName value. + */ + public String packageName() { + return this.packageName; + } + + /** + * Set the packageName property: Friendly name of the prerequisite. + * + * @param packageName the packageName value to set. + * @return the UpdatePrerequisite object itself. + */ + public UpdatePrerequisite withPackageName(String packageName) { + this.packageName = packageName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java new file mode 100644 index 0000000000000..4d163de757e24 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRun.java @@ -0,0 +1,618 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.Step; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of UpdateRun. + */ +public interface UpdateRun { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the UpdateRuns proxy resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the timeStarted property: Timestamp of the update run was started. + * + * @return the timeStarted value. + */ + OffsetDateTime timeStarted(); + + /** + * Gets the lastUpdatedTime property: Timestamp of the most recently completed step in the update run. + * + * @return the lastUpdatedTime value. + */ + OffsetDateTime lastUpdatedTime(); + + /** + * Gets the duration property: Duration of the update run. + * + * @return the duration value. + */ + String duration(); + + /** + * Gets the state property: State of the update run. + * + * @return the state value. + */ + UpdateRunPropertiesState state(); + + /** + * Gets the namePropertiesName property: Name of the step. + * + * @return the namePropertiesName value. + */ + String namePropertiesName(); + + /** + * Gets the description property: More detailed description of the step. + * + * @return the description value. + */ + String description(); + + /** + * Gets the errorMessage property: Error message, specified if the step is in a failed state. + * + * @return the errorMessage value. + */ + String errorMessage(); + + /** + * Gets the status property: Status of the step, bubbled up from the ECE action plan for installation attempts. + * Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * + * @return the status value. + */ + String status(); + + /** + * Gets the startTimeUtc property: When the step started, or empty if it has not started executing. + * + * @return the startTimeUtc value. + */ + OffsetDateTime startTimeUtc(); + + /** + * Gets the endTimeUtc property: When the step reached a terminal state. + * + * @return the endTimeUtc value. + */ + OffsetDateTime endTimeUtc(); + + /** + * Gets the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step. + * + * @return the lastUpdatedTimeUtc value. + */ + OffsetDateTime lastUpdatedTimeUtc(); + + /** + * Gets the steps property: Recursive model for child steps of this step. + * + * @return the steps value. + */ + List steps(); + + /** + * 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.azurestackhci.fluent.models.UpdateRunInner object. + * + * @return the inner object. + */ + UpdateRunInner innerModel(); + + /** + * The entirety of the UpdateRun definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The UpdateRun definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the UpdateRun definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the UpdateRun definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, clusterName, updateName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @return the next definition stage. + */ + WithCreate withExistingUpdate(String resourceGroupName, String clusterName, String updateName); + } + + /** + * The stage of the UpdateRun 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.WithTimeStarted, + DefinitionStages.WithLastUpdatedTime, DefinitionStages.WithDuration, DefinitionStages.WithState, + DefinitionStages.WithNamePropertiesName, DefinitionStages.WithDescription, + DefinitionStages.WithErrorMessage, DefinitionStages.WithStatus, DefinitionStages.WithStartTimeUtc, + DefinitionStages.WithEndTimeUtc, DefinitionStages.WithLastUpdatedTimeUtc, DefinitionStages.WithSteps { + /** + * Executes the create request. + * + * @return the created resource. + */ + UpdateRun create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + UpdateRun create(Context context); + } + + /** + * The stage of the UpdateRun 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. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + + /** + * The stage of the UpdateRun definition allowing to specify timeStarted. + */ + interface WithTimeStarted { + /** + * Specifies the timeStarted property: Timestamp of the update run was started.. + * + * @param timeStarted Timestamp of the update run was started. + * @return the next definition stage. + */ + WithCreate withTimeStarted(OffsetDateTime timeStarted); + } + + /** + * The stage of the UpdateRun definition allowing to specify lastUpdatedTime. + */ + interface WithLastUpdatedTime { + /** + * Specifies the lastUpdatedTime property: Timestamp of the most recently completed step in the update run.. + * + * @param lastUpdatedTime Timestamp of the most recently completed step in the update run. + * @return the next definition stage. + */ + WithCreate withLastUpdatedTime(OffsetDateTime lastUpdatedTime); + } + + /** + * The stage of the UpdateRun definition allowing to specify duration. + */ + interface WithDuration { + /** + * Specifies the duration property: Duration of the update run.. + * + * @param duration Duration of the update run. + * @return the next definition stage. + */ + WithCreate withDuration(String duration); + } + + /** + * The stage of the UpdateRun definition allowing to specify state. + */ + interface WithState { + /** + * Specifies the state property: State of the update run.. + * + * @param state State of the update run. + * @return the next definition stage. + */ + WithCreate withState(UpdateRunPropertiesState state); + } + + /** + * The stage of the UpdateRun definition allowing to specify namePropertiesName. + */ + interface WithNamePropertiesName { + /** + * Specifies the namePropertiesName property: Name of the step.. + * + * @param namePropertiesName Name of the step. + * @return the next definition stage. + */ + WithCreate withNamePropertiesName(String namePropertiesName); + } + + /** + * The stage of the UpdateRun definition allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: More detailed description of the step.. + * + * @param description More detailed description of the step. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + + /** + * The stage of the UpdateRun definition allowing to specify errorMessage. + */ + interface WithErrorMessage { + /** + * Specifies the errorMessage property: Error message, specified if the step is in a failed state.. + * + * @param errorMessage Error message, specified if the step is in a failed state. + * @return the next definition stage. + */ + WithCreate withErrorMessage(String errorMessage); + } + + /** + * The stage of the UpdateRun definition allowing to specify status. + */ + interface WithStatus { + /** + * Specifies the status property: Status of the step, bubbled up from the ECE action plan for installation + * attempts. Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'.. + * + * @param status Status of the step, bubbled up from the ECE action plan for installation attempts. Values + * are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * @return the next definition stage. + */ + WithCreate withStatus(String status); + } + + /** + * The stage of the UpdateRun definition allowing to specify startTimeUtc. + */ + interface WithStartTimeUtc { + /** + * Specifies the startTimeUtc property: When the step started, or empty if it has not started executing.. + * + * @param startTimeUtc When the step started, or empty if it has not started executing. + * @return the next definition stage. + */ + WithCreate withStartTimeUtc(OffsetDateTime startTimeUtc); + } + + /** + * The stage of the UpdateRun definition allowing to specify endTimeUtc. + */ + interface WithEndTimeUtc { + /** + * Specifies the endTimeUtc property: When the step reached a terminal state.. + * + * @param endTimeUtc When the step reached a terminal state. + * @return the next definition stage. + */ + WithCreate withEndTimeUtc(OffsetDateTime endTimeUtc); + } + + /** + * The stage of the UpdateRun definition allowing to specify lastUpdatedTimeUtc. + */ + interface WithLastUpdatedTimeUtc { + /** + * Specifies the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step.. + * + * @param lastUpdatedTimeUtc Completion time of this step or the last completed sub-step. + * @return the next definition stage. + */ + WithCreate withLastUpdatedTimeUtc(OffsetDateTime lastUpdatedTimeUtc); + } + + /** + * The stage of the UpdateRun definition allowing to specify steps. + */ + interface WithSteps { + /** + * Specifies the steps property: Recursive model for child steps of this step.. + * + * @param steps Recursive model for child steps of this step. + * @return the next definition stage. + */ + WithCreate withSteps(List steps); + } + } + + /** + * Begins update for the UpdateRun resource. + * + * @return the stage of resource update. + */ + UpdateRun.Update update(); + + /** + * The template for UpdateRun update. + */ + interface Update extends UpdateStages.WithTimeStarted, UpdateStages.WithLastUpdatedTime, UpdateStages.WithDuration, + UpdateStages.WithState, UpdateStages.WithNamePropertiesName, UpdateStages.WithDescription, + UpdateStages.WithErrorMessage, UpdateStages.WithStatus, UpdateStages.WithStartTimeUtc, + UpdateStages.WithEndTimeUtc, UpdateStages.WithLastUpdatedTimeUtc, UpdateStages.WithSteps { + /** + * Executes the update request. + * + * @return the updated resource. + */ + UpdateRun apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + UpdateRun apply(Context context); + } + + /** + * The UpdateRun update stages. + */ + interface UpdateStages { + /** + * The stage of the UpdateRun update allowing to specify timeStarted. + */ + interface WithTimeStarted { + /** + * Specifies the timeStarted property: Timestamp of the update run was started.. + * + * @param timeStarted Timestamp of the update run was started. + * @return the next definition stage. + */ + Update withTimeStarted(OffsetDateTime timeStarted); + } + + /** + * The stage of the UpdateRun update allowing to specify lastUpdatedTime. + */ + interface WithLastUpdatedTime { + /** + * Specifies the lastUpdatedTime property: Timestamp of the most recently completed step in the update run.. + * + * @param lastUpdatedTime Timestamp of the most recently completed step in the update run. + * @return the next definition stage. + */ + Update withLastUpdatedTime(OffsetDateTime lastUpdatedTime); + } + + /** + * The stage of the UpdateRun update allowing to specify duration. + */ + interface WithDuration { + /** + * Specifies the duration property: Duration of the update run.. + * + * @param duration Duration of the update run. + * @return the next definition stage. + */ + Update withDuration(String duration); + } + + /** + * The stage of the UpdateRun update allowing to specify state. + */ + interface WithState { + /** + * Specifies the state property: State of the update run.. + * + * @param state State of the update run. + * @return the next definition stage. + */ + Update withState(UpdateRunPropertiesState state); + } + + /** + * The stage of the UpdateRun update allowing to specify namePropertiesName. + */ + interface WithNamePropertiesName { + /** + * Specifies the namePropertiesName property: Name of the step.. + * + * @param namePropertiesName Name of the step. + * @return the next definition stage. + */ + Update withNamePropertiesName(String namePropertiesName); + } + + /** + * The stage of the UpdateRun update allowing to specify description. + */ + interface WithDescription { + /** + * Specifies the description property: More detailed description of the step.. + * + * @param description More detailed description of the step. + * @return the next definition stage. + */ + Update withDescription(String description); + } + + /** + * The stage of the UpdateRun update allowing to specify errorMessage. + */ + interface WithErrorMessage { + /** + * Specifies the errorMessage property: Error message, specified if the step is in a failed state.. + * + * @param errorMessage Error message, specified if the step is in a failed state. + * @return the next definition stage. + */ + Update withErrorMessage(String errorMessage); + } + + /** + * The stage of the UpdateRun update allowing to specify status. + */ + interface WithStatus { + /** + * Specifies the status property: Status of the step, bubbled up from the ECE action plan for installation + * attempts. Values are: 'Success', 'Error', 'InProgress', and 'Unknown status'.. + * + * @param status Status of the step, bubbled up from the ECE action plan for installation attempts. Values + * are: 'Success', 'Error', 'InProgress', and 'Unknown status'. + * @return the next definition stage. + */ + Update withStatus(String status); + } + + /** + * The stage of the UpdateRun update allowing to specify startTimeUtc. + */ + interface WithStartTimeUtc { + /** + * Specifies the startTimeUtc property: When the step started, or empty if it has not started executing.. + * + * @param startTimeUtc When the step started, or empty if it has not started executing. + * @return the next definition stage. + */ + Update withStartTimeUtc(OffsetDateTime startTimeUtc); + } + + /** + * The stage of the UpdateRun update allowing to specify endTimeUtc. + */ + interface WithEndTimeUtc { + /** + * Specifies the endTimeUtc property: When the step reached a terminal state.. + * + * @param endTimeUtc When the step reached a terminal state. + * @return the next definition stage. + */ + Update withEndTimeUtc(OffsetDateTime endTimeUtc); + } + + /** + * The stage of the UpdateRun update allowing to specify lastUpdatedTimeUtc. + */ + interface WithLastUpdatedTimeUtc { + /** + * Specifies the lastUpdatedTimeUtc property: Completion time of this step or the last completed sub-step.. + * + * @param lastUpdatedTimeUtc Completion time of this step or the last completed sub-step. + * @return the next definition stage. + */ + Update withLastUpdatedTimeUtc(OffsetDateTime lastUpdatedTimeUtc); + } + + /** + * The stage of the UpdateRun update allowing to specify steps. + */ + interface WithSteps { + /** + * Specifies the steps property: Recursive model for child steps of this step.. + * + * @param steps Recursive model for child steps of this step. + * @return the next definition stage. + */ + Update withSteps(List steps); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + UpdateRun refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + UpdateRun refresh(Context context); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunList.java new file mode 100644 index 0000000000000..879907f6531e2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of Update runs. + */ +@Fluent +public final class UpdateRunList { + /* + * List of Update runs + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of UpdateRunList class. + */ + public UpdateRunList() { + } + + /** + * Get the value property: List of Update runs. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of Update runs. + * + * @param value the value value to set. + * @return the UpdateRunList object itself. + */ + public UpdateRunList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java new file mode 100644 index 0000000000000..cac736e3463b1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRunPropertiesState.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * State of the update run. + */ +public final class UpdateRunPropertiesState extends ExpandableStringEnum { + /** + * Static value Unknown for UpdateRunPropertiesState. + */ + public static final UpdateRunPropertiesState UNKNOWN = fromString("Unknown"); + + /** + * Static value Succeeded for UpdateRunPropertiesState. + */ + public static final UpdateRunPropertiesState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value InProgress for UpdateRunPropertiesState. + */ + public static final UpdateRunPropertiesState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Failed for UpdateRunPropertiesState. + */ + public static final UpdateRunPropertiesState FAILED = fromString("Failed"); + + /** + * Creates a new instance of UpdateRunPropertiesState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpdateRunPropertiesState() { + } + + /** + * Creates or finds a UpdateRunPropertiesState from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpdateRunPropertiesState. + */ + @JsonCreator + public static UpdateRunPropertiesState fromString(String name) { + return fromString(name, UpdateRunPropertiesState.class); + } + + /** + * Gets known UpdateRunPropertiesState values. + * + * @return known UpdateRunPropertiesState values. + */ + public static Collection values() { + return values(UpdateRunPropertiesState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java new file mode 100644 index 0000000000000..d64b5d6cb32d8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateRuns.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of UpdateRuns. + */ +public interface UpdateRuns { + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 list of Update runs as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, String updateName); + + /** + * List all Update runs for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 list of Update runs as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, String updateName, Context context); + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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 delete(String resourceGroupName, String clusterName, String updateName, String updateRunName); + + /** + * Delete specified Update Run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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 delete(String resourceGroupName, String clusterName, String updateName, String updateRunName, Context context); + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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 Update run for a specified update along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + String updateRunName, Context context); + + /** + * Get the Update run for a specified update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @param updateRunName The name of the Update Run. + * @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 Update run for a specified update. + */ + UpdateRun get(String resourceGroupName, String clusterName, String updateName, String updateRunName); + + /** + * Get the Update run for a specified update. + * + * @param id the resource ID. + * @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 Update run for a specified update along with {@link Response}. + */ + UpdateRun getById(String id); + + /** + * Get the Update run for a specified update. + * + * @param id the resource ID. + * @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 Update run for a specified update along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete specified Update Run. + * + * @param id the resource ID. + * @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 deleteById(String id); + + /** + * Delete specified Update Run. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new UpdateRun resource. + * + * @param name resource name. + * @return the first stage of the new UpdateRun definition. + */ + UpdateRun.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java new file mode 100644 index 0000000000000..8e4b4f3b2d556 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummaries.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * An immutable client-side representation of UpdateSummaries. + */ +public interface UpdateSummaries { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the UpdateSummaries proxy resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the oemFamily property: OEM family name. + * + * @return the oemFamily value. + */ + String oemFamily(); + + /** + * Gets the hardwareModel property: Name of the hardware model. + * + * @return the hardwareModel value. + */ + String hardwareModel(); + + /** + * Gets the packageVersions property: Current version of each updatable component. + * + * @return the packageVersions value. + */ + List packageVersions(); + + /** + * Gets the currentVersion property: Current Solution Bundle version of the stamp. + * + * @return the currentVersion value. + */ + String currentVersion(); + + /** + * Gets the lastUpdated property: Last time an update installation completed successfully. + * + * @return the lastUpdated value. + */ + OffsetDateTime lastUpdated(); + + /** + * Gets the lastChecked property: Last time the update service successfully checked for updates. + * + * @return the lastChecked value. + */ + OffsetDateTime lastChecked(); + + /** + * Gets the healthState property: Overall health state for update-specific health checks. + * + * @return the healthState value. + */ + HealthState healthState(); + + /** + * Gets the healthCheckResult property: An array of pre-check result objects. + * + * @return the healthCheckResult value. + */ + List healthCheckResult(); + + /** + * Gets the healthCheckDate property: Last time the package-specific checks were run. + * + * @return the healthCheckDate value. + */ + OffsetDateTime healthCheckDate(); + + /** + * Gets the state property: Overall update state of the stamp. + * + * @return the state value. + */ + UpdateSummariesPropertiesState state(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner object. + * + * @return the inner object. + */ + UpdateSummariesInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesList.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesList.java new file mode 100644 index 0000000000000..62e762a815a47 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of Update Summaries. + */ +@Fluent +public final class UpdateSummariesList { + /* + * List of Update Summaries + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to the next set of results. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of UpdateSummariesList class. + */ + public UpdateSummariesList() { + } + + /** + * Get the value property: List of Update Summaries. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of Update Summaries. + * + * @param value the value value to set. + * @return the UpdateSummariesList object itself. + */ + public UpdateSummariesList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java new file mode 100644 index 0000000000000..fe6b024f97990 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesOperations.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; + +/** + * Resource collection API of UpdateSummariesOperations. + */ +public interface UpdateSummariesOperations { + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Update Summaries as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * List all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Update Summaries as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 deleteByResourceGroup(String resourceGroupName, String clusterName); + + /** + * Delete Update Summaries. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 delete(String resourceGroupName, String clusterName, Context context); + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @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 get the update summaries for the cluster along with {@link Response}. + */ + Response putWithResponse(String resourceGroupName, String clusterName, + UpdateSummariesInner updateLocationProperties, Context context); + + /** + * Put Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateLocationProperties Properties of the UpdateSummaries resource. + * @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 get the update summaries for the cluster. + */ + UpdateSummaries put(String resourceGroupName, String clusterName, UpdateSummariesInner updateLocationProperties); + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 all Update summaries under the HCI cluster along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, Context context); + + /** + * Get all Update summaries under the HCI cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 all Update summaries under the HCI cluster. + */ + UpdateSummaries get(String resourceGroupName, String clusterName); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java new file mode 100644 index 0000000000000..48b5a77115ecc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UpdateSummariesPropertiesState.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Overall update state of the stamp. + */ +public final class UpdateSummariesPropertiesState extends ExpandableStringEnum { + /** + * Static value Unknown for UpdateSummariesPropertiesState. + */ + public static final UpdateSummariesPropertiesState UNKNOWN = fromString("Unknown"); + + /** + * Static value AppliedSuccessfully for UpdateSummariesPropertiesState. + */ + public static final UpdateSummariesPropertiesState APPLIED_SUCCESSFULLY = fromString("AppliedSuccessfully"); + + /** + * Static value UpdateAvailable for UpdateSummariesPropertiesState. + */ + public static final UpdateSummariesPropertiesState UPDATE_AVAILABLE = fromString("UpdateAvailable"); + + /** + * Static value UpdateInProgress for UpdateSummariesPropertiesState. + */ + public static final UpdateSummariesPropertiesState UPDATE_IN_PROGRESS = fromString("UpdateInProgress"); + + /** + * Static value UpdateFailed for UpdateSummariesPropertiesState. + */ + public static final UpdateSummariesPropertiesState UPDATE_FAILED = fromString("UpdateFailed"); + + /** + * Static value NeedsAttention for UpdateSummariesPropertiesState. + */ + public static final UpdateSummariesPropertiesState NEEDS_ATTENTION = fromString("NeedsAttention"); + + /** + * Static value PreparationInProgress for UpdateSummariesPropertiesState. + */ + public static final UpdateSummariesPropertiesState PREPARATION_IN_PROGRESS = fromString("PreparationInProgress"); + + /** + * Static value PreparationFailed for UpdateSummariesPropertiesState. + */ + public static final UpdateSummariesPropertiesState PREPARATION_FAILED = fromString("PreparationFailed"); + + /** + * Creates a new instance of UpdateSummariesPropertiesState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpdateSummariesPropertiesState() { + } + + /** + * Creates or finds a UpdateSummariesPropertiesState from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpdateSummariesPropertiesState. + */ + @JsonCreator + public static UpdateSummariesPropertiesState fromString(String name) { + return fromString(name, UpdateSummariesPropertiesState.class); + } + + /** + * Gets known UpdateSummariesPropertiesState values. + * + * @return known UpdateSummariesPropertiesState values. + */ + public static Collection values() { + return values(UpdateSummariesPropertiesState.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java new file mode 100644 index 0000000000000..39a3f88aa24ad --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/Updates.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Updates. + */ +public interface Updates { + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 post(String resourceGroupName, String clusterName, String updateName); + + /** + * Apply Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 post(String resourceGroupName, String clusterName, String updateName, Context context); + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Updates as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName); + + /** + * List all Updates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @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 list of Updates as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterName, Context context); + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 delete(String resourceGroupName, String clusterName, String updateName); + + /** + * Delete specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 delete(String resourceGroupName, String clusterName, String updateName, Context context); + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 specified Update along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String clusterName, String updateName, + Context context); + + /** + * Get specified Update. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the cluster. + * @param updateName The name of the Update. + * @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 specified Update. + */ + HciUpdate get(String resourceGroupName, String clusterName, String updateName); + + /** + * Get specified Update. + * + * @param id the resource ID. + * @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 specified Update along with {@link Response}. + */ + HciUpdate getById(String id); + + /** + * Get specified Update. + * + * @param id the resource ID. + * @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 specified Update along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete specified Update. + * + * @param id the resource ID. + * @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 deleteById(String id); + + /** + * Delete specified Update. + * + * @param id the resource ID. + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new HciUpdate resource. + * + * @param name resource name. + * @return the first stage of the new HciUpdate definition. + */ + HciUpdate.DefinitionStages.Blank define(String name); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java new file mode 100644 index 0000000000000..816a090f7fb64 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UploadCertificateRequest.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The UploadCertificateRequest model. + */ +@Fluent +public final class UploadCertificateRequest { + /* + * The properties property. + */ + @JsonProperty(value = "properties") + private RawCertificateData properties; + + /** + * Creates an instance of UploadCertificateRequest class. + */ + public UploadCertificateRequest() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public RawCertificateData properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the UploadCertificateRequest object itself. + */ + public UploadCertificateRequest withProperties(RawCertificateData properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java new file mode 100644 index 0000000000000..3d27ece03fadf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/UserAssignedIdentity.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** + * User assigned identity properties. + */ +@Immutable +public final class UserAssignedIdentity { + /* + * The principal ID of the assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /* + * The client ID of the assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private UUID clientId; + + /** + * Creates an instance of UserAssignedIdentity class. + */ + public UserAssignedIdentity() { + } + + /** + * Get the principalId property: The principal ID of the assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the clientId property: The client ID of the assigned identity. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.clientId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java new file mode 100644 index 0000000000000..f221e7d22ef3a --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateRequest.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The validate request for Edge Device. + */ +@Fluent +public final class ValidateRequest { + /* + * Node Ids against which, current node has to be validated. + */ + @JsonProperty(value = "edgeDeviceIds", required = true) + private List edgeDeviceIds; + + /* + * additional Info required for validation + */ + @JsonProperty(value = "additionalInfo") + private String additionalInfo; + + /** + * Creates an instance of ValidateRequest class. + */ + public ValidateRequest() { + } + + /** + * Get the edgeDeviceIds property: Node Ids against which, current node has to be validated. + * + * @return the edgeDeviceIds value. + */ + public List edgeDeviceIds() { + return this.edgeDeviceIds; + } + + /** + * Set the edgeDeviceIds property: Node Ids against which, current node has to be validated. + * + * @param edgeDeviceIds the edgeDeviceIds value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withEdgeDeviceIds(List edgeDeviceIds) { + this.edgeDeviceIds = edgeDeviceIds; + return this; + } + + /** + * Get the additionalInfo property: additional Info required for validation. + * + * @return the additionalInfo value. + */ + public String additionalInfo() { + return this.additionalInfo; + } + + /** + * Set the additionalInfo property: additional Info required for validation. + * + * @param additionalInfo the additionalInfo value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withAdditionalInfo(String additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (edgeDeviceIds() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property edgeDeviceIds in model ValidateRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ValidateRequest.class); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java new file mode 100644 index 0000000000000..87ae7b3028472 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidateResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner; + +/** + * An immutable client-side representation of ValidateResponse. + */ +public interface ValidateResponse { + /** + * Gets the status property: edge device validation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the inner com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner object. + * + * @return the inner object. + */ + ValidateResponseInner innerModel(); +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidationStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidationStatus.java new file mode 100644 index 0000000000000..bcad25df606d2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/ValidationStatus.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The ValidationStatus of AzureStackHCI Cluster. + */ +@Immutable +public final class ValidationStatus { + /* + * Status of AzureStackHCI Cluster Deployment. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /* + * List of steps of AzureStackHCI Cluster Deployment. + */ + @JsonProperty(value = "steps", access = JsonProperty.Access.WRITE_ONLY) + private List steps; + + /** + * Creates an instance of ValidationStatus class. + */ + public ValidationStatus() { + } + + /** + * Get the status property: Status of AzureStackHCI Cluster Deployment. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the steps property: List of steps of AzureStackHCI Cluster Deployment. + * + * @return the steps value. + */ + public List steps() { + return this.steps; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (steps() != null) { + steps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDiskStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDiskStatus.java index c704c8114b5b1..8943ae4a54a91 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDiskStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDiskStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The observed state of virtual hard disks. */ +/** + * The observed state of virtual hard disks. + */ @Fluent public final class VirtualHardDiskStatus { /* @@ -28,13 +30,15 @@ public final class VirtualHardDiskStatus { @JsonProperty(value = "provisioningStatus") private VirtualHardDiskStatusProvisioningStatus provisioningStatus; - /** Creates an instance of VirtualHardDiskStatus class. */ + /** + * Creates an instance of VirtualHardDiskStatus class. + */ public VirtualHardDiskStatus() { } /** * Get the errorCode property: VirtualHardDisk provisioning error code. - * + * * @return the errorCode value. */ public String errorCode() { @@ -43,7 +47,7 @@ public String errorCode() { /** * Set the errorCode property: VirtualHardDisk provisioning error code. - * + * * @param errorCode the errorCode value to set. * @return the VirtualHardDiskStatus object itself. */ @@ -54,7 +58,7 @@ public VirtualHardDiskStatus withErrorCode(String errorCode) { /** * Get the errorMessage property: Descriptive error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -63,7 +67,7 @@ public String errorMessage() { /** * Set the errorMessage property: Descriptive error message. - * + * * @param errorMessage the errorMessage value to set. * @return the VirtualHardDiskStatus object itself. */ @@ -74,7 +78,7 @@ public VirtualHardDiskStatus withErrorMessage(String errorMessage) { /** * Get the provisioningStatus property: The provisioningStatus property. - * + * * @return the provisioningStatus value. */ public VirtualHardDiskStatusProvisioningStatus provisioningStatus() { @@ -83,7 +87,7 @@ public VirtualHardDiskStatusProvisioningStatus provisioningStatus() { /** * Set the provisioningStatus property: The provisioningStatus property. - * + * * @param provisioningStatus the provisioningStatus value to set. * @return the VirtualHardDiskStatus object itself. */ @@ -94,7 +98,7 @@ public VirtualHardDiskStatus withProvisioningStatus(VirtualHardDiskStatusProvisi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDiskStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDiskStatusProvisioningStatus.java index f3290352a0f5c..37d76aad33920 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDiskStatusProvisioningStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDiskStatusProvisioningStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VirtualHardDiskStatusProvisioningStatus model. */ +/** + * The VirtualHardDiskStatusProvisioningStatus model. + */ @Fluent public final class VirtualHardDiskStatusProvisioningStatus { /* @@ -22,13 +24,15 @@ public final class VirtualHardDiskStatusProvisioningStatus { @JsonProperty(value = "status") private Status status; - /** Creates an instance of VirtualHardDiskStatusProvisioningStatus class. */ + /** + * Creates an instance of VirtualHardDiskStatusProvisioningStatus class. + */ public VirtualHardDiskStatusProvisioningStatus() { } /** * Get the operationId property: The ID of the operation performed on the virtual hard disk. - * + * * @return the operationId value. */ public String operationId() { @@ -37,7 +41,7 @@ public String operationId() { /** * Set the operationId property: The ID of the operation performed on the virtual hard disk. - * + * * @param operationId the operationId value to set. * @return the VirtualHardDiskStatusProvisioningStatus object itself. */ @@ -49,7 +53,7 @@ public VirtualHardDiskStatusProvisioningStatus withOperationId(String operationI /** * Get the status property: The status of the operation performed on the virtual hard disk [Succeeded, Failed, * InProgress]. - * + * * @return the status value. */ public Status status() { @@ -59,7 +63,7 @@ public Status status() { /** * Set the status property: The status of the operation performed on the virtual hard disk [Succeeded, Failed, * InProgress]. - * + * * @param status the status value to set. * @return the VirtualHardDiskStatusProvisioningStatus object itself. */ @@ -70,7 +74,7 @@ public VirtualHardDiskStatusProvisioningStatus withStatus(Status status) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisks.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisks.java index b9559b3540618..7dee31fa9b1d1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisks.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisks.java @@ -10,174 +10,181 @@ import com.azure.resourcemanager.azurestackhci.fluent.models.VirtualHardDisksInner; import java.util.Map; -/** An immutable client-side representation of VirtualHardDisks. */ +/** + * An immutable client-side representation of VirtualHardDisks. + */ public interface VirtualHardDisks { /** * 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 tags(); /** * Gets the extendedLocation property: The extendedLocation of 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 blockSizeBytes property: The blockSizeBytes property. - * + * * @return the blockSizeBytes value. */ Integer blockSizeBytes(); /** * Gets the diskSizeGB property: Size of the disk in GB. - * + * * @return the diskSizeGB value. */ Long diskSizeGB(); /** * Gets the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk. - * + * * @return the dynamic value. */ Boolean dynamic(); /** * Gets the logicalSectorBytes property: The logicalSectorBytes property. - * + * * @return the logicalSectorBytes value. */ Integer logicalSectorBytes(); /** * Gets the physicalSectorBytes property: The physicalSectorBytes property. - * + * * @return the physicalSectorBytes value. */ Integer physicalSectorBytes(); /** * Gets the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @return the hyperVGeneration value. */ HyperVGeneration hyperVGeneration(); /** * Gets the diskFileFormat property: The format of the actual VHD file [vhd, vhdx]. - * + * * @return the diskFileFormat value. */ DiskFileFormat diskFileFormat(); /** * Gets the provisioningState property: Provisioning state of the virtual hard disk. - * + * * @return the provisioningState value. */ ProvisioningStateEnum provisioningState(); /** * Gets the containerId property: Storage ContainerID of the storage container to be used for VHD. - * + * * @return the containerId value. */ String containerId(); /** * Gets the status property: The observed state of virtual hard disks. - * + * * @return the status value. */ VirtualHardDiskStatus status(); /** * 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.azurestackhci.fluent.models.VirtualHardDisksInner object. - * + * * @return the inner object. */ VirtualHardDisksInner innerModel(); - /** The entirety of the VirtualHardDisks definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the VirtualHardDisks definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The VirtualHardDisks definition stages. */ + /** + * The VirtualHardDisks definition stages. + */ interface DefinitionStages { - /** The first stage of the VirtualHardDisks definition. */ + /** + * The first stage of the VirtualHardDisks definition. + */ interface Blank extends WithLocation { } - /** The stage of the VirtualHardDisks definition allowing to specify location. */ + /** + * The stage of the VirtualHardDisks 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. */ @@ -185,18 +192,20 @@ interface WithLocation { /** * 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 VirtualHardDisks definition allowing to specify parent resource. */ + /** + * The stage of the VirtualHardDisks 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. */ @@ -207,137 +216,151 @@ interface WithResourceGroup { * The stage of the VirtualHardDisks 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.WithExtendedLocation, - DefinitionStages.WithBlockSizeBytes, - DefinitionStages.WithDiskSizeGB, - DefinitionStages.WithDynamic, - DefinitionStages.WithLogicalSectorBytes, - DefinitionStages.WithPhysicalSectorBytes, - DefinitionStages.WithHyperVGeneration, - DefinitionStages.WithDiskFileFormat, - DefinitionStages.WithContainerId { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, + DefinitionStages.WithBlockSizeBytes, DefinitionStages.WithDiskSizeGB, DefinitionStages.WithDynamic, + DefinitionStages.WithLogicalSectorBytes, DefinitionStages.WithPhysicalSectorBytes, + DefinitionStages.WithHyperVGeneration, DefinitionStages.WithDiskFileFormat, + DefinitionStages.WithContainerId { /** * Executes the create request. - * + * * @return the created resource. */ VirtualHardDisks create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ VirtualHardDisks create(Context context); } - /** The stage of the VirtualHardDisks definition allowing to specify tags. */ + /** + * The stage of the VirtualHardDisks 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 tags); } - /** The stage of the VirtualHardDisks definition allowing to specify extendedLocation. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The extendedLocation of the resource.. - * + * * @param extendedLocation The extendedLocation of the resource. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the VirtualHardDisks definition allowing to specify blockSizeBytes. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify blockSizeBytes. + */ interface WithBlockSizeBytes { /** * Specifies the blockSizeBytes property: The blockSizeBytes property.. - * + * * @param blockSizeBytes The blockSizeBytes property. * @return the next definition stage. */ WithCreate withBlockSizeBytes(Integer blockSizeBytes); } - /** The stage of the VirtualHardDisks definition allowing to specify diskSizeGB. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify diskSizeGB. + */ interface WithDiskSizeGB { /** * Specifies the diskSizeGB property: Size of the disk in GB. - * + * * @param diskSizeGB Size of the disk in GB. * @return the next definition stage. */ WithCreate withDiskSizeGB(Long diskSizeGB); } - /** The stage of the VirtualHardDisks definition allowing to specify dynamic. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify dynamic. + */ interface WithDynamic { /** * Specifies the dynamic property: Boolean for enabling dynamic sizing on the virtual hard disk. - * + * * @param dynamic Boolean for enabling dynamic sizing on the virtual hard disk. * @return the next definition stage. */ WithCreate withDynamic(Boolean dynamic); } - /** The stage of the VirtualHardDisks definition allowing to specify logicalSectorBytes. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify logicalSectorBytes. + */ interface WithLogicalSectorBytes { /** * Specifies the logicalSectorBytes property: The logicalSectorBytes property.. - * + * * @param logicalSectorBytes The logicalSectorBytes property. * @return the next definition stage. */ WithCreate withLogicalSectorBytes(Integer logicalSectorBytes); } - /** The stage of the VirtualHardDisks definition allowing to specify physicalSectorBytes. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify physicalSectorBytes. + */ interface WithPhysicalSectorBytes { /** * Specifies the physicalSectorBytes property: The physicalSectorBytes property.. - * + * * @param physicalSectorBytes The physicalSectorBytes property. * @return the next definition stage. */ WithCreate withPhysicalSectorBytes(Integer physicalSectorBytes); } - /** The stage of the VirtualHardDisks definition allowing to specify hyperVGeneration. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify hyperVGeneration. + */ interface WithHyperVGeneration { /** * Specifies the hyperVGeneration property: The hypervisor generation of the Virtual Machine [V1, V2]. - * + * * @param hyperVGeneration The hypervisor generation of the Virtual Machine [V1, V2]. * @return the next definition stage. */ WithCreate withHyperVGeneration(HyperVGeneration hyperVGeneration); } - /** The stage of the VirtualHardDisks definition allowing to specify diskFileFormat. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify diskFileFormat. + */ interface WithDiskFileFormat { /** * Specifies the diskFileFormat property: The format of the actual VHD file [vhd, vhdx]. - * + * * @param diskFileFormat The format of the actual VHD file [vhd, vhdx]. * @return the next definition stage. */ WithCreate withDiskFileFormat(DiskFileFormat diskFileFormat); } - /** The stage of the VirtualHardDisks definition allowing to specify containerId. */ + /** + * The stage of the VirtualHardDisks definition allowing to specify containerId. + */ interface WithContainerId { /** * Specifies the containerId property: Storage ContainerID of the storage container to be used for VHD. - * + * * @param containerId Storage ContainerID of the storage container to be used for VHD. * @return the next definition stage. */ @@ -347,36 +370,42 @@ interface WithContainerId { /** * Begins update for the VirtualHardDisks resource. - * + * * @return the stage of resource update. */ VirtualHardDisks.Update update(); - /** The template for VirtualHardDisks update. */ + /** + * The template for VirtualHardDisks update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ VirtualHardDisks apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ VirtualHardDisks apply(Context context); } - /** The VirtualHardDisks update stages. */ + /** + * The VirtualHardDisks update stages. + */ interface UpdateStages { - /** The stage of the VirtualHardDisks update allowing to specify tags. */ + /** + * The stage of the VirtualHardDisks update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -386,14 +415,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ VirtualHardDisks refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksListResult.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksListResult.java index ef85352a516bd..d32096d4d8c68 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksListResult.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The VirtualHardDisksListResult model. */ +/** + * The VirtualHardDisksListResult model. + */ @Fluent public final class VirtualHardDisksListResult { /* @@ -24,13 +26,15 @@ public final class VirtualHardDisksListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of VirtualHardDisksListResult class. */ + /** + * Creates an instance of VirtualHardDisksListResult class. + */ public VirtualHardDisksListResult() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the VirtualHardDisksListResult object itself. */ @@ -50,7 +54,7 @@ public VirtualHardDisksListResult withValue(List value) { /** * Get the nextLink property: The nextLink property. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: The nextLink property. - * + * * @param nextLink the nextLink value to set. * @return the VirtualHardDisksListResult object itself. */ @@ -70,7 +74,7 @@ public VirtualHardDisksListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksOperations.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksOperations.java index 431d46dc766ab..d4be8cbb4337f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksOperations.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksOperations.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of VirtualHardDisksOperations. */ +/** + * Resource collection API of VirtualHardDisksOperations. + */ public interface VirtualHardDisksOperations { /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -21,12 +23,12 @@ public interface VirtualHardDisksOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a virtual hard disk along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String virtualHardDiskName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String virtualHardDiskName, + Context context); /** * Gets a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +51,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a virtual hard disk. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualHardDiskName Name of the virtual hard disk. * @param context The context to associate with this operation. @@ -62,7 +64,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -74,7 +76,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the virtual hard disks in the specified resource group. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +89,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @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 paginated response with {@link PagedIterable}. @@ -97,7 +99,7 @@ Response getByResourceGroupWithResponse( /** * Lists all of the virtual hard disks in the specified subscription. Use the nextLink property in the response to * get the next page of virtual hard disks. - * + * * @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. @@ -108,7 +110,7 @@ Response getByResourceGroupWithResponse( /** * Gets a virtual hard disk. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,7 +121,7 @@ Response getByResourceGroupWithResponse( /** * Gets a virtual hard disk. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +133,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a virtual hard disk. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -141,7 +143,7 @@ Response getByResourceGroupWithResponse( /** * The operation to delete a virtual hard disk. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +154,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new VirtualHardDisks resource. - * + * * @param name resource name. * @return the first stage of the new VirtualHardDisks definition. */ diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksUpdateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksUpdateRequest.java index f82a434c0b2b1..c5cc6a874219a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksUpdateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualHardDisksUpdateRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The virtual hard disk resource patch definition. */ +/** + * The virtual hard disk resource patch definition. + */ @Fluent public final class VirtualHardDisksUpdateRequest { /* @@ -19,13 +21,15 @@ public final class VirtualHardDisksUpdateRequest { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of VirtualHardDisksUpdateRequest class. */ + /** + * Creates an instance of VirtualHardDisksUpdateRequest class. + */ public VirtualHardDisksUpdateRequest() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the VirtualHardDisksUpdateRequest object itself. */ @@ -45,7 +49,7 @@ public VirtualHardDisksUpdateRequest withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineConfigAgentInstanceView.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineConfigAgentInstanceView.java index 4a792291bf471..233f20ff4d872 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineConfigAgentInstanceView.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineConfigAgentInstanceView.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The instance view of the VM Config Agent running on the virtual machine. */ +/** + * The instance view of the VM Config Agent running on the virtual machine. + */ @Fluent public final class VirtualMachineConfigAgentInstanceView { /* @@ -23,13 +25,15 @@ public final class VirtualMachineConfigAgentInstanceView { @JsonProperty(value = "statuses") private List statuses; - /** Creates an instance of VirtualMachineConfigAgentInstanceView class. */ + /** + * Creates an instance of VirtualMachineConfigAgentInstanceView class. + */ public VirtualMachineConfigAgentInstanceView() { } /** * Get the vmConfigAgentVersion property: The VM Config Agent full version. - * + * * @return the vmConfigAgentVersion value. */ public String vmConfigAgentVersion() { @@ -38,7 +42,7 @@ public String vmConfigAgentVersion() { /** * Set the vmConfigAgentVersion property: The VM Config Agent full version. - * + * * @param vmConfigAgentVersion the vmConfigAgentVersion value to set. * @return the VirtualMachineConfigAgentInstanceView object itself. */ @@ -49,7 +53,7 @@ public VirtualMachineConfigAgentInstanceView withVmConfigAgentVersion(String vmC /** * Get the statuses property: The resource status information. - * + * * @return the statuses value. */ public List statuses() { @@ -58,7 +62,7 @@ public List statuses() { /** * Set the statuses property: The resource status information. - * + * * @param statuses the statuses value to set. * @return the VirtualMachineConfigAgentInstanceView object itself. */ @@ -69,7 +73,7 @@ public VirtualMachineConfigAgentInstanceView withStatuses(List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the VirtualMachineInstanceListResult object itself. */ @@ -50,7 +54,7 @@ public VirtualMachineInstanceListResult withValue(List networkInterfaces; - /** Creates an instance of VirtualMachineInstancePropertiesNetworkProfile class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesNetworkProfile class. + */ public VirtualMachineInstancePropertiesNetworkProfile() { } /** * Get the networkInterfaces property: NetworkInterfaces - list of network interfaces to be attached to the virtual * machine instance. - * + * * @return the networkInterfaces value. */ public List networkInterfaces() { @@ -34,7 +38,7 @@ public List /** * Set the networkInterfaces property: NetworkInterfaces - list of network interfaces to be attached to the virtual * machine instance. - * + * * @param networkInterfaces the networkInterfaces value to set. * @return the VirtualMachineInstancePropertiesNetworkProfile object itself. */ @@ -46,7 +50,7 @@ public VirtualMachineInstancePropertiesNetworkProfile withNetworkInterfaces( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem.java index f4699a166e1f7..e99da0c165232 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem model. */ +/** + * The VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem model. + */ @Fluent public final class VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem { /* @@ -16,13 +18,15 @@ public final class VirtualMachineInstancePropertiesNetworkProfileNetworkInterfac @JsonProperty(value = "id") private String id; - /** Creates an instance of VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem class. + */ public VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() { } /** * Get the id property: ID - Resource Id of the network interface. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: ID - Resource Id of the network interface. - * + * * @param id the id value to set. * @return the VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem object itself. */ @@ -42,7 +46,7 @@ public VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem withI /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfile.java index bf1a7840475db..3c29ac24409b4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfile.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** OsProfile - describes the configuration of the operating system and sets login data. */ +/** + * OsProfile - describes the configuration of the operating system and sets login data. + */ @Fluent public final class VirtualMachineInstancePropertiesOsProfile { /* @@ -35,18 +37,20 @@ public final class VirtualMachineInstancePropertiesOsProfile { private VirtualMachineInstancePropertiesOsProfileLinuxConfiguration linuxConfiguration; /* - * Windows Configuration for the virtual machine instance + * Windows Configuration for the virtual machine instance */ @JsonProperty(value = "windowsConfiguration") private VirtualMachineInstancePropertiesOsProfileWindowsConfiguration windowsConfiguration; - /** Creates an instance of VirtualMachineInstancePropertiesOsProfile class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesOsProfile class. + */ public VirtualMachineInstancePropertiesOsProfile() { } /** * Get the adminPassword property: AdminPassword - admin password. - * + * * @return the adminPassword value. */ public String adminPassword() { @@ -55,7 +59,7 @@ public String adminPassword() { /** * Set the adminPassword property: AdminPassword - admin password. - * + * * @param adminPassword the adminPassword value to set. * @return the VirtualMachineInstancePropertiesOsProfile object itself. */ @@ -66,7 +70,7 @@ public VirtualMachineInstancePropertiesOsProfile withAdminPassword(String adminP /** * Get the adminUsername property: AdminUsername - admin username. - * + * * @return the adminUsername value. */ public String adminUsername() { @@ -75,7 +79,7 @@ public String adminUsername() { /** * Set the adminUsername property: AdminUsername - admin username. - * + * * @param adminUsername the adminUsername value to set. * @return the VirtualMachineInstancePropertiesOsProfile object itself. */ @@ -86,7 +90,7 @@ public VirtualMachineInstancePropertiesOsProfile withAdminUsername(String adminU /** * Get the computerName property: ComputerName - name of the compute. - * + * * @return the computerName value. */ public String computerName() { @@ -95,7 +99,7 @@ public String computerName() { /** * Set the computerName property: ComputerName - name of the compute. - * + * * @param computerName the computerName value to set. * @return the VirtualMachineInstancePropertiesOsProfile object itself. */ @@ -107,7 +111,7 @@ public VirtualMachineInstancePropertiesOsProfile withComputerName(String compute /** * Get the linuxConfiguration property: LinuxConfiguration - linux specific configuration values for the virtual * machine instance. - * + * * @return the linuxConfiguration value. */ public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration linuxConfiguration() { @@ -117,19 +121,19 @@ public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration linuxConfigur /** * Set the linuxConfiguration property: LinuxConfiguration - linux specific configuration values for the virtual * machine instance. - * + * * @param linuxConfiguration the linuxConfiguration value to set. * @return the VirtualMachineInstancePropertiesOsProfile object itself. */ - public VirtualMachineInstancePropertiesOsProfile withLinuxConfiguration( - VirtualMachineInstancePropertiesOsProfileLinuxConfiguration linuxConfiguration) { + public VirtualMachineInstancePropertiesOsProfile + withLinuxConfiguration(VirtualMachineInstancePropertiesOsProfileLinuxConfiguration linuxConfiguration) { this.linuxConfiguration = linuxConfiguration; return this; } /** * Get the windowsConfiguration property: Windows Configuration for the virtual machine instance. - * + * * @return the windowsConfiguration value. */ public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration windowsConfiguration() { @@ -138,19 +142,19 @@ public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration windowsConf /** * Set the windowsConfiguration property: Windows Configuration for the virtual machine instance. - * + * * @param windowsConfiguration the windowsConfiguration value to set. * @return the VirtualMachineInstancePropertiesOsProfile object itself. */ - public VirtualMachineInstancePropertiesOsProfile withWindowsConfiguration( - VirtualMachineInstancePropertiesOsProfileWindowsConfiguration windowsConfiguration) { + public VirtualMachineInstancePropertiesOsProfile + withWindowsConfiguration(VirtualMachineInstancePropertiesOsProfileWindowsConfiguration windowsConfiguration) { this.windowsConfiguration = windowsConfiguration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfileLinuxConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfileLinuxConfiguration.java index ec12bb03ccb71..8781de513b981 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfileLinuxConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfileLinuxConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** LinuxConfiguration - linux specific configuration values for the virtual machine instance. */ +/** + * LinuxConfiguration - linux specific configuration values for the virtual machine instance. + */ @Fluent public final class VirtualMachineInstancePropertiesOsProfileLinuxConfiguration { /* @@ -23,8 +25,7 @@ public final class VirtualMachineInstancePropertiesOsProfileLinuxConfiguration { private SshConfiguration ssh; /* - * Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine - * instance creation process. + * Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. */ @JsonProperty(value = "provisionVMAgent") private Boolean provisionVMAgent; @@ -35,14 +36,16 @@ public final class VirtualMachineInstancePropertiesOsProfileLinuxConfiguration { @JsonProperty(value = "provisionVMConfigAgent") private Boolean provisionVMConfigAgent; - /** Creates an instance of VirtualMachineInstancePropertiesOsProfileLinuxConfiguration class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesOsProfileLinuxConfiguration class. + */ public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration() { } /** * Get the disablePasswordAuthentication property: DisablePasswordAuthentication - whether password authentication * should be disabled. - * + * * @return the disablePasswordAuthentication value. */ public Boolean disablePasswordAuthentication() { @@ -52,19 +55,19 @@ public Boolean disablePasswordAuthentication() { /** * Set the disablePasswordAuthentication property: DisablePasswordAuthentication - whether password authentication * should be disabled. - * + * * @param disablePasswordAuthentication the disablePasswordAuthentication value to set. * @return the VirtualMachineInstancePropertiesOsProfileLinuxConfiguration object itself. */ - public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration withDisablePasswordAuthentication( - Boolean disablePasswordAuthentication) { + public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration + withDisablePasswordAuthentication(Boolean disablePasswordAuthentication) { this.disablePasswordAuthentication = disablePasswordAuthentication; return this; } /** * Get the ssh property: Specifies the ssh key configuration for a Linux OS. - * + * * @return the ssh value. */ public SshConfiguration ssh() { @@ -73,7 +76,7 @@ public SshConfiguration ssh() { /** * Set the ssh property: Specifies the ssh key configuration for a Linux OS. - * + * * @param ssh the ssh value to set. * @return the VirtualMachineInstancePropertiesOsProfileLinuxConfiguration object itself. */ @@ -85,7 +88,7 @@ public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration withSsh(SshCo /** * Get the provisionVMAgent property: Used to indicate whether Arc for Servers agent onboarding should be triggered * during the virtual machine instance creation process. - * + * * @return the provisionVMAgent value. */ public Boolean provisionVMAgent() { @@ -95,7 +98,7 @@ public Boolean provisionVMAgent() { /** * Set the provisionVMAgent property: Used to indicate whether Arc for Servers agent onboarding should be triggered * during the virtual machine instance creation process. - * + * * @param provisionVMAgent the provisionVMAgent value to set. * @return the VirtualMachineInstancePropertiesOsProfileLinuxConfiguration object itself. */ @@ -107,7 +110,7 @@ public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration withProvision /** * Get the provisionVMConfigAgent property: Used to indicate whether the VM Config Agent should be installed during * the virtual machine creation process. - * + * * @return the provisionVMConfigAgent value. */ public Boolean provisionVMConfigAgent() { @@ -117,19 +120,19 @@ public Boolean provisionVMConfigAgent() { /** * Set the provisionVMConfigAgent property: Used to indicate whether the VM Config Agent should be installed during * the virtual machine creation process. - * + * * @param provisionVMConfigAgent the provisionVMConfigAgent value to set. * @return the VirtualMachineInstancePropertiesOsProfileLinuxConfiguration object itself. */ - public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration withProvisionVMConfigAgent( - Boolean provisionVMConfigAgent) { + public VirtualMachineInstancePropertiesOsProfileLinuxConfiguration + withProvisionVMConfigAgent(Boolean provisionVMConfigAgent) { this.provisionVMConfigAgent = provisionVMConfigAgent; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfileWindowsConfiguration.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfileWindowsConfiguration.java index f57a8d5b46480..82409aad84332 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfileWindowsConfiguration.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesOsProfileWindowsConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Windows Configuration for the virtual machine instance. */ +/** + * Windows Configuration for the virtual machine instance. + */ @Fluent public final class VirtualMachineInstancePropertiesOsProfileWindowsConfiguration { /* @@ -29,8 +31,7 @@ public final class VirtualMachineInstancePropertiesOsProfileWindowsConfiguration private String timeZone; /* - * Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine - * instance creation process. + * Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. */ @JsonProperty(value = "provisionVMAgent") private Boolean provisionVMAgent; @@ -41,13 +42,15 @@ public final class VirtualMachineInstancePropertiesOsProfileWindowsConfiguration @JsonProperty(value = "provisionVMConfigAgent") private Boolean provisionVMConfigAgent; - /** Creates an instance of VirtualMachineInstancePropertiesOsProfileWindowsConfiguration class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesOsProfileWindowsConfiguration class. + */ public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration() { } /** * Get the enableAutomaticUpdates property: Whether to EnableAutomaticUpdates on the machine. - * + * * @return the enableAutomaticUpdates value. */ public Boolean enableAutomaticUpdates() { @@ -56,19 +59,19 @@ public Boolean enableAutomaticUpdates() { /** * Set the enableAutomaticUpdates property: Whether to EnableAutomaticUpdates on the machine. - * + * * @param enableAutomaticUpdates the enableAutomaticUpdates value to set. * @return the VirtualMachineInstancePropertiesOsProfileWindowsConfiguration object itself. */ - public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration withEnableAutomaticUpdates( - Boolean enableAutomaticUpdates) { + public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration + withEnableAutomaticUpdates(Boolean enableAutomaticUpdates) { this.enableAutomaticUpdates = enableAutomaticUpdates; return this; } /** * Get the ssh property: Specifies the ssh key configuration for Windows OS. - * + * * @return the ssh value. */ public SshConfiguration ssh() { @@ -77,7 +80,7 @@ public SshConfiguration ssh() { /** * Set the ssh property: Specifies the ssh key configuration for Windows OS. - * + * * @param ssh the ssh value to set. * @return the VirtualMachineInstancePropertiesOsProfileWindowsConfiguration object itself. */ @@ -88,7 +91,7 @@ public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration withSsh(Ssh /** * Get the timeZone property: TimeZone for the virtual machine instance. - * + * * @return the timeZone value. */ public String timeZone() { @@ -97,7 +100,7 @@ public String timeZone() { /** * Set the timeZone property: TimeZone for the virtual machine instance. - * + * * @param timeZone the timeZone value to set. * @return the VirtualMachineInstancePropertiesOsProfileWindowsConfiguration object itself. */ @@ -109,7 +112,7 @@ public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration withTimeZon /** * Get the provisionVMAgent property: Used to indicate whether Arc for Servers agent onboarding should be triggered * during the virtual machine instance creation process. - * + * * @return the provisionVMAgent value. */ public Boolean provisionVMAgent() { @@ -119,12 +122,12 @@ public Boolean provisionVMAgent() { /** * Set the provisionVMAgent property: Used to indicate whether Arc for Servers agent onboarding should be triggered * during the virtual machine instance creation process. - * + * * @param provisionVMAgent the provisionVMAgent value to set. * @return the VirtualMachineInstancePropertiesOsProfileWindowsConfiguration object itself. */ - public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration withProvisionVMAgent( - Boolean provisionVMAgent) { + public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration + withProvisionVMAgent(Boolean provisionVMAgent) { this.provisionVMAgent = provisionVMAgent; return this; } @@ -132,7 +135,7 @@ public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration withProvisi /** * Get the provisionVMConfigAgent property: Used to indicate whether the VM Config Agent should be installed during * the virtual machine creation process. - * + * * @return the provisionVMConfigAgent value. */ public Boolean provisionVMConfigAgent() { @@ -142,19 +145,19 @@ public Boolean provisionVMConfigAgent() { /** * Set the provisionVMConfigAgent property: Used to indicate whether the VM Config Agent should be installed during * the virtual machine creation process. - * + * * @param provisionVMConfigAgent the provisionVMConfigAgent value to set. * @return the VirtualMachineInstancePropertiesOsProfileWindowsConfiguration object itself. */ - public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration withProvisionVMConfigAgent( - Boolean provisionVMConfigAgent) { + public VirtualMachineInstancePropertiesOsProfileWindowsConfiguration + withProvisionVMConfigAgent(Boolean provisionVMConfigAgent) { this.provisionVMConfigAgent = provisionVMConfigAgent; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesSecurityProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesSecurityProfile.java index 6901104c8153d..8b75193776e5a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesSecurityProfile.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesSecurityProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** SecurityProfile - Specifies the security settings for the virtual machine instance. */ +/** + * SecurityProfile - Specifies the security settings for the virtual machine instance. + */ @Fluent public final class VirtualMachineInstancePropertiesSecurityProfile { /* @@ -23,19 +25,20 @@ public final class VirtualMachineInstancePropertiesSecurityProfile { private VirtualMachineInstancePropertiesSecurityProfileUefiSettings uefiSettings; /* - * Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for - * SecurityType to function. + * Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled must be set to true for SecurityType to function. */ @JsonProperty(value = "securityType") private SecurityTypes securityType; - /** Creates an instance of VirtualMachineInstancePropertiesSecurityProfile class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesSecurityProfile class. + */ public VirtualMachineInstancePropertiesSecurityProfile() { } /** * Get the enableTpm property: The enableTPM property. - * + * * @return the enableTpm value. */ public Boolean enableTpm() { @@ -44,7 +47,7 @@ public Boolean enableTpm() { /** * Set the enableTpm property: The enableTPM property. - * + * * @param enableTpm the enableTpm value to set. * @return the VirtualMachineInstancePropertiesSecurityProfile object itself. */ @@ -55,7 +58,7 @@ public VirtualMachineInstancePropertiesSecurityProfile withEnableTpm(Boolean ena /** * Get the uefiSettings property: The uefiSettings property. - * + * * @return the uefiSettings value. */ public VirtualMachineInstancePropertiesSecurityProfileUefiSettings uefiSettings() { @@ -64,12 +67,12 @@ public VirtualMachineInstancePropertiesSecurityProfileUefiSettings uefiSettings( /** * Set the uefiSettings property: The uefiSettings property. - * + * * @param uefiSettings the uefiSettings value to set. * @return the VirtualMachineInstancePropertiesSecurityProfile object itself. */ - public VirtualMachineInstancePropertiesSecurityProfile withUefiSettings( - VirtualMachineInstancePropertiesSecurityProfileUefiSettings uefiSettings) { + public VirtualMachineInstancePropertiesSecurityProfile + withUefiSettings(VirtualMachineInstancePropertiesSecurityProfileUefiSettings uefiSettings) { this.uefiSettings = uefiSettings; return this; } @@ -77,7 +80,7 @@ public VirtualMachineInstancePropertiesSecurityProfile withUefiSettings( /** * Get the securityType property: Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled * must be set to true for SecurityType to function. - * + * * @return the securityType value. */ public SecurityTypes securityType() { @@ -87,7 +90,7 @@ public SecurityTypes securityType() { /** * Set the securityType property: Specifies the SecurityType of the virtual machine. EnableTPM and SecureBootEnabled * must be set to true for SecurityType to function. - * + * * @param securityType the securityType value to set. * @return the VirtualMachineInstancePropertiesSecurityProfile object itself. */ @@ -98,7 +101,7 @@ public VirtualMachineInstancePropertiesSecurityProfile withSecurityType(Security /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesSecurityProfileUefiSettings.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesSecurityProfileUefiSettings.java index 5416dd9031918..91d4c04a1e262 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesSecurityProfileUefiSettings.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesSecurityProfileUefiSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VirtualMachineInstancePropertiesSecurityProfileUefiSettings model. */ +/** + * The VirtualMachineInstancePropertiesSecurityProfileUefiSettings model. + */ @Fluent public final class VirtualMachineInstancePropertiesSecurityProfileUefiSettings { /* @@ -16,14 +18,16 @@ public final class VirtualMachineInstancePropertiesSecurityProfileUefiSettings { @JsonProperty(value = "secureBootEnabled") private Boolean secureBootEnabled; - /** Creates an instance of VirtualMachineInstancePropertiesSecurityProfileUefiSettings class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesSecurityProfileUefiSettings class. + */ public VirtualMachineInstancePropertiesSecurityProfileUefiSettings() { } /** * Get the secureBootEnabled property: Specifies whether secure boot should be enabled on the virtual machine * instance. - * + * * @return the secureBootEnabled value. */ public Boolean secureBootEnabled() { @@ -33,19 +37,19 @@ public Boolean secureBootEnabled() { /** * Set the secureBootEnabled property: Specifies whether secure boot should be enabled on the virtual machine * instance. - * + * * @param secureBootEnabled the secureBootEnabled value to set. * @return the VirtualMachineInstancePropertiesSecurityProfileUefiSettings object itself. */ - public VirtualMachineInstancePropertiesSecurityProfileUefiSettings withSecureBootEnabled( - Boolean secureBootEnabled) { + public VirtualMachineInstancePropertiesSecurityProfileUefiSettings + withSecureBootEnabled(Boolean secureBootEnabled) { this.secureBootEnabled = secureBootEnabled; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfile.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfile.java index 8a2ff43897df0..722c988df675d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfile.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfile.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** StorageProfile - contains information about the disks and storage information for the virtual machine instance. */ +/** + * StorageProfile - contains information about the disks and storage information for the virtual machine instance. + */ @Fluent public final class VirtualMachineInstancePropertiesStorageProfile { /* @@ -35,13 +37,15 @@ public final class VirtualMachineInstancePropertiesStorageProfile { @JsonProperty(value = "vmConfigStoragePathId") private String vmConfigStoragePathId; - /** Creates an instance of VirtualMachineInstancePropertiesStorageProfile class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesStorageProfile class. + */ public VirtualMachineInstancePropertiesStorageProfile() { } /** * Get the dataDisks property: adds data disks to the virtual machine instance. - * + * * @return the dataDisks value. */ public List dataDisks() { @@ -50,19 +54,19 @@ public List dataDis /** * Set the dataDisks property: adds data disks to the virtual machine instance. - * + * * @param dataDisks the dataDisks value to set. * @return the VirtualMachineInstancePropertiesStorageProfile object itself. */ - public VirtualMachineInstancePropertiesStorageProfile withDataDisks( - List dataDisks) { + public VirtualMachineInstancePropertiesStorageProfile + withDataDisks(List dataDisks) { this.dataDisks = dataDisks; return this; } /** * Get the imageReference property: Which Image to use for the virtual machine instance. - * + * * @return the imageReference value. */ public VirtualMachineInstancePropertiesStorageProfileImageReference imageReference() { @@ -71,19 +75,19 @@ public VirtualMachineInstancePropertiesStorageProfileImageReference imageReferen /** * Set the imageReference property: Which Image to use for the virtual machine instance. - * + * * @param imageReference the imageReference value to set. * @return the VirtualMachineInstancePropertiesStorageProfile object itself. */ - public VirtualMachineInstancePropertiesStorageProfile withImageReference( - VirtualMachineInstancePropertiesStorageProfileImageReference imageReference) { + public VirtualMachineInstancePropertiesStorageProfile + withImageReference(VirtualMachineInstancePropertiesStorageProfileImageReference imageReference) { this.imageReference = imageReference; return this; } /** * Get the osDisk property: VHD to attach as OS disk. - * + * * @return the osDisk value. */ public VirtualMachineInstancePropertiesStorageProfileOsDisk osDisk() { @@ -92,19 +96,19 @@ public VirtualMachineInstancePropertiesStorageProfileOsDisk osDisk() { /** * Set the osDisk property: VHD to attach as OS disk. - * + * * @param osDisk the osDisk value to set. * @return the VirtualMachineInstancePropertiesStorageProfile object itself. */ - public VirtualMachineInstancePropertiesStorageProfile withOsDisk( - VirtualMachineInstancePropertiesStorageProfileOsDisk osDisk) { + public VirtualMachineInstancePropertiesStorageProfile + withOsDisk(VirtualMachineInstancePropertiesStorageProfileOsDisk osDisk) { this.osDisk = osDisk; return this; } /** * Get the vmConfigStoragePathId property: Id of the storage container that hosts the VM configuration file. - * + * * @return the vmConfigStoragePathId value. */ public String vmConfigStoragePathId() { @@ -113,7 +117,7 @@ public String vmConfigStoragePathId() { /** * Set the vmConfigStoragePathId property: Id of the storage container that hosts the VM configuration file. - * + * * @param vmConfigStoragePathId the vmConfigStoragePathId value to set. * @return the VirtualMachineInstancePropertiesStorageProfile object itself. */ @@ -124,7 +128,7 @@ public VirtualMachineInstancePropertiesStorageProfile withVmConfigStoragePathId( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileDataDisksItem.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileDataDisksItem.java index f51f94fb44f57..e26ce39db3d5c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileDataDisksItem.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileDataDisksItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VirtualMachineInstancePropertiesStorageProfileDataDisksItem model. */ +/** + * The VirtualMachineInstancePropertiesStorageProfileDataDisksItem model. + */ @Fluent public final class VirtualMachineInstancePropertiesStorageProfileDataDisksItem { /* @@ -16,13 +18,15 @@ public final class VirtualMachineInstancePropertiesStorageProfileDataDisksItem { @JsonProperty(value = "id") private String id; - /** Creates an instance of VirtualMachineInstancePropertiesStorageProfileDataDisksItem class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesStorageProfileDataDisksItem class. + */ public VirtualMachineInstancePropertiesStorageProfileDataDisksItem() { } /** * Get the id property: Resource ID of the data disk. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: Resource ID of the data disk. - * + * * @param id the id value to set. * @return the VirtualMachineInstancePropertiesStorageProfileDataDisksItem object itself. */ @@ -42,7 +46,7 @@ public VirtualMachineInstancePropertiesStorageProfileDataDisksItem withId(String /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileImageReference.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileImageReference.java index f9a099ce28a4b..4aefe8c617810 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileImageReference.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileImageReference.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Which Image to use for the virtual machine instance. */ +/** + * Which Image to use for the virtual machine instance. + */ @Fluent public final class VirtualMachineInstancePropertiesStorageProfileImageReference { /* @@ -16,13 +18,15 @@ public final class VirtualMachineInstancePropertiesStorageProfileImageReference @JsonProperty(value = "id") private String id; - /** Creates an instance of VirtualMachineInstancePropertiesStorageProfileImageReference class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesStorageProfileImageReference class. + */ public VirtualMachineInstancePropertiesStorageProfileImageReference() { } /** * Get the id property: Resource ID of the image. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: Resource ID of the image. - * + * * @param id the id value to set. * @return the VirtualMachineInstancePropertiesStorageProfileImageReference object itself. */ @@ -42,7 +46,7 @@ public VirtualMachineInstancePropertiesStorageProfileImageReference withId(Strin /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java index 9e7571961f624..dad2baa868db3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstancePropertiesStorageProfileOsDisk.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** VHD to attach as OS disk. */ +/** + * VHD to attach as OS disk. + */ @Fluent public final class VirtualMachineInstancePropertiesStorageProfileOsDisk { /* @@ -17,19 +19,20 @@ public final class VirtualMachineInstancePropertiesStorageProfileOsDisk { private String id; /* - * This property allows you to specify the type of the OS that is included in the disk if creating a VM from - * user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** + * This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** */ @JsonProperty(value = "osType") private OperatingSystemTypes osType; - /** Creates an instance of VirtualMachineInstancePropertiesStorageProfileOsDisk class. */ + /** + * Creates an instance of VirtualMachineInstancePropertiesStorageProfileOsDisk class. + */ public VirtualMachineInstancePropertiesStorageProfileOsDisk() { } /** * Get the id property: Resource ID of the OS disk. - * + * * @return the id value. */ public String id() { @@ -38,7 +41,7 @@ public String id() { /** * Set the id property: Resource ID of the OS disk. - * + * * @param id the id value to set. * @return the VirtualMachineInstancePropertiesStorageProfileOsDisk object itself. */ @@ -50,7 +53,7 @@ public VirtualMachineInstancePropertiesStorageProfileOsDisk withId(String id) { /** * Get the osType property: This property allows you to specify the type of the OS that is included in the disk if * creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. - * + * * @return the osType value. */ public OperatingSystemTypes osType() { @@ -60,7 +63,7 @@ public OperatingSystemTypes osType() { /** * Set the osType property: This property allows you to specify the type of the OS that is included in the disk if * creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**. - * + * * @param osType the osType value to set. * @return the VirtualMachineInstancePropertiesStorageProfileOsDisk object itself. */ @@ -71,7 +74,7 @@ public VirtualMachineInstancePropertiesStorageProfileOsDisk withOsType(Operating /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceStatus.java index c3ba6d850df99..8c6b3de9bf6c9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The observed state of virtual machine instances. */ +/** + * The observed state of virtual machine instances. + */ @Fluent public final class VirtualMachineInstanceStatus { /* @@ -34,13 +36,15 @@ public final class VirtualMachineInstanceStatus { @JsonProperty(value = "provisioningStatus") private VirtualMachineInstanceStatusProvisioningStatus provisioningStatus; - /** Creates an instance of VirtualMachineInstanceStatus class. */ + /** + * Creates an instance of VirtualMachineInstanceStatus class. + */ public VirtualMachineInstanceStatus() { } /** * Get the errorCode property: VirtualMachine provisioning error code. - * + * * @return the errorCode value. */ public String errorCode() { @@ -49,7 +53,7 @@ public String errorCode() { /** * Set the errorCode property: VirtualMachine provisioning error code. - * + * * @param errorCode the errorCode value to set. * @return the VirtualMachineInstanceStatus object itself. */ @@ -60,7 +64,7 @@ public VirtualMachineInstanceStatus withErrorCode(String errorCode) { /** * Get the errorMessage property: Descriptive error message. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -69,7 +73,7 @@ public String errorMessage() { /** * Set the errorMessage property: Descriptive error message. - * + * * @param errorMessage the errorMessage value to set. * @return the VirtualMachineInstanceStatus object itself. */ @@ -80,7 +84,7 @@ public VirtualMachineInstanceStatus withErrorMessage(String errorMessage) { /** * Get the powerState property: The power state of the virtual machine instance. - * + * * @return the powerState value. */ public PowerStateEnum powerState() { @@ -89,7 +93,7 @@ public PowerStateEnum powerState() { /** * Set the powerState property: The power state of the virtual machine instance. - * + * * @param powerState the powerState value to set. * @return the VirtualMachineInstanceStatus object itself. */ @@ -100,7 +104,7 @@ public VirtualMachineInstanceStatus withPowerState(PowerStateEnum powerState) { /** * Get the provisioningStatus property: The provisioningStatus property. - * + * * @return the provisioningStatus value. */ public VirtualMachineInstanceStatusProvisioningStatus provisioningStatus() { @@ -109,19 +113,19 @@ public VirtualMachineInstanceStatusProvisioningStatus provisioningStatus() { /** * Set the provisioningStatus property: The provisioningStatus property. - * + * * @param provisioningStatus the provisioningStatus value to set. * @return the VirtualMachineInstanceStatus object itself. */ - public VirtualMachineInstanceStatus withProvisioningStatus( - VirtualMachineInstanceStatusProvisioningStatus provisioningStatus) { + public VirtualMachineInstanceStatus + withProvisioningStatus(VirtualMachineInstanceStatusProvisioningStatus provisioningStatus) { this.provisioningStatus = provisioningStatus; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceStatusProvisioningStatus.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceStatusProvisioningStatus.java index ed458095d1c74..9345ed3f80ed2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceStatusProvisioningStatus.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceStatusProvisioningStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VirtualMachineInstanceStatusProvisioningStatus model. */ +/** + * The VirtualMachineInstanceStatusProvisioningStatus model. + */ @Fluent public final class VirtualMachineInstanceStatusProvisioningStatus { /* @@ -22,13 +24,15 @@ public final class VirtualMachineInstanceStatusProvisioningStatus { @JsonProperty(value = "status") private Status status; - /** Creates an instance of VirtualMachineInstanceStatusProvisioningStatus class. */ + /** + * Creates an instance of VirtualMachineInstanceStatusProvisioningStatus class. + */ public VirtualMachineInstanceStatusProvisioningStatus() { } /** * Get the operationId property: The ID of the operation performed on the virtual machine instance. - * + * * @return the operationId value. */ public String operationId() { @@ -37,7 +41,7 @@ public String operationId() { /** * Set the operationId property: The ID of the operation performed on the virtual machine instance. - * + * * @param operationId the operationId value to set. * @return the VirtualMachineInstanceStatusProvisioningStatus object itself. */ @@ -49,7 +53,7 @@ public VirtualMachineInstanceStatusProvisioningStatus withOperationId(String ope /** * Get the status property: The status of the operation performed on the virtual machine instance [Succeeded, * Failed, InProgress]. - * + * * @return the status value. */ public Status status() { @@ -59,7 +63,7 @@ public Status status() { /** * Set the status property: The status of the operation performed on the virtual machine instance [Succeeded, * Failed, InProgress]. - * + * * @param status the status value to set. * @return the VirtualMachineInstanceStatusProvisioningStatus object itself. */ @@ -70,7 +74,7 @@ public VirtualMachineInstanceStatusProvisioningStatus withStatus(Status status) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceUpdateProperties.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceUpdateProperties.java index bcd3277ff094f..3bdcd38ffefbc 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceUpdateProperties.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceUpdateProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines the resource properties for the update. */ +/** + * Defines the resource properties for the update. + */ @Fluent public final class VirtualMachineInstanceUpdateProperties { /* @@ -34,14 +36,16 @@ public final class VirtualMachineInstanceUpdateProperties { @JsonProperty(value = "osProfile") private OsProfileUpdate osProfile; - /** Creates an instance of VirtualMachineInstanceUpdateProperties class. */ + /** + * Creates an instance of VirtualMachineInstanceUpdateProperties class. + */ public VirtualMachineInstanceUpdateProperties() { } /** * Get the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine * instance. - * + * * @return the hardwareProfile value. */ public HardwareProfileUpdate hardwareProfile() { @@ -51,7 +55,7 @@ public HardwareProfileUpdate hardwareProfile() { /** * Set the hardwareProfile property: HardwareProfile - Specifies the hardware settings for the virtual machine * instance. - * + * * @param hardwareProfile the hardwareProfile value to set. * @return the VirtualMachineInstanceUpdateProperties object itself. */ @@ -62,7 +66,7 @@ public VirtualMachineInstanceUpdateProperties withHardwareProfile(HardwareProfil /** * Get the storageProfile property: The storageProfile property. - * + * * @return the storageProfile value. */ public StorageProfileUpdate storageProfile() { @@ -71,7 +75,7 @@ public StorageProfileUpdate storageProfile() { /** * Set the storageProfile property: The storageProfile property. - * + * * @param storageProfile the storageProfile value to set. * @return the VirtualMachineInstanceUpdateProperties object itself. */ @@ -83,7 +87,7 @@ public VirtualMachineInstanceUpdateProperties withStorageProfile(StorageProfileU /** * Get the networkProfile property: NetworkProfile - describes the network update configuration the virtual machine * instance. - * + * * @return the networkProfile value. */ public NetworkProfileUpdate networkProfile() { @@ -93,7 +97,7 @@ public NetworkProfileUpdate networkProfile() { /** * Set the networkProfile property: NetworkProfile - describes the network update configuration the virtual machine * instance. - * + * * @param networkProfile the networkProfile value to set. * @return the VirtualMachineInstanceUpdateProperties object itself. */ @@ -104,7 +108,7 @@ public VirtualMachineInstanceUpdateProperties withNetworkProfile(NetworkProfileU /** * Get the osProfile property: OsProfile - describes the update configuration of the operating system. - * + * * @return the osProfile value. */ public OsProfileUpdate osProfile() { @@ -113,7 +117,7 @@ public OsProfileUpdate osProfile() { /** * Set the osProfile property: OsProfile - describes the update configuration of the operating system. - * + * * @param osProfile the osProfile value to set. * @return the VirtualMachineInstanceUpdateProperties object itself. */ @@ -124,7 +128,7 @@ public VirtualMachineInstanceUpdateProperties withOsProfile(OsProfileUpdate osPr /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceUpdateRequest.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceUpdateRequest.java index 5070e3dfca448..1f1039518c8c8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceUpdateRequest.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceUpdateRequest.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The virtual machine instance resource patch definition. */ +/** + * The virtual machine instance resource patch definition. + */ @Fluent public final class VirtualMachineInstanceUpdateRequest { /* @@ -22,13 +24,15 @@ public final class VirtualMachineInstanceUpdateRequest { @JsonProperty(value = "identity") private Identity identity; - /** Creates an instance of VirtualMachineInstanceUpdateRequest class. */ + /** + * Creates an instance of VirtualMachineInstanceUpdateRequest class. + */ public VirtualMachineInstanceUpdateRequest() { } /** * Get the properties property: Defines the resource properties for the update. - * + * * @return the properties value. */ public VirtualMachineInstanceUpdateProperties properties() { @@ -37,7 +41,7 @@ public VirtualMachineInstanceUpdateProperties properties() { /** * Set the properties property: Defines the resource properties for the update. - * + * * @param properties the properties value to set. * @return the VirtualMachineInstanceUpdateRequest object itself. */ @@ -48,7 +52,7 @@ public VirtualMachineInstanceUpdateRequest withProperties(VirtualMachineInstance /** * Get the identity property: Identity for the resource. - * + * * @return the identity value. */ public Identity identity() { @@ -57,7 +61,7 @@ public Identity identity() { /** * Set the identity property: Identity for the resource. - * + * * @param identity the identity value to set. * @return the VirtualMachineInstanceUpdateRequest object itself. */ @@ -68,7 +72,7 @@ public VirtualMachineInstanceUpdateRequest withIdentity(Identity identity) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceView.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceView.java index 666617fa3504f..52ef8329fdcb2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceView.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstanceView.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The instance view of a virtual machine. */ +/** + * The instance view of a virtual machine. + */ @Fluent public final class VirtualMachineInstanceView { /* @@ -16,13 +18,15 @@ public final class VirtualMachineInstanceView { @JsonProperty(value = "vmAgent") private VirtualMachineConfigAgentInstanceView vmAgent; - /** Creates an instance of VirtualMachineInstanceView class. */ + /** + * Creates an instance of VirtualMachineInstanceView class. + */ public VirtualMachineInstanceView() { } /** * Get the vmAgent property: The VM Config Agent running on the virtual machine. - * + * * @return the vmAgent value. */ public VirtualMachineConfigAgentInstanceView vmAgent() { @@ -31,7 +35,7 @@ public VirtualMachineConfigAgentInstanceView vmAgent() { /** * Set the vmAgent property: The VM Config Agent running on the virtual machine. - * + * * @param vmAgent the vmAgent value to set. * @return the VirtualMachineInstanceView object itself. */ @@ -42,7 +46,7 @@ public VirtualMachineInstanceView withVmAgent(VirtualMachineConfigAgentInstanceV /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstances.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstances.java index c0ace49963d4b..22a17477d36c1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstances.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualMachineInstances.java @@ -9,13 +9,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.azurestackhci.fluent.models.VirtualMachineInstanceInner; -/** Resource collection API of VirtualMachineInstances. */ +/** + * Resource collection API of VirtualMachineInstances. + */ public interface VirtualMachineInstances { /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -26,9 +28,9 @@ public interface VirtualMachineInstances { /** * Gets a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -39,9 +41,9 @@ public interface VirtualMachineInstances { /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -53,9 +55,9 @@ public interface VirtualMachineInstances { /** * The operation to create or update a virtual machine instance. Please note some properties can be set only during * virtual machine instance creation. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,14 +65,14 @@ public interface VirtualMachineInstances { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the virtual machine instance resource definition. */ - VirtualMachineInstance createOrUpdate( - String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, Context context); + VirtualMachineInstance createOrUpdate(String resourceUri, VirtualMachineInstanceInner virtualMachineInstance, + Context context); /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -79,9 +81,9 @@ VirtualMachineInstance createOrUpdate( /** * The operation to delete a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -91,9 +93,9 @@ VirtualMachineInstance createOrUpdate( /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -104,9 +106,9 @@ VirtualMachineInstance createOrUpdate( /** * The operation to update a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @param virtualMachineInstance The virtual machine instance resource patch definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,14 +116,14 @@ VirtualMachineInstance createOrUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the virtual machine instance resource definition. */ - VirtualMachineInstance update( - String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, Context context); + VirtualMachineInstance update(String resourceUri, VirtualMachineInstanceUpdateRequest virtualMachineInstance, + Context context); /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -131,9 +133,9 @@ VirtualMachineInstance update( /** * The operation to start a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -144,9 +146,9 @@ VirtualMachineInstance update( /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -156,9 +158,9 @@ VirtualMachineInstance update( /** * The operation to stop a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -169,9 +171,9 @@ VirtualMachineInstance update( /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -181,9 +183,9 @@ VirtualMachineInstance update( /** * The operation to restart a virtual machine instance. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -194,9 +196,9 @@ VirtualMachineInstance update( /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. @@ -206,9 +208,9 @@ VirtualMachineInstance update( /** * Lists all of the virtual machine instances within the specified parent resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource - * to be extended. + * to be extended. * @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. diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualSwitchConfigurationOverrides.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualSwitchConfigurationOverrides.java new file mode 100644 index 0000000000000..79e564f9b0ce9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VirtualSwitchConfigurationOverrides.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The VirtualSwitchConfigurationOverrides of a cluster. + */ +@Fluent +public final class VirtualSwitchConfigurationOverrides { + /* + * Enable IoV for Virtual Switch + */ + @JsonProperty(value = "enableIov") + private String enableIov; + + /* + * Load Balancing Algorithm for Virtual Switch + */ + @JsonProperty(value = "loadBalancingAlgorithm") + private String loadBalancingAlgorithm; + + /** + * Creates an instance of VirtualSwitchConfigurationOverrides class. + */ + public VirtualSwitchConfigurationOverrides() { + } + + /** + * Get the enableIov property: Enable IoV for Virtual Switch. + * + * @return the enableIov value. + */ + public String enableIov() { + return this.enableIov; + } + + /** + * Set the enableIov property: Enable IoV for Virtual Switch. + * + * @param enableIov the enableIov value to set. + * @return the VirtualSwitchConfigurationOverrides object itself. + */ + public VirtualSwitchConfigurationOverrides withEnableIov(String enableIov) { + this.enableIov = enableIov; + return this; + } + + /** + * Get the loadBalancingAlgorithm property: Load Balancing Algorithm for Virtual Switch. + * + * @return the loadBalancingAlgorithm value. + */ + public String loadBalancingAlgorithm() { + return this.loadBalancingAlgorithm; + } + + /** + * Set the loadBalancingAlgorithm property: Load Balancing Algorithm for Virtual Switch. + * + * @param loadBalancingAlgorithm the loadBalancingAlgorithm value to set. + * @return the VirtualSwitchConfigurationOverrides object itself. + */ + public VirtualSwitchConfigurationOverrides withLoadBalancingAlgorithm(String loadBalancingAlgorithm) { + this.loadBalancingAlgorithm = loadBalancingAlgorithm; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VmSizeEnum.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VmSizeEnum.java index c5b18f143119e..024d422a60bbe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VmSizeEnum.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/VmSizeEnum.java @@ -8,80 +8,128 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VmSizeEnum. */ +/** + * Defines values for VmSizeEnum. + */ public final class VmSizeEnum extends ExpandableStringEnum { - /** Static value Default for VmSizeEnum. */ + /** + * Static value Default for VmSizeEnum. + */ public static final VmSizeEnum DEFAULT = fromString("Default"); - /** Static value Standard_A2_v2 for VmSizeEnum. */ + /** + * Static value Standard_A2_v2 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_A2_V2 = fromString("Standard_A2_v2"); - /** Static value Standard_A4_v2 for VmSizeEnum. */ + /** + * Static value Standard_A4_v2 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_A4_V2 = fromString("Standard_A4_v2"); - /** Static value Standard_D2s_v3 for VmSizeEnum. */ + /** + * Static value Standard_D2s_v3 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_D2S_V3 = fromString("Standard_D2s_v3"); - /** Static value Standard_D4s_v3 for VmSizeEnum. */ + /** + * Static value Standard_D4s_v3 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_D4S_V3 = fromString("Standard_D4s_v3"); - /** Static value Standard_D8s_v3 for VmSizeEnum. */ + /** + * Static value Standard_D8s_v3 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_D8S_V3 = fromString("Standard_D8s_v3"); - /** Static value Standard_D16s_v3 for VmSizeEnum. */ + /** + * Static value Standard_D16s_v3 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_D16S_V3 = fromString("Standard_D16s_v3"); - /** Static value Standard_D32s_v3 for VmSizeEnum. */ + /** + * Static value Standard_D32s_v3 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_D32S_V3 = fromString("Standard_D32s_v3"); - /** Static value Standard_DS2_v2 for VmSizeEnum. */ + /** + * Static value Standard_DS2_v2 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_DS2_V2 = fromString("Standard_DS2_v2"); - /** Static value Standard_DS3_v2 for VmSizeEnum. */ + /** + * Static value Standard_DS3_v2 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_DS3_V2 = fromString("Standard_DS3_v2"); - /** Static value Standard_DS4_v2 for VmSizeEnum. */ + /** + * Static value Standard_DS4_v2 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_DS4_V2 = fromString("Standard_DS4_v2"); - /** Static value Standard_DS5_v2 for VmSizeEnum. */ + /** + * Static value Standard_DS5_v2 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_DS5_V2 = fromString("Standard_DS5_v2"); - /** Static value Standard_DS13_v2 for VmSizeEnum. */ + /** + * Static value Standard_DS13_v2 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_DS13_V2 = fromString("Standard_DS13_v2"); - /** Static value Standard_K8S_v1 for VmSizeEnum. */ + /** + * Static value Standard_K8S_v1 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_K8S_V1 = fromString("Standard_K8S_v1"); - /** Static value Standard_K8S2_v1 for VmSizeEnum. */ + /** + * Static value Standard_K8S2_v1 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_K8S2_V1 = fromString("Standard_K8S2_v1"); - /** Static value Standard_K8S3_v1 for VmSizeEnum. */ + /** + * Static value Standard_K8S3_v1 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_K8S3_V1 = fromString("Standard_K8S3_v1"); - /** Static value Standard_K8S4_v1 for VmSizeEnum. */ + /** + * Static value Standard_K8S4_v1 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_K8S4_V1 = fromString("Standard_K8S4_v1"); - /** Static value Standard_NK6 for VmSizeEnum. */ + /** + * Static value Standard_NK6 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_NK6 = fromString("Standard_NK6"); - /** Static value Standard_NK12 for VmSizeEnum. */ + /** + * Static value Standard_NK12 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_NK12 = fromString("Standard_NK12"); - /** Static value Standard_NV6 for VmSizeEnum. */ + /** + * Static value Standard_NV6 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_NV6 = fromString("Standard_NV6"); - /** Static value Standard_NV12 for VmSizeEnum. */ + /** + * Static value Standard_NV12 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_NV12 = fromString("Standard_NV12"); - /** Static value Standard_K8S5_v1 for VmSizeEnum. */ + /** + * Static value Standard_K8S5_v1 for VmSizeEnum. + */ public static final VmSizeEnum STANDARD_K8S5_V1 = fromString("Standard_K8S5_v1"); - /** Static value Custom for VmSizeEnum. */ + /** + * Static value Custom for VmSizeEnum. + */ public static final VmSizeEnum CUSTOM = fromString("Custom"); /** * Creates a new instance of VmSizeEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -90,7 +138,7 @@ public VmSizeEnum() { /** * Creates or finds a VmSizeEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding VmSizeEnum. */ @@ -101,7 +149,7 @@ public static VmSizeEnum fromString(String name) { /** * Gets known VmSizeEnum values. - * + * * @return known VmSizeEnum values. */ public static Collection values() { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java new file mode 100644 index 0000000000000..05a4d552db400 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/WindowsServerSubscription.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Desired state of Windows Server Subscription. + */ +public final class WindowsServerSubscription extends ExpandableStringEnum { + /** + * Static value Disabled for WindowsServerSubscription. + */ + public static final WindowsServerSubscription DISABLED = fromString("Disabled"); + + /** + * Static value Enabled for WindowsServerSubscription. + */ + public static final WindowsServerSubscription ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of WindowsServerSubscription value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WindowsServerSubscription() { + } + + /** + * Creates or finds a WindowsServerSubscription from its string representation. + * + * @param name a name to look for. + * @return the corresponding WindowsServerSubscription. + */ + @JsonCreator + public static WindowsServerSubscription fromString(String name) { + return fromString(name, WindowsServerSubscription.class); + } + + /** + * Gets known WindowsServerSubscription values. + * + * @return known WindowsServerSubscription values. + */ + public static Collection values() { + return values(WindowsServerSubscription.class); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java index 82445134a9b5f..22d0ea7950cf9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for AzureStackHciClient. Azure Stack HCI management service. */ +/** + * Package containing the data models for AzureStackHciClient. + * Azure Stack HCI management service. + */ package com.azure.resourcemanager.azurestackhci.models; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java index af64fac35b881..505b7ec7c29ab 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/com/azure/resourcemanager/azurestackhci/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for AzureStackHciClient. Azure Stack HCI management service. */ +/** + * Package containing the classes for AzureStackHciClient. + * Azure Stack HCI management service. + */ package com.azure.resourcemanager.azurestackhci; diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/module-info.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/module-info.java index 3f4ea8ed319db..da6d2e788e0eb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/module-info.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.azurestackhci { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.azurestackhci; exports com.azure.resourcemanager.azurestackhci.fluent; exports com.azure.resourcemanager.azurestackhci.fluent.models; exports com.azure.resourcemanager.azurestackhci.models; - - opens com.azure.resourcemanager.azurestackhci.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.azurestackhci.models to - com.azure.core, - com.fasterxml.jackson.databind; -} + opens com.azure.resourcemanager.azurestackhci.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.azurestackhci.models to com.azure.core, com.fasterxml.jackson.databind; +} \ No newline at end of file diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json index 92327034b7385..e47b2f761861c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.azurestackhci.implementation.GalleryImagesOperationsClientImpl$GalleryImagesOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.LogicalNetworksOperationsClientImpl$LogicalNetworksOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.MarketplaceGalleryImagesOperationsClientImpl$MarketplaceGalleryImagesOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.NetworkInterfacesOperationsClientImpl$NetworkInterfacesOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.StorageContainersOperationsClientImpl$StorageContainersOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.VirtualHardDisksOperationsClientImpl$VirtualHardDisksOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.VirtualMachineInstancesClientImpl$VirtualMachineInstancesService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.HybridIdentityMetadatasClientImpl$HybridIdentityMetadatasService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.GuestAgentsClientImpl$GuestAgentsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.GuestAgentsOperationsClientImpl$GuestAgentsOperationsService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.azurestackhci.implementation.ArcSettingsClientImpl$ArcSettingsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.ClustersClientImpl$ClustersService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.DeploymentSettingsClientImpl$DeploymentSettingsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.EdgeDevicesClientImpl$EdgeDevicesService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.ExtensionsClientImpl$ExtensionsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.GalleryImagesOperationsClientImpl$GalleryImagesOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.LogicalNetworksOperationsClientImpl$LogicalNetworksOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.MarketplaceGalleryImagesOperationsClientImpl$MarketplaceGalleryImagesOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.NetworkInterfacesOperationsClientImpl$NetworkInterfacesOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.OffersClientImpl$OffersService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.PublishersClientImpl$PublishersService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.SecuritySettingsClientImpl$SecuritySettingsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.SkusClientImpl$SkusService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.StorageContainersOperationsClientImpl$StorageContainersOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.UpdateRunsClientImpl$UpdateRunsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.UpdateSummariesOperationsClientImpl$UpdateSummariesOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.UpdatesClientImpl$UpdatesService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.VirtualHardDisksOperationsClientImpl$VirtualHardDisksOperationsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.VirtualMachineInstancesClientImpl$VirtualMachineInstancesService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.HybridIdentityMetadatasClientImpl$HybridIdentityMetadatasService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.GuestAgentsClientImpl$GuestAgentsService" ], [ "com.azure.resourcemanager.azurestackhci.implementation.GuestAgentsOperationsClientImpl$GuestAgentsOperationsService" ] ] \ No newline at end of file diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/reflect-config.json b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/reflect-config.json index ae410819794d8..c6fc9f70bf15d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/reflect-config.json +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-azurestackhci/reflect-config.json @@ -1,4 +1,354 @@ [ { + "name" : "com.azure.resourcemanager.azurestackhci.models.ArcSettingList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.PerNodeState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DefaultExtensionDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ArcSettingsPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ArcSettingsPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.PasswordCredentialInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ArcIdentityResponseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ClusterList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ManagedServiceIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.UserAssignedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ClusterReportedProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ClusterNode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.IsolatedVmAttestationConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ClusterPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.RawCertificateData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ClusterIdentityResponseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequestProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeploymentSettingListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.DeploymentSettingsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ScaleUnits", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeploymentData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeploymentSecuritySettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.Observability", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeploymentCluster", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.Storage", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.IpPools", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.PhysicalNodes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.HostNetwork", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.Intents", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.VirtualSwitchConfigurationOverrides", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.QosPolicyOverrides", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.AdapterPropertyOverrides", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.StorageNetworks", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.OptionalServices", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ReportedProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ValidationStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeploymentStep", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeploymentStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.EdgeDeviceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.EdgeDeviceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.NicDetail", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ValidateRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ValidateResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtensionList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.PerNodeExtensionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceView", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtensionInstanceViewStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtensionPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.ExtensionPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.GalleryImagesInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, @@ -68,21 +418,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.azurestackhci.models.OperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.azurestackhci.models.OperationDisplay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.LogicalNetworksInner", "allDeclaredConstructors" : true, @@ -248,6 +583,91 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.OfferList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.OfferInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.OfferProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SkuMappings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.OperationListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.Operation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.PublisherList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.PublisherInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.PublisherProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SecuritySettingListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.SecuritySettingInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.SecurityProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SecurityComplianceStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SkuList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.SkuInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.SkuProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.StorageContainersInner", "allDeclaredConstructors" : true, @@ -278,6 +698,81 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.UpdateRunList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateRunProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.Step", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.UpdateSummariesList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.PackageVersionInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.PrecheckResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.PrecheckResultTags", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.UpdateList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.HciUpdateInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.UpdateStateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.azurestackhci.fluent.models.VirtualHardDisksInner", "allDeclaredConstructors" : true, @@ -523,6 +1018,96 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ArcSettingAggregateState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.NodeArcState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.Status", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ConnectivityStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ClusterNodeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.OemActivation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ImdsAttestation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DeploymentMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtensionAggregateState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.NodeExtensionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.StatusLevelTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtensionManagedBy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.azurestackhci.models.CloudInitDataSource", "allDeclaredConstructors" : true, @@ -539,12 +1124,12 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.azurestackhci.models.Status", + "name" : "com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes", + "name" : "com.azure.resourcemanager.azurestackhci.models.IpAllocationMethodEnum", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -559,27 +1144,62 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.azurestackhci.models.IpAllocationMethodEnum", + "name" : "com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.azurestackhci.models.DiskFileFormat", + "name" : "com.azure.resourcemanager.azurestackhci.models.ComplianceStatus", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.azurestackhci.models.VmSizeEnum", + "name" : "com.azure.resourcemanager.azurestackhci.models.UpdateRunPropertiesState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.azurestackhci.models.SecurityTypes", + "name" : "com.azure.resourcemanager.azurestackhci.models.HealthState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.azurestackhci.models.StatusLevelTypes", + "name" : "com.azure.resourcemanager.azurestackhci.models.Severity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.State", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.RebootRequirement", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.AvailabilityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.DiskFileFormat", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.VmSizeEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.azurestackhci.models.SecurityTypes", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java new file mode 100644 index 0000000000000..4e59805dd0211 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsConsentAndInstallDefaultExtensionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ArcSettings ConsentAndInstallDefaultExtensions. + */ +public final class ArcSettingsConsentAndInstallDefaultExtensionsSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ConsentAndInstallDefaultExtensions.json + */ + /** + * Sample code: Consent And Install Default Extensions. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + consentAndInstallDefaultExtensions(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings() + .consentAndInstallDefaultExtensionsWithResponse("test-rg", "myCluster", "default", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java new file mode 100644 index 0000000000000..00919bdbf9c81 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateIdentitySamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ArcSettings CreateIdentity. + */ +public final class ArcSettingsCreateIdentitySamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/CreateArcIdentity.json + */ + /** + * Sample code: Create Arc Identity. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createArcIdentity(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().createIdentity("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java new file mode 100644 index 0000000000000..ac1009ed84aa6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsCreateSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ArcSettings Create. + */ +public final class ArcSettingsCreateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutArcSetting.json + */ + /** + * Sample code: Create ArcSetting. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().define("default").withExistingCluster("test-rg", "myCluster").create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java new file mode 100644 index 0000000000000..ad813d722b8b2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ArcSettings Delete. + */ +public final class ArcSettingsDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteArcSetting.json + */ + /** + * Sample code: Delete ArcSetting. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().delete("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java new file mode 100644 index 0000000000000..b7979981a03bc --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGeneratePasswordSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ArcSettings GeneratePassword. + */ +public final class ArcSettingsGeneratePasswordSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GeneratePassword.json + */ + /** + * Sample code: Generate Password. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void generatePassword(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings() + .generatePasswordWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java new file mode 100644 index 0000000000000..813b8b90123fa --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ArcSettings Get. + */ +public final class ArcSettingsGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetArcSetting.json + */ + /** + * Sample code: Get ArcSetting. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java new file mode 100644 index 0000000000000..466d7c55dc4f1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsInitializeDisableProcessSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ArcSettings InitializeDisableProcess. + */ +public final class ArcSettingsInitializeDisableProcessSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/InitializeDisableProcess.json + */ + /** + * Sample code: Trigger ARC Disable. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void triggerARCDisable(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings() + .initializeDisableProcess("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java new file mode 100644 index 0000000000000..2fa2d0aca3946 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsListByClusterSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for ArcSettings ListByCluster. + */ +public final class ArcSettingsListByClusterSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListArcSettingsByCluster.json + */ + /** + * Sample code: List ArcSetting resources by HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listArcSettingResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.arcSettings().listByCluster("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java new file mode 100644 index 0000000000000..3b23719afc0f4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ArcSettingsUpdateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azurestackhci.models.ArcSetting; +import java.io.IOException; + +/** + * Samples for ArcSettings Update. + */ +public final class ArcSettingsUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PatchArcSetting.json + */ + /** + * Sample code: Patch ArcSetting. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void patchArcSetting(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) + throws IOException { + ArcSetting resource = manager.arcSettings() + .getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withConnectivityProperties(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"enabled\":true,\"serviceConfigurations\":[{\"port\":6516,\"serviceName\":\"WAC\"}]}", + Object.class, SerializerEncoding.JSON)) + .apply(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java new file mode 100644 index 0000000000000..5cfc4c6a58e80 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateIdentitySamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Clusters CreateIdentity. + */ +public final class ClustersCreateIdentitySamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/CreateClusterIdentity.json + */ + /** + * Sample code: Create cluster Identity. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createClusterIdentity(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().createIdentity("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java new file mode 100644 index 0000000000000..d4db3d128c793 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersCreateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; + +/** + * Samples for Clusters Create. + */ +public final class ClustersCreateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/CreateCluster.json + */ + /** + * Sample code: Create cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .define("myCluster") + .withRegion("East US") + .withExistingResourceGroup("test-rg") + .withTypeIdentityType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withCloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com") + .withAadClientId("24a6e53d-04e5-44d2-b7cc-1b732a847dfc") + .withAadTenantId("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94") + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java new file mode 100644 index 0000000000000..607c3719d4513 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Clusters Delete. + */ +public final class ClustersDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteCluster.json + */ + /** + * Sample code: Delete cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().delete("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java new file mode 100644 index 0000000000000..2843c7fa04db3 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersExtendSoftwareAssuranceBenefitSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequest; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceChangeRequestProperties; +import com.azure.resourcemanager.azurestackhci.models.SoftwareAssuranceIntent; + +/** + * Samples for Clusters ExtendSoftwareAssuranceBenefit. + */ +public final class ClustersExtendSoftwareAssuranceBenefitSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ExtendSoftwareAssuranceBenefit.json + */ + /** + * Sample code: Create cluster Identity. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createClusterIdentity(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .extendSoftwareAssuranceBenefit("test-rg", "myCluster", + new SoftwareAssuranceChangeRequest().withProperties(new SoftwareAssuranceChangeRequestProperties() + .withSoftwareAssuranceIntent(SoftwareAssuranceIntent.ENABLE)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..4f9c88ef78d9b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Clusters GetByResourceGroup. + */ +public final class ClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetCluster.json + */ + /** + * Sample code: Get cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().getByResourceGroupWithResponse("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java new file mode 100644 index 0000000000000..cb350039283ba --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Clusters ListByResourceGroup. + */ +public final class ClustersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListClustersByResourceGroup.json + */ + /** + * Sample code: List clusters in a given resource group. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listClustersInAGivenResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java new file mode 100644 index 0000000000000..6ef7c36ceb133 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Clusters List. + */ +public final class ClustersListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListClustersBySubscription.json + */ + /** + * Sample code: List clusters in a given subscription. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listClustersInAGivenSubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java new file mode 100644 index 0000000000000..93af35819ff14 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUpdateSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.Cluster; +import com.azure.resourcemanager.azurestackhci.models.ClusterDesiredProperties; +import com.azure.resourcemanager.azurestackhci.models.DiagnosticLevel; +import com.azure.resourcemanager.azurestackhci.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.azurestackhci.models.WindowsServerSubscription; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Clusters Update. + */ +public final class ClustersUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateCluster.json + */ + /** + * Sample code: Update cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void updateCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("test-rg", "myCluster", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withCloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com") + .withDesiredProperties( + new ClusterDesiredProperties().withWindowsServerSubscription(WindowsServerSubscription.ENABLED) + .withDiagnosticLevel(DiagnosticLevel.BASIC)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java new file mode 100644 index 0000000000000..8d9d68506fd32 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ClustersUploadCertificateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.RawCertificateData; +import com.azure.resourcemanager.azurestackhci.models.UploadCertificateRequest; +import java.util.Arrays; + +/** + * Samples for Clusters UploadCertificate. + */ +public final class ClustersUploadCertificateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UploadCertificate.json + */ + /** + * Sample code: Upload certificate. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void uploadCertificate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.clusters() + .uploadCertificate("test-rg", "myCluster", + new UploadCertificateRequest().withProperties( + new RawCertificateData().withCertificates(Arrays.asList("base64cert", "base64cert"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..e80d54f128d25 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsCreateOrUpdateSamples.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.AdapterPropertyOverrides; +import com.azure.resourcemanager.azurestackhci.models.DeploymentCluster; +import com.azure.resourcemanager.azurestackhci.models.DeploymentConfiguration; +import com.azure.resourcemanager.azurestackhci.models.DeploymentData; +import com.azure.resourcemanager.azurestackhci.models.DeploymentMode; +import com.azure.resourcemanager.azurestackhci.models.DeploymentSecuritySettings; +import com.azure.resourcemanager.azurestackhci.models.HostNetwork; +import com.azure.resourcemanager.azurestackhci.models.InfrastructureNetwork; +import com.azure.resourcemanager.azurestackhci.models.Intents; +import com.azure.resourcemanager.azurestackhci.models.IpPools; +import com.azure.resourcemanager.azurestackhci.models.Observability; +import com.azure.resourcemanager.azurestackhci.models.OptionalServices; +import com.azure.resourcemanager.azurestackhci.models.PhysicalNodes; +import com.azure.resourcemanager.azurestackhci.models.QosPolicyOverrides; +import com.azure.resourcemanager.azurestackhci.models.ScaleUnits; +import com.azure.resourcemanager.azurestackhci.models.Storage; +import com.azure.resourcemanager.azurestackhci.models.StorageNetworks; +import com.azure.resourcemanager.azurestackhci.models.VirtualSwitchConfigurationOverrides; +import java.util.Arrays; + +/** + * Samples for DeploymentSettings CreateOrUpdate. + */ +public final class DeploymentSettingsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutDeploymentSettings.json + */ + /** + * Sample code: Create Deployment Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings() + .define("default") + .withExistingCluster("test-rg", "myCluster") + .withArcNodeResourceIds(Arrays.asList( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2")) + .withDeploymentMode(DeploymentMode.DEPLOY) + .withDeploymentConfiguration(new DeploymentConfiguration().withVersion("string") + .withScaleUnits(Arrays.asList(new ScaleUnits().withDeploymentData(new DeploymentData() + .withSecuritySettings(new DeploymentSecuritySettings().withHvciProtection(true) + .withDrtmProtection(true) + .withDriftControlEnforced(true) + .withCredentialGuardEnforced(false) + .withSmbSigningEnforced(true) + .withSmbClusterEncryption(false) + .withSideChannelMitigationEnforced(true) + .withBitlockerBootVolume(true) + .withBitlockerDataVolumes(true) + .withWdacEnforced(true)) + .withObservability(new Observability().withStreamingDataClient(true) + .withEuLocation(false) + .withEpisodicDataUpload(true)) + .withCluster(new DeploymentCluster().withName("testHCICluster") + .withWitnessType("Cloud") + .withWitnessPath("Cloud") + .withCloudAccountName("myasestoragacct") + .withAzureServiceEndpoint("core.windows.net")) + .withStorage(new Storage().withConfigurationMode("Express")) + .withNamingPrefix("ms169") + .withDomainFqdn("ASZ1PLab8.nttest.microsoft.com") + .withInfrastructureNetwork(Arrays.asList(new InfrastructureNetwork().withSubnetMask("255.255.248.0") + .withGateway("255.255.248.0") + .withIpPools(Arrays + .asList(new IpPools().withStartingAddress("10.57.48.60").withEndingAddress("10.57.48.66"))) + .withDnsServers(Arrays.asList("10.57.50.90")))) + .withPhysicalNodes( + Arrays.asList(new PhysicalNodes().withName("ms169host").withIpv4Address("10.57.51.224"), + new PhysicalNodes().withName("ms154host").withIpv4Address("10.57.53.236"))) + .withHostNetwork(new HostNetwork() + .withIntents(Arrays.asList(new Intents().withName("Compute_Management") + .withTrafficType(Arrays.asList("Compute", "Management")) + .withAdapter(Arrays.asList("Port2")) + .withOverrideVirtualSwitchConfiguration(false) + .withVirtualSwitchConfigurationOverrides( + new VirtualSwitchConfigurationOverrides().withEnableIov("True") + .withLoadBalancingAlgorithm("HyperVPort")) + .withOverrideQosPolicy(false) + .withQosPolicyOverrides(new QosPolicyOverrides().withPriorityValue8021ActionCluster("7") + .withPriorityValue8021ActionSmb("3") + .withBandwidthPercentageSmb("50")) + .withOverrideAdapterProperty(false) + .withAdapterPropertyOverrides(new AdapterPropertyOverrides().withJumboPacket("1514") + .withNetworkDirect("Enabled") + .withNetworkDirectTechnology("iWARP")))) + .withStorageNetworks(Arrays.asList(new StorageNetworks().withName("Storage1Network") + .withNetworkAdapterName("Port3") + .withVlanId("5"))) + .withStorageConnectivitySwitchless(true)) + .withAdouPath("OU=ms169,DC=ASZ1PLab8,DC=nttest,DC=microsoft,DC=com") + .withSecretsLocation("fakeTokenPlaceholder") + .withOptionalServices(new OptionalServices().withCustomLocation("customLocationName")))))) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java new file mode 100644 index 0000000000000..687c935f428a1 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for DeploymentSettings Delete. + */ +public final class DeploymentSettingsDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteDeploymentSettings.json + */ + /** + * Sample code: Delete Deployment Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings().delete("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java new file mode 100644 index 0000000000000..139d402555f64 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for DeploymentSettings Get. + */ +public final class DeploymentSettingsGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetDeploymentSettings.json + */ + /** + * Sample code: Get Deployment Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings() + .getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java new file mode 100644 index 0000000000000..a1f2ee5d9a281 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/DeploymentSettingsListByClustersSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for DeploymentSettings ListByClusters. + */ +public final class DeploymentSettingsListByClustersSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListDeploymentSettingsByCluster.json + */ + /** + * Sample code: List Deployment Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listDeploymentSettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.deploymentSettings().listByClusters("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..b2201141b4e28 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesCreateOrUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.DeviceConfiguration; +import com.azure.resourcemanager.azurestackhci.models.NicDetail; +import java.util.Arrays; + +/** + * Samples for EdgeDevices CreateOrUpdate. + */ +public final class EdgeDevicesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutEdgeDevices.json + */ + /** + * Sample code: Create Edge Device. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .define("default") + .withExistingResourceUri( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1") + .withDeviceConfiguration( + new DeviceConfiguration().withNicDetails(Arrays.asList(new NicDetail().withAdapterName("ethernet") + .withInterfaceDescription("NDIS 6.70 ") + .withComponentId("VMBUS{f8615163-df3e-46c5-913f-f2d2f965ed0g} ") + .withDriverVersion("10.0.20348.1547 ") + .withIp4Address("10.10.10.10") + .withSubnetMask("255.255.255.0") + .withDefaultGateway("10.10.10.1") + .withDnsServers(Arrays.asList("100.10.10.1")) + .withDefaultIsolationId("0"))).withDeviceMetadata("")) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java new file mode 100644 index 0000000000000..0bbb6f268091b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for EdgeDevices Delete. + */ +public final class EdgeDevicesDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteEdgeDevices.json + */ + /** + * Sample code: Delete Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .delete( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java new file mode 100644 index 0000000000000..2c69d32c2d214 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for EdgeDevices Get. + */ +public final class EdgeDevicesGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetEdgeDevices.json + */ + /** + * Sample code: Get Edge Device. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getEdgeDevice(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java new file mode 100644 index 0000000000000..f18883d02c647 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for EdgeDevices List. + */ +public final class EdgeDevicesListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListEdgeDevices.json + */ + /** + * Sample code: List Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .list( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java new file mode 100644 index 0000000000000..bd00efb727843 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/EdgeDevicesValidateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.ValidateRequest; +import java.util.Arrays; + +/** + * Samples for EdgeDevices Validate. + */ +public final class EdgeDevicesValidateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ValidateEdgeDevices.json + */ + /** + * Sample code: Validate Edge Devices. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void validateEdgeDevices(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.edgeDevices() + .validate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1", + "default", + new ValidateRequest().withEdgeDeviceIds(Arrays.asList( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/edgeDevices/default", + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/edgeDevices/default")) + .withAdditionalInfo("test"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java new file mode 100644 index 0000000000000..b9f80920bee13 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsCreateSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** + * Samples for Extensions Create. + */ +public final class ExtensionsCreateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutExtension.json + */ + /** + * Sample code: Create Arc Extension. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) + throws IOException { + manager.extensions() + .define("MicrosoftMonitoringAgent") + .withExistingArcSetting("test-rg", "myCluster", "default") + .withPublisher("Microsoft.Compute") + .withTypePropertiesType("MicrosoftMonitoringAgent") + .withTypeHandlerVersion("1.10") + .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withEnableAutomaticUpgrade(false) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java new file mode 100644 index 0000000000000..4750bc15810cf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Extensions Delete. + */ +public final class ExtensionsDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteExtension.json + */ + /** + * Sample code: Delete Arc Extension. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .delete("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java new file mode 100644 index 0000000000000..e065259693368 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Extensions Get. + */ +public final class ExtensionsGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetExtension.json + */ + /** + * Sample code: Get ArcSettings Extension. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getArcSettingsExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java new file mode 100644 index 0000000000000..89b5812945394 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsListByArcSettingSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Extensions ListByArcSetting. + */ +public final class ExtensionsListByArcSettingSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListExtensionsByArcSetting.json + */ + /** + * Sample code: List Extensions under ArcSetting resource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listExtensionsUnderArcSettingResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions().listByArcSetting("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java new file mode 100644 index 0000000000000..89aff965427bf --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.azurestackhci.models.Extension; +import com.azure.resourcemanager.azurestackhci.models.ExtensionPatchParameters; +import java.io.IOException; + +/** + * Samples for Extensions Update. + */ +public final class ExtensionsUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PatchExtension.json + */ + /** + * Sample code: Update Arc Extension. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void updateArcExtension(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) + throws IOException { + Extension resource = manager.extensions() + .getWithResponse("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withExtensionParameters(new ExtensionPatchParameters().withTypeHandlerVersion("1.10") + .withEnableAutomaticUpgrade(false) + .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceId\":\"xx\"}", Object.class, SerializerEncoding.JSON)) + .withProtectedSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"workspaceKey\":\"xx\"}", Object.class, SerializerEncoding.JSON))) + .apply(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java new file mode 100644 index 0000000000000..8f6d6fd2952a0 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/ExtensionsUpgradeSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.ExtensionUpgradeParameters; + +/** + * Samples for Extensions Upgrade. + */ +public final class ExtensionsUpgradeSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/Extensions_Upgrade.json + */ + /** + * Sample code: Upgrade Machine Extensions. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void upgradeMachineExtensions(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.extensions() + .upgrade("test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", + new ExtensionUpgradeParameters().withTargetVersion("1.0.18062.0"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationCreateOrUpdateSamples.java index a78918a238e00..2f772b89c12f3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationCreateOrUpdateSamples.java @@ -8,27 +8,26 @@ import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; -/** Samples for GalleryImagesOperation CreateOrUpdate. */ +/** + * Samples for GalleryImagesOperation CreateOrUpdate. + */ public final class GalleryImagesOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutGalleryImage.json */ /** * Sample code: PutGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .galleryImagesOperations() + manager.galleryImagesOperations() .define("test-gallery-image") .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withContainerId( "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container") .withImagePath("C:\\test.vhdx") diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationDeleteSamples.java index d44594bc740f9..26d39849451e0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationDeleteSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for GalleryImagesOperation Delete. */ +/** + * Samples for GalleryImagesOperation Delete. + */ public final class GalleryImagesOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteGalleryImage.json */ /** * Sample code: DeleteGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationGetByResourceGroupSamples.java index 366dc18135a3c..194b8daaee008 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationGetByResourceGroupSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for GalleryImagesOperation GetByResourceGroup. */ +/** + * Samples for GalleryImagesOperation GetByResourceGroup. + */ public final class GalleryImagesOperationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetGalleryImage.json */ /** * Sample code: GetGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .galleryImagesOperations() + manager.galleryImagesOperations() .getByResourceGroupWithResponse("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationListByResourceGroupSamples.java index fa2a719393cbe..bd94498fba64c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationListByResourceGroupSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for GalleryImagesOperation ListByResourceGroup. */ +/** + * Samples for GalleryImagesOperation ListByResourceGroup. + */ public final class GalleryImagesOperationListByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListGalleryImageByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListGalleryImageByResourceGroup.json */ /** * Sample code: ListGalleryImageByResourceGroup. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listGalleryImageByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listGalleryImageByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.galleryImagesOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationListSamples.java index 2926a5cd0b4a8..e9f0af7dcdedd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for GalleryImagesOperation List. */ +/** + * Samples for GalleryImagesOperation List. + */ public final class GalleryImagesOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListGalleryImageBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListGalleryImageBySubscription.json */ /** * Sample code: ListGalleryImageBySubscription. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listGalleryImageBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listGalleryImageBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.galleryImagesOperations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationUpdateSamples.java index 4aa900b2cea5c..720ec2c1613a8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesOperationUpdateSamples.java @@ -8,22 +8,22 @@ import java.util.HashMap; import java.util.Map; -/** Samples for GalleryImagesOperation Update. */ +/** + * Samples for GalleryImagesOperation Update. + */ public final class GalleryImagesOperationUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateGalleryImage.json */ /** * Sample code: UpdateGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void updateGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - GalleryImages resource = - manager - .galleryImagesOperations() - .getByResourceGroupWithResponse("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE) - .getValue(); + GalleryImages resource = manager.galleryImagesOperations() + .getByResourceGroupWithResponse("test-rg", "test-gallery-image", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentCreateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentCreateSamples.java index 6e606e5684d01..3978620bce0c3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentCreateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentCreateSamples.java @@ -8,19 +8,20 @@ import com.azure.resourcemanager.azurestackhci.models.GuestCredential; import com.azure.resourcemanager.azurestackhci.models.ProvisioningAction; -/** Samples for GuestAgent Create. */ +/** + * Samples for GuestAgent Create. + */ public final class GuestAgentCreateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/CreateGuestAgent.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/CreateGuestAgent.json */ /** * Sample code: CreateGuestAgent. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void createGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .guestAgents() + manager.guestAgents() .create( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", new GuestAgentInner() diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentDeleteSamples.java index 7404682e03f8f..ee386ddfbe89b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentDeleteSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for GuestAgent Delete. */ +/** + * Samples for GuestAgent Delete. + */ public final class GuestAgentDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteGuestAgent.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteGuestAgent.json */ /** * Sample code: DeleteGuestAgent. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .guestAgents() + manager.guestAgents() .delete( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentGetSamples.java index 15a37a412056c..d9cb89c8a84a9 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentGetSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for GuestAgent Get. */ +/** + * Samples for GuestAgent Get. + */ public final class GuestAgentGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetGuestAgent.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetGuestAgent.json */ /** * Sample code: GetGuestAgent. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getGuestAgent(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .guestAgents() + manager.guestAgents() .getWithResponse( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentsOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentsOperationListSamples.java index 11e83158bf91d..a7360c531f3b5 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentsOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentsOperationListSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for GuestAgentsOperation List. */ +/** + * Samples for GuestAgentsOperation List. + */ public final class GuestAgentsOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GuestAgent_List.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GuestAgent_List.json */ /** * Sample code: GuestAgentListByVirtualMachineInstances. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void guestAgentListByVirtualMachineInstances( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .guestAgentsOperations() + public static void + guestAgentListByVirtualMachineInstances(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.guestAgentsOperations() .list( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/HybridIdentityMetadataGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/HybridIdentityMetadataGetSamples.java index 98cfffc318b5e..f2798fc42b733 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/HybridIdentityMetadataGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/HybridIdentityMetadataGetSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for HybridIdentityMetadata Get. */ +/** + * Samples for HybridIdentityMetadata Get. + */ public final class HybridIdentityMetadataGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetHybridIdentityMetadata.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetHybridIdentityMetadata.json */ /** * Sample code: GetHybridIdentityMetadata. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getHybridIdentityMetadata(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .hybridIdentityMetadatas() + manager.hybridIdentityMetadatas() .getWithResponse( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/HybridIdentityMetadataListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/HybridIdentityMetadataListSamples.java index 99557adc387f6..935ff28e634f0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/HybridIdentityMetadataListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/HybridIdentityMetadataListSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for HybridIdentityMetadata List. */ +/** + * Samples for HybridIdentityMetadata List. + */ public final class HybridIdentityMetadataListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/HybridIdentityMetadata_List.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/HybridIdentityMetadata_List.json */ /** * Sample code: HybridIdentityMetadataListByVirtualMachineInstances. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void hybridIdentityMetadataListByVirtualMachineInstances( com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .hybridIdentityMetadatas() + manager.hybridIdentityMetadatas() .list( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationCreateOrUpdateSamples.java index b515af5265a07..7e2bbeab3ee13 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationCreateOrUpdateSamples.java @@ -7,27 +7,26 @@ import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; -/** Samples for LogicalNetworksOperation CreateOrUpdate. */ +/** + * Samples for LogicalNetworksOperation CreateOrUpdate. + */ public final class LogicalNetworksOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutLogicalNetwork.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutLogicalNetwork.json */ /** * Sample code: PutLogicalNetwork. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .logicalNetworksOperations() + manager.logicalNetworksOperations() .define("test-lnet") .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .create(); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationDeleteSamples.java index ccd8c0fa9f35e..bad5295876b1f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationDeleteSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for LogicalNetworksOperation Delete. */ +/** + * Samples for LogicalNetworksOperation Delete. + */ public final class LogicalNetworksOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteLogicalNetwork.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteLogicalNetwork.json */ /** * Sample code: DeleteLogicalNetwork. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationGetByResourceGroupSamples.java index df5b31db9b47e..9a2101f975c93 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationGetByResourceGroupSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for LogicalNetworksOperation GetByResourceGroup. */ +/** + * Samples for LogicalNetworksOperation GetByResourceGroup. + */ public final class LogicalNetworksOperationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetLogicalNetwork.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetLogicalNetwork.json */ /** * Sample code: GetLogicalNetwork. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .logicalNetworksOperations() + manager.logicalNetworksOperations() .getByResourceGroupWithResponse("test-rg", "test-lnet", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationListByResourceGroupSamples.java index 510d6e510b115..6a42d601c6df4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationListByResourceGroupSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for LogicalNetworksOperation ListByResourceGroup. */ +/** + * Samples for LogicalNetworksOperation ListByResourceGroup. + */ public final class LogicalNetworksOperationListByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListLogicalNetworkByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListLogicalNetworkByResourceGroup.json */ /** * Sample code: ListLogicalNetworkByResourceGroup. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listLogicalNetworkByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listLogicalNetworkByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.logicalNetworksOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationListSamples.java index f2c06ac5793b6..f7ba41e129616 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for LogicalNetworksOperation List. */ +/** + * Samples for LogicalNetworksOperation List. + */ public final class LogicalNetworksOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListLogicalNetworkBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListLogicalNetworkBySubscription.json */ /** * Sample code: ListLogicalNetworkBySubscription. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listLogicalNetworkBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listLogicalNetworkBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.logicalNetworksOperations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationUpdateSamples.java index 6024130a6cae2..ea73e171b30d8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksOperationUpdateSamples.java @@ -8,22 +8,22 @@ import java.util.HashMap; import java.util.Map; -/** Samples for LogicalNetworksOperation Update. */ +/** + * Samples for LogicalNetworksOperation Update. + */ public final class LogicalNetworksOperationUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateLogicalNetwork.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateLogicalNetwork.json */ /** * Sample code: UpdateLogicalNetwork. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void updateLogicalNetwork(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - LogicalNetworks resource = - manager - .logicalNetworksOperations() - .getByResourceGroupWithResponse("test-rg", "test-lnet", com.azure.core.util.Context.NONE) - .getValue(); + LogicalNetworks resource = manager.logicalNetworksOperations() + .getByResourceGroupWithResponse("test-rg", "test-lnet", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationCreateOrUpdateSamples.java index 41c44fa876cf2..0e05f3ff7aaa1 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationCreateOrUpdateSamples.java @@ -12,38 +12,35 @@ import com.azure.resourcemanager.azurestackhci.models.HyperVGeneration; import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; -/** Samples for MarketplaceGalleryImagesOperation CreateOrUpdate. */ +/** + * Samples for MarketplaceGalleryImagesOperation CreateOrUpdate. + */ public final class MarketplaceGalleryImagesOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutMarketplaceGalleryImage.json */ /** * Sample code: PutMarketplaceGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void putMarketplaceGalleryImage( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .marketplaceGalleryImagesOperations() + public static void + putMarketplaceGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.marketplaceGalleryImagesOperations() .define("test-marketplace-gallery-image") .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withContainerId( "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-storage-container") .withOsType(OperatingSystemTypes.WINDOWS) .withCloudInitDataSource(CloudInitDataSource.AZURE) .withHyperVGeneration(HyperVGeneration.V1) - .withIdentifier( - new GalleryImageIdentifier() - .withPublisher("myPublisherName") - .withOffer("myOfferName") - .withSku("mySkuName")) + .withIdentifier(new GalleryImageIdentifier().withPublisher("myPublisherName") + .withOffer("myOfferName") + .withSku("mySkuName")) .withVersion(new GalleryImageVersion().withName("1.0.0")) .create(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationDeleteSamples.java index 30e1363ade527..c7806f0b648c8 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationDeleteSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for MarketplaceGalleryImagesOperation Delete. */ +/** + * Samples for MarketplaceGalleryImagesOperation Delete. + */ public final class MarketplaceGalleryImagesOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteMarketplaceGalleryImage.json */ /** * Sample code: DeleteMarketplaceGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void deleteMarketplaceGalleryImage( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .marketplaceGalleryImagesOperations() + public static void + deleteMarketplaceGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.marketplaceGalleryImagesOperations() .delete("test-rg", "test-marketplace-gallery-image", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationGetByResourceGroupSamples.java index 79b2a4b9bb4f9..b93f8b81cfa2a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationGetByResourceGroupSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for MarketplaceGalleryImagesOperation GetByResourceGroup. */ +/** + * Samples for MarketplaceGalleryImagesOperation GetByResourceGroup. + */ public final class MarketplaceGalleryImagesOperationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetMarketplaceGalleryImage.json */ /** * Sample code: GetMarketplaceGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void getMarketplaceGalleryImage( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .marketplaceGalleryImagesOperations() - .getByResourceGroupWithResponse( - "test-rg", "test-marketplace-gallery-image", com.azure.core.util.Context.NONE); + public static void + getMarketplaceGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.marketplaceGalleryImagesOperations() + .getByResourceGroupWithResponse("test-rg", "test-marketplace-gallery-image", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationListByResourceGroupSamples.java index c255160e8b838..76a68acc9602e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationListByResourceGroupSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for MarketplaceGalleryImagesOperation ListByResourceGroup. */ +/** + * Samples for MarketplaceGalleryImagesOperation ListByResourceGroup. + */ public final class MarketplaceGalleryImagesOperationListByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListMarketplaceGalleryImageByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListMarketplaceGalleryImageByResourceGroup.json */ /** * Sample code: ListMarketplaceGalleryImageByResourceGroup. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void listMarketplaceGalleryImageByResourceGroup( diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationListSamples.java index f4c35317fbf6b..ecbc253ed2f2c 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationListSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for MarketplaceGalleryImagesOperation List. */ +/** + * Samples for MarketplaceGalleryImagesOperation List. + */ public final class MarketplaceGalleryImagesOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListMarketplaceGalleryImageBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListMarketplaceGalleryImageBySubscription.json */ /** * Sample code: ListMarketplaceGalleryImageBySubscription. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void listMarketplaceGalleryImageBySubscription( diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationUpdateSamples.java index 12afa609f8d29..c0d098d9adfd0 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesOperationUpdateSamples.java @@ -8,24 +8,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for MarketplaceGalleryImagesOperation Update. */ +/** + * Samples for MarketplaceGalleryImagesOperation Update. + */ public final class MarketplaceGalleryImagesOperationUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateMarketplaceGalleryImage.json */ /** * Sample code: UpdateMarketplaceGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void updateMarketplaceGalleryImage( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - MarketplaceGalleryImages resource = - manager - .marketplaceGalleryImagesOperations() - .getByResourceGroupWithResponse( - "test-rg", "test-marketplce-gallery-image", com.azure.core.util.Context.NONE) - .getValue(); + public static void + updateMarketplaceGalleryImage(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + MarketplaceGalleryImages resource = manager.marketplaceGalleryImagesOperations() + .getByResourceGroupWithResponse("test-rg", "test-marketplce-gallery-image", + com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationCreateOrUpdateSamples.java index da1b75bb5dae6..d62df1deb93bd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationCreateOrUpdateSamples.java @@ -11,35 +11,29 @@ import com.azure.resourcemanager.azurestackhci.models.IpConfigurationPropertiesSubnet; import java.util.Arrays; -/** Samples for NetworkInterfacesOperation CreateOrUpdate. */ +/** + * Samples for NetworkInterfacesOperation CreateOrUpdate. + */ public final class NetworkInterfacesOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutNetworkInterface.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutNetworkInterface.json */ /** * Sample code: PutNetworkInterface. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .networkInterfacesOperations() + manager.networkInterfacesOperations() .define("test-nic") .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIpConfigurations( - Arrays - .asList( - new IpConfiguration() - .withName("ipconfig-sample") - .withProperties( - new IpConfigurationProperties() - .withSubnet(new IpConfigurationPropertiesSubnet().withId("test-lnet"))))) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withIpConfigurations(Arrays.asList(new IpConfiguration().withName("ipconfig-sample") + .withProperties(new IpConfigurationProperties() + .withSubnet(new IpConfigurationPropertiesSubnet().withId("test-lnet"))))) .create(); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationDeleteSamples.java index a2df68815cf17..f63e0cd8aad28 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationDeleteSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for NetworkInterfacesOperation Delete. */ +/** + * Samples for NetworkInterfacesOperation Delete. + */ public final class NetworkInterfacesOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteNetworkInterface.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteNetworkInterface.json */ /** * Sample code: DeleteNetworkInterface. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationGetByResourceGroupSamples.java index 1094f90f0c14d..1021260724e6d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationGetByResourceGroupSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for NetworkInterfacesOperation GetByResourceGroup. */ +/** + * Samples for NetworkInterfacesOperation GetByResourceGroup. + */ public final class NetworkInterfacesOperationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetNetworkInterface.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetNetworkInterface.json */ /** * Sample code: GetNetworkInterface. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .networkInterfacesOperations() + manager.networkInterfacesOperations() .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationListByResourceGroupSamples.java index ca2a3d5d38a00..b979dc871722b 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationListByResourceGroupSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for NetworkInterfacesOperation ListByResourceGroup. */ +/** + * Samples for NetworkInterfacesOperation ListByResourceGroup. + */ public final class NetworkInterfacesOperationListByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListNetworkInterfaceByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListNetworkInterfaceByResourceGroup.json */ /** * Sample code: ListNetworkInterfaceByResourceGroup. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listNetworkInterfaceByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listNetworkInterfaceByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.networkInterfacesOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationListSamples.java index 5ad525241a7d4..fd917bf965abe 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for NetworkInterfacesOperation List. */ +/** + * Samples for NetworkInterfacesOperation List. + */ public final class NetworkInterfacesOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListNetworkInterfaceBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListNetworkInterfaceBySubscription.json */ /** * Sample code: ListNetworkInterfaceBySubscription. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listNetworkInterfaceBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listNetworkInterfaceBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.networkInterfacesOperations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationUpdateSamples.java index a9f296333dec6..845956ce15a03 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesOperationUpdateSamples.java @@ -8,22 +8,22 @@ import java.util.HashMap; import java.util.Map; -/** Samples for NetworkInterfacesOperation Update. */ +/** + * Samples for NetworkInterfacesOperation Update. + */ public final class NetworkInterfacesOperationUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateNetworkInterface.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateNetworkInterface.json */ /** * Sample code: UpdateNetworkInterface. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void updateNetworkInterface(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - NetworkInterfaces resource = - manager - .networkInterfacesOperations() - .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE) - .getValue(); + NetworkInterfaces resource = manager.networkInterfacesOperations() + .getByResourceGroupWithResponse("test-rg", "test-nic", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java new file mode 100644 index 0000000000000..808e03dbdfbaa --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Offers Get. + */ +public final class OffersGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetOffer.json + */ + /** + * Sample code: Get Offer. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getOffer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.offers() + .getWithResponse("test-rg", "myCluster", "publisher1", "offer1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java new file mode 100644 index 0000000000000..399a6eb7fd803 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByClusterSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Offers ListByCluster. + */ +public final class OffersListByClusterSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListOffersByCluster.json + */ + /** + * Sample code: List Offer resources by HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listOfferResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.offers().listByCluster("test-rg", "myCluster", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java new file mode 100644 index 0000000000000..305815bb14903 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OffersListByPublisherSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Offers ListByPublisher. + */ +public final class OffersListByPublisherSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListOffersByPublisher.json + */ + /** + * Sample code: List Offer resources by publisher for the HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listOfferResourcesByPublisherForTheHCICluster( + com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.offers().listByPublisher("test-rg", "myCluster", "publisher1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java index 9adce40696d00..f1f1bf46debe3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListSamples.java @@ -4,17 +4,19 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListOperations.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListOperations.json */ /** - * Sample code: ListOperations. - * + * Sample code: Create cluster. + * * @param manager Entry point to AzureStackHciManager. */ - public static void listOperations(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void createCluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.operations().listWithResponse(com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetSamples.java new file mode 100644 index 0000000000000..b9e5b5fbf0165 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Publishers Get. + */ +public final class PublishersGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetPublisher.json + */ + /** + * Sample code: Get Publisher. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getPublisher(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.publishers().getWithResponse("test-rg", "myCluster", "publisher1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterSamples.java new file mode 100644 index 0000000000000..b99acd47a992d --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/PublishersListByClusterSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Publishers ListByCluster. + */ +public final class PublishersListByClusterSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListPublishersByCluster.json + */ + /** + * Sample code: List Publisher resources by HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listPublisherResourcesByHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.publishers().listByCluster("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..2e7ae0c8177e4 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.ComplianceAssignmentType; + +/** + * Samples for SecuritySettings CreateOrUpdate. + */ +public final class SecuritySettingsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutSecuritySettings.json + */ + /** + * Sample code: Create Security Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void createSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.securitySettings() + .define("default") + .withExistingCluster("test-rg", "myCluster") + .withSecuredCoreComplianceAssignment(ComplianceAssignmentType.AUDIT) + .create(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java new file mode 100644 index 0000000000000..cf137b469131c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for SecuritySettings Delete. + */ +public final class SecuritySettingsDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteSecuritySettings.json + */ + /** + * Sample code: Delete Security Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.securitySettings().delete("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java new file mode 100644 index 0000000000000..3b0fe1c3c999c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for SecuritySettings Get. + */ +public final class SecuritySettingsGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetSecuritySettings.json + */ + /** + * Sample code: Get Security Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.securitySettings().getWithResponse("test-rg", "myCluster", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java new file mode 100644 index 0000000000000..d5475050cc789 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SecuritySettingsListByClustersSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for SecuritySettings ListByClusters. + */ +public final class SecuritySettingsListByClustersSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListSecuritySettingsByCluster.json + */ + /** + * Sample code: List Security Settings. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listSecuritySettings(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.securitySettings().listByClusters("test-rg", "myCluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java new file mode 100644 index 0000000000000..5dcf5308694b6 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Skus Get. + */ +public final class SkusGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetSku.json + */ + /** + * Sample code: Get Sku. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getSku(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.skus() + .getWithResponse("test-rg", "myCluster", "publisher1", "offer1", "sku1", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java new file mode 100644 index 0000000000000..7e06f60be825e --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/SkusListByOfferSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Skus ListByOffer. + */ +public final class SkusListByOfferSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListSkusByOffer.json + */ + /** + * Sample code: List SKU resources by offer for the HCI Cluster. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listSKUResourcesByOfferForTheHCICluster(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.skus() + .listByOffer("test-rg", "myCluster", "publisher1", "offer1", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationCreateOrUpdateSamples.java index c55f0611474fd..4ce12ae60ba4a 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationCreateOrUpdateSamples.java @@ -7,27 +7,26 @@ import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; -/** Samples for StorageContainersOperation CreateOrUpdate. */ +/** + * Samples for StorageContainersOperation CreateOrUpdate. + */ public final class StorageContainersOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutStorageContainer.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutStorageContainer.json */ /** * Sample code: PutStorageContainer. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .storageContainersOperations() + manager.storageContainersOperations() .define("Default_Container") .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withPath("C:\\container_storage") .create(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationDeleteSamples.java index 6b9385553f570..d571274e002f4 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationDeleteSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for StorageContainersOperation Delete. */ +/** + * Samples for StorageContainersOperation Delete. + */ public final class StorageContainersOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteStorageContainer.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteStorageContainer.json */ /** * Sample code: DeleteStorageContainer. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationGetByResourceGroupSamples.java index b716302aa6294..96d256ce38446 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationGetByResourceGroupSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for StorageContainersOperation GetByResourceGroup. */ +/** + * Samples for StorageContainersOperation GetByResourceGroup. + */ public final class StorageContainersOperationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetStorageContainer.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetStorageContainer.json */ /** * Sample code: GetStorageContainer. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .storageContainersOperations() + manager.storageContainersOperations() .getByResourceGroupWithResponse("test-rg", "Default_Container", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationListByResourceGroupSamples.java index f12f912236cd4..d833c892539ee 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationListByResourceGroupSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for StorageContainersOperation ListByResourceGroup. */ +/** + * Samples for StorageContainersOperation ListByResourceGroup. + */ public final class StorageContainersOperationListByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListStorageContainerByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListStorageContainerByResourceGroup.json */ /** * Sample code: ListStorageContainerByResourceGroup. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listStorageContainerByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listStorageContainerByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.storageContainersOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationListSamples.java index 85eee37012bff..8b64c2d4abf21 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for StorageContainersOperation List. */ +/** + * Samples for StorageContainersOperation List. + */ public final class StorageContainersOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListStorageContainerBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListStorageContainerBySubscription.json */ /** * Sample code: ListStorageContainerBySubscription. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listStorageContainerBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listStorageContainerBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.storageContainersOperations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationUpdateSamples.java index beec0fad0010e..5194bead90d89 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersOperationUpdateSamples.java @@ -8,22 +8,22 @@ import java.util.HashMap; import java.util.Map; -/** Samples for StorageContainersOperation Update. */ +/** + * Samples for StorageContainersOperation Update. + */ public final class StorageContainersOperationUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateStorageContainer.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateStorageContainer.json */ /** * Sample code: UpdateStorageContainer. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void updateStorageContainer(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - StorageContainers resource = - manager - .storageContainersOperations() - .getByResourceGroupWithResponse("test-rg", "Default_Container", com.azure.core.util.Context.NONE) - .getValue(); + StorageContainers resource = manager.storageContainersOperations() + .getByResourceGroupWithResponse("test-rg", "Default_Container", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java new file mode 100644 index 0000000000000..6259e0f6ca6ba --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for UpdateRuns Delete. + */ +public final class UpdateRunsDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteUpdateRuns.json + */ + /** + * Sample code: Delete an Update. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteAnUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateRuns() + .delete("testrg", "testcluster", "Microsoft4.2203.2.32", "23b779ba-0d52-4a80-8571-45ca74664ec3", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java new file mode 100644 index 0000000000000..393fd1f03c473 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for UpdateRuns Get. + */ +public final class UpdateRunsGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetUpdateRuns.json + */ + /** + * Sample code: Get Update runs under cluster resource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + getUpdateRunsUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateRuns() + .getWithResponse("testrg", "testcluster", "Microsoft4.2203.2.32", "23b779ba-0d52-4a80-8571-45ca74664ec3", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java new file mode 100644 index 0000000000000..e1a5450624f5b --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for UpdateRuns List. + */ +public final class UpdateRunsListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListUpdateRuns.json + */ + /** + * Sample code: List Update runs under cluster resource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + listUpdateRunsUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateRuns().list("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java new file mode 100644 index 0000000000000..0855f7eb56c5c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateRunsPutSamples.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.fluent.models.Step; +import com.azure.resourcemanager.azurestackhci.models.UpdateRun; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** + * Samples for UpdateRuns Put. + */ +public final class UpdateRunsPutSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutUpdateRuns.json + */ + /** + * Sample code: Get Update runs under cluster resource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + getUpdateRunsUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + UpdateRun resource = manager.updateRuns() + .getWithResponse("testrg", "testcluster", "Microsoft4.2203.2.32", "23b779ba-0d52-4a80-8571-45ca74664ec3", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withNamePropertiesName("Unnamed step") + .withDescription("Update Azure Stack.") + .withErrorMessage("") + .withStatus("Success") + .withStartTimeUtc(OffsetDateTime.parse("2022-04-06T01:36:33.3876751+00:00")) + .withEndTimeUtc(OffsetDateTime.parse("2022-04-06T13:58:42.969006+00:00")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2022-04-06T13:58:42.969006+00:00")) + .withSteps(Arrays.asList(new Step().withName("PreUpdate Cloud") + .withDescription("Prepare for SSU update") + .withErrorMessage("") + .withStatus("Success") + .withStartTimeUtc(OffsetDateTime.parse("2022-04-06T01:36:33.3876751+00:00")) + .withEndTimeUtc(OffsetDateTime.parse("2022-04-06T01:37:16.8728314+00:00")) + .withLastUpdatedTimeUtc(OffsetDateTime.parse("2022-04-06T01:37:16.8728314+00:00")) + .withSteps(Arrays.asList()))) + .apply(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java new file mode 100644 index 0000000000000..dc541219a39b9 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for UpdateSummariesOperation Delete. + */ +public final class UpdateSummariesOperationDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteUpdateSummaries.json + */ + /** + * Sample code: Delete an Update. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteAnUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateSummariesOperations().delete("testrg", "testcluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java new file mode 100644 index 0000000000000..058fd4a892a63 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for UpdateSummariesOperation Get. + */ +public final class UpdateSummariesOperationGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetUpdateSummaries.json + */ + /** + * Sample code: Get Update summaries under cluster resource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + getUpdateSummariesUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateSummariesOperations().getWithResponse("testrg", "testcluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java new file mode 100644 index 0000000000000..14be508cf7549 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for UpdateSummariesOperation List. + */ +public final class UpdateSummariesOperationListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListUpdateSummaries.json + */ + /** + * Sample code: Get Update summaries under cluster resource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + getUpdateSummariesUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateSummariesOperations().list("testrg", "testcluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java new file mode 100644 index 0000000000000..0a4629b4c7755 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdateSummariesOperationPutSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.fluent.models.UpdateSummariesInner; +import com.azure.resourcemanager.azurestackhci.models.UpdateSummariesPropertiesState; +import java.time.OffsetDateTime; + +/** + * Samples for UpdateSummariesOperation Put. + */ +public final class UpdateSummariesOperationPutSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutUpdateSummaries.json + */ + /** + * Sample code: Put Update summaries under cluster resource. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void + putUpdateSummariesUnderClusterResource(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updateSummariesOperations() + .putWithResponse("testrg", "testcluster", + new UpdateSummariesInner().withOemFamily("DellEMC") + .withHardwareModel("PowerEdge R730xd") + .withCurrentVersion("4.2203.2.32") + .withLastUpdated(OffsetDateTime.parse("2022-04-06T14:08:18.254Z")) + .withLastChecked(OffsetDateTime.parse("2022-04-07T18:04:07Z")) + .withState(UpdateSummariesPropertiesState.APPLIED_SUCCESSFULLY), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java new file mode 100644 index 0000000000000..98e33a7c7568c --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Updates Delete. + */ +public final class UpdatesDeleteSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteUpdates.json + */ + /** + * Sample code: Delete an Update. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void deleteAnUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updates().delete("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java new file mode 100644 index 0000000000000..870dec07e7de2 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Updates Get. + */ +public final class UpdatesGetSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetUpdates.json + */ + /** + * Sample code: Get a specific update. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void getASpecificUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updates() + .getWithResponse("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java new file mode 100644 index 0000000000000..2d7a6b8e92dc8 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Updates List. + */ +public final class UpdatesListSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListUpdates.json + */ + /** + * Sample code: List available updates. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listAvailableUpdates(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updates().list("testrg", "testcluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java new file mode 100644 index 0000000000000..61c3f265a1746 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPostSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +/** + * Samples for Updates Post. + */ +public final class UpdatesPostSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PostUpdates.json + */ + /** + * Sample code: List available updates. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void listAvailableUpdates(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.updates().post("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java new file mode 100644 index 0000000000000..958b3ae0ba492 --- /dev/null +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/UpdatesPutSamples.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.azurestackhci.generated; + +import com.azure.resourcemanager.azurestackhci.models.AvailabilityType; +import com.azure.resourcemanager.azurestackhci.models.HciUpdate; +import com.azure.resourcemanager.azurestackhci.models.State; +import com.azure.resourcemanager.azurestackhci.models.UpdatePrerequisite; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** + * Samples for Updates Put. + */ +public final class UpdatesPutSamples { + /* + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutUpdates.json + */ + /** + * Sample code: Put a specific update. + * + * @param manager Entry point to AzureStackHciManager. + */ + public static void putASpecificUpdate(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + HciUpdate resource = manager.updates() + .getWithResponse("testrg", "testcluster", "Microsoft4.2203.2.32", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withInstalledDate(OffsetDateTime.parse("2022-04-06T14:08:18.254Z")) + .withDescription("AzS Update 4.2203.2.32") + .withState(State.INSTALLED) + .withPrerequisites(Arrays.asList(new UpdatePrerequisite().withUpdateType("update type") + .withVersion("prerequisite version") + .withPackageName("update package name"))) + .withPackagePath("\\\\SU1FileServer\\SU1_Infrastructure_2\\Updates\\Packages\\Microsoft4.2203.2.32") + .withPackageSizeInMb(18858.0F) + .withDisplayName("AzS Update - 4.2203.2.32") + .withVersion("4.2203.2.32") + .withPublisher("Microsoft") + .withReleaseLink("https://docs.microsoft.com/azure-stack/operator/release-notes?view=azs-2203") + .withAvailabilityType(AvailabilityType.LOCAL) + .withPackageType("Infrastructure") + .withAdditionalProperties("additional properties") + .withProgressPercentage(0.0F) + .withNotifyMessage("Brief message with instructions for updates of AvailabilityType Notify") + .apply(); + } +} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationCreateOrUpdateSamples.java index 422eacdc1bfbd..8ce4a841df2d2 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationCreateOrUpdateSamples.java @@ -7,27 +7,26 @@ import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; -/** Samples for VirtualHardDisksOperation CreateOrUpdate. */ +/** + * Samples for VirtualHardDisksOperation CreateOrUpdate. + */ public final class VirtualHardDisksOperationCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualHardDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualHardDisk.json */ /** * Sample code: PutVirtualHardDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualHardDisksOperations() + manager.virtualHardDisksOperations() .define("test-vhd") .withRegion("West US2") .withExistingResourceGroup("test-rg") - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withDiskSizeGB(32L) .create(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationDeleteSamples.java index 843f38d669a49..76889a47f90fb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationDeleteSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualHardDisksOperation Delete. */ +/** + * Samples for VirtualHardDisksOperation Delete. + */ public final class VirtualHardDisksOperationDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteVirtualHardDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteVirtualHardDisk.json */ /** * Sample code: DeleteVirtualHardDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationGetByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationGetByResourceGroupSamples.java index 90b8e153a1171..922bc790a864f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationGetByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationGetByResourceGroupSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualHardDisksOperation GetByResourceGroup. */ +/** + * Samples for VirtualHardDisksOperation GetByResourceGroup. + */ public final class VirtualHardDisksOperationGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetVirtualHardDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetVirtualHardDisk.json */ /** * Sample code: GetVirtualHardDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualHardDisksOperations() + manager.virtualHardDisksOperations() .getByResourceGroupWithResponse("test-rg", "test-vhd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationListByResourceGroupSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationListByResourceGroupSamples.java index 04418c336c8b4..7165134d71dda 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationListByResourceGroupSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationListByResourceGroupSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualHardDisksOperation ListByResourceGroup. */ +/** + * Samples for VirtualHardDisksOperation ListByResourceGroup. + */ public final class VirtualHardDisksOperationListByResourceGroupSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualHardDiskByResourceGroup.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListVirtualHardDiskByResourceGroup.json */ /** * Sample code: ListVirtualHardDiskByResourceGroup. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listVirtualHardDiskByResourceGroup( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listVirtualHardDiskByResourceGroup(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.virtualHardDisksOperations().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationListSamples.java index 2d4d5e86b5570..0e4454ddaa33f 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualHardDisksOperation List. */ +/** + * Samples for VirtualHardDisksOperation List. + */ public final class VirtualHardDisksOperationListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualHardDiskBySubscription.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListVirtualHardDiskBySubscription.json */ /** * Sample code: ListVirtualHardDiskBySubscription. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listVirtualHardDiskBySubscription( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + public static void + listVirtualHardDiskBySubscription(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { manager.virtualHardDisksOperations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationUpdateSamples.java index 36b91f74e708b..53b8c2b5bfaa3 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksOperationUpdateSamples.java @@ -8,22 +8,22 @@ import java.util.HashMap; import java.util.Map; -/** Samples for VirtualHardDisksOperation Update. */ +/** + * Samples for VirtualHardDisksOperation Update. + */ public final class VirtualHardDisksOperationUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateVirtualHardDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateVirtualHardDisk.json */ /** * Sample code: UpdateVirtualHardDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void updateVirtualHardDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - VirtualHardDisks resource = - manager - .virtualHardDisksOperations() - .getByResourceGroupWithResponse("test-rg", "test-vhd", com.azure.core.util.Context.NONE) - .getValue(); + VirtualHardDisks resource = manager.virtualHardDisksOperations() + .getByResourceGroupWithResponse("test-rg", "test-vhd", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("additionalProperties", "sample")).apply(); } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesCreateOrUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesCreateOrUpdateSamples.java index bc04b435ee542..7c9e649b8ad45 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesCreateOrUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesCreateOrUpdateSamples.java @@ -20,207 +20,149 @@ import com.azure.resourcemanager.azurestackhci.models.VmSizeEnum; import java.util.Arrays; -/** Samples for VirtualMachineInstances CreateOrUpdate. */ +/** + * Samples for VirtualMachineInstances CreateOrUpdate. + */ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualMachineInstanceWithGalleryImage.json */ /** * Sample code: PutVirtualMachineInstanceWithGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putVirtualMachineInstanceWithGalleryImage( com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .createOrUpdate( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner() - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withHardwareProfile( new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.DEFAULT)) - .withNetworkProfile( - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("test-nic")))) + .withNetworkProfile(new VirtualMachineInstancePropertiesNetworkProfile().withNetworkInterfaces( + Arrays.asList(new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() + .withId("test-nic")))) .withOsProfile( - new VirtualMachineInstancePropertiesOsProfile() - .withAdminPassword("fakeTokenPlaceholder") + new VirtualMachineInstancePropertiesOsProfile().withAdminPassword("fakeTokenPlaceholder") .withAdminUsername("localadmin") .withComputerName("luamaster")) - .withSecurityProfile( - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() - .withSecureBootEnabled(true))) - .withStorageProfile( - new VirtualMachineInstancePropertiesStorageProfile() - .withImageReference( - new VirtualMachineInstancePropertiesStorageProfileImageReference() - .withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")) - .withVmConfigStoragePathId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), + .withSecurityProfile(new VirtualMachineInstancePropertiesSecurityProfile().withEnableTpm(true) + .withUefiSettings(new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() + .withSecureBootEnabled(true))) + .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() + .withImageReference(new VirtualMachineInstancePropertiesStorageProfileImageReference().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")) + .withVmConfigStoragePathId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithOsDisk.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualMachineInstanceWithOsDisk.json */ /** * Sample code: PutVirtualMachineInstanceWithOsDisk. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void putVirtualMachineInstanceWithOsDisk( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + public static void + putVirtualMachineInstanceWithOsDisk(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.virtualMachineInstances() .createOrUpdate( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner() - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withHardwareProfile( new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.DEFAULT)) - .withNetworkProfile( - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("test-nic")))) - .withSecurityProfile( - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() - .withSecureBootEnabled(true))) - .withStorageProfile( - new VirtualMachineInstancePropertiesStorageProfile() - .withOsDisk( - new VirtualMachineInstancePropertiesStorageProfileOsDisk() - .withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd")) - .withVmConfigStoragePathId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), + .withNetworkProfile(new VirtualMachineInstancePropertiesNetworkProfile().withNetworkInterfaces( + Arrays.asList(new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() + .withId("test-nic")))) + .withSecurityProfile(new VirtualMachineInstancePropertiesSecurityProfile().withEnableTpm(true) + .withUefiSettings(new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() + .withSecureBootEnabled(true))) + .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() + .withOsDisk(new VirtualMachineInstancePropertiesStorageProfileOsDisk().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd")) + .withVmConfigStoragePathId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithMarketplaceGalleryImage.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualMachineInstanceWithMarketplaceGalleryImage.json */ /** * Sample code: PutVirtualMachineInstanceWithMarketplaceGalleryImage. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putVirtualMachineInstanceWithMarketplaceGalleryImage( com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .createOrUpdate( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner() - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withHardwareProfile( new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.DEFAULT)) - .withNetworkProfile( - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("test-nic")))) + .withNetworkProfile(new VirtualMachineInstancePropertiesNetworkProfile().withNetworkInterfaces( + Arrays.asList(new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() + .withId("test-nic")))) .withOsProfile( - new VirtualMachineInstancePropertiesOsProfile() - .withAdminPassword("fakeTokenPlaceholder") + new VirtualMachineInstancePropertiesOsProfile().withAdminPassword("fakeTokenPlaceholder") .withAdminUsername("localadmin") .withComputerName("luamaster")) - .withSecurityProfile( - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() - .withSecureBootEnabled(true))) - .withStorageProfile( - new VirtualMachineInstancePropertiesStorageProfile() - .withImageReference( - new VirtualMachineInstancePropertiesStorageProfileImageReference() - .withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image")) - .withVmConfigStoragePathId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), + .withSecurityProfile(new VirtualMachineInstancePropertiesSecurityProfile().withEnableTpm(true) + .withUefiSettings(new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() + .withSecureBootEnabled(true))) + .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() + .withImageReference(new VirtualMachineInstancePropertiesStorageProfileImageReference().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image")) + .withVmConfigStoragePathId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/PutVirtualMachineInstanceWithVMConfigAgent.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/PutVirtualMachineInstanceWithVMConfigAgent.json */ /** * Sample code: PutVirtualMachineInstanceWithVMConfigAgent. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void putVirtualMachineInstanceWithVMConfigAgent( com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .createOrUpdate( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner() - .withExtendedLocation( - new ExtendedLocation() - .withName( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withHardwareProfile( new VirtualMachineInstancePropertiesHardwareProfile().withVmSize(VmSizeEnum.DEFAULT)) - .withNetworkProfile( - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("test-nic")))) - .withOsProfile( - new VirtualMachineInstancePropertiesOsProfile() - .withAdminPassword("fakeTokenPlaceholder") - .withAdminUsername("localadmin") - .withComputerName("luamaster") - .withWindowsConfiguration( - new VirtualMachineInstancePropertiesOsProfileWindowsConfiguration() - .withProvisionVMConfigAgent(true))) - .withSecurityProfile( - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() - .withSecureBootEnabled(true))) - .withStorageProfile( - new VirtualMachineInstancePropertiesStorageProfile() - .withImageReference( - new VirtualMachineInstancePropertiesStorageProfileImageReference() - .withId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")) - .withVmConfigStoragePathId( - "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), + .withNetworkProfile(new VirtualMachineInstancePropertiesNetworkProfile().withNetworkInterfaces( + Arrays.asList(new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() + .withId("test-nic")))) + .withOsProfile(new VirtualMachineInstancePropertiesOsProfile() + .withAdminPassword("fakeTokenPlaceholder") + .withAdminUsername("localadmin") + .withComputerName("luamaster") + .withWindowsConfiguration(new VirtualMachineInstancePropertiesOsProfileWindowsConfiguration() + .withProvisionVMConfigAgent(true))) + .withSecurityProfile(new VirtualMachineInstancePropertiesSecurityProfile().withEnableTpm(true) + .withUefiSettings(new VirtualMachineInstancePropertiesSecurityProfileUefiSettings() + .withSecureBootEnabled(true))) + .withStorageProfile(new VirtualMachineInstancePropertiesStorageProfile() + .withImageReference(new VirtualMachineInstancePropertiesStorageProfileImageReference().withId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")) + .withVmConfigStoragePathId( + "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesDeleteSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesDeleteSamples.java index 6d47215d33bca..5bec58b55d15e 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesDeleteSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesDeleteSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualMachineInstances Delete. */ +/** + * Samples for VirtualMachineInstances Delete. + */ public final class VirtualMachineInstancesDeleteSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/DeleteVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/DeleteVirtualMachineInstance.json */ /** * Sample code: DeleteVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void deleteVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .delete( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesGetSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesGetSamples.java index 63d53d6f4e16b..37fe5e54ba1eb 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesGetSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesGetSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualMachineInstances Get. */ +/** + * Samples for VirtualMachineInstances Get. + */ public final class VirtualMachineInstancesGetSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/GetVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/GetVirtualMachineInstance.json */ /** * Sample code: GetVirtualMachineInstance. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void getVirtualMachineInstance(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .getWithResponse( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesListSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesListSamples.java index c93246812a55e..5c3e49fecb970 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesListSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesListSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualMachineInstances List. */ +/** + * Samples for VirtualMachineInstances List. + */ public final class VirtualMachineInstancesListSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/ListVirtualMachineInstances.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/ListVirtualMachineInstances.json */ /** * Sample code: ListVirtualMachineInstances. - * + * * @param manager Entry point to AzureStackHciManager. */ - public static void listVirtualMachineInstances( - com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + public static void + listVirtualMachineInstances(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { + manager.virtualMachineInstances() .list( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesRestartSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesRestartSamples.java index 42d93a2868e15..4b113c0360afd 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesRestartSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesRestartSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualMachineInstances Restart. */ +/** + * Samples for VirtualMachineInstances Restart. + */ public final class VirtualMachineInstancesRestartSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/RestartVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/RestartVirtualMachineInstance.json */ /** * Sample code: RestartVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void restartVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .restart( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesStartSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesStartSamples.java index 0ff7ee6dad146..b5198490918ad 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesStartSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesStartSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualMachineInstances Start. */ +/** + * Samples for VirtualMachineInstances Start. + */ public final class VirtualMachineInstancesStartSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/StartVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/StartVirtualMachineInstance.json */ /** * Sample code: StartVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void startVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .start( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesStopSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesStopSamples.java index 6c010e0854617..9a27b96811e84 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesStopSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesStopSamples.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.azurestackhci.generated; -/** Samples for VirtualMachineInstances Stop. */ +/** + * Samples for VirtualMachineInstances Stop. + */ public final class VirtualMachineInstancesStopSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/StopVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/StopVirtualMachineInstance.json */ /** * Sample code: StopVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void stopVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .stop( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", com.azure.core.util.Context.NONE); diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesUpdateSamples.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesUpdateSamples.java index ce954da5f9543..baf15c34a996d 100644 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesUpdateSamples.java +++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/samples/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancesUpdateSamples.java @@ -10,32 +10,26 @@ import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpdateRequest; import java.util.Arrays; -/** Samples for VirtualMachineInstances Update. */ +/** + * Samples for VirtualMachineInstances Update. + */ public final class VirtualMachineInstancesUpdateSamples { /* - * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/preview/2023-09-01-preview/examples/UpdateVirtualMachineInstance.json + * x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/examples/UpdateVirtualMachineInstance.json */ /** * Sample code: UpdateVirtualMachine. - * + * * @param manager Entry point to AzureStackHciManager. */ public static void updateVirtualMachine(com.azure.resourcemanager.azurestackhci.AzureStackHciManager manager) { - manager - .virtualMachineInstances() + manager.virtualMachineInstances() .update( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceUpdateRequest() - .withProperties( - new VirtualMachineInstanceUpdateProperties() - .withStorageProfile( - new StorageProfileUpdate() - .withDataDisks( - Arrays - .asList( - new StorageProfileUpdateDataDisksItem() - .withId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"))))), + new VirtualMachineInstanceUpdateRequest().withProperties( + new VirtualMachineInstanceUpdateProperties().withStorageProfile(new StorageProfileUpdate() + .withDataDisks(Arrays.asList(new StorageProfileUpdateDataDisksItem().withId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"))))), com.azure.core.util.Context.NONE); } } diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtendedLocationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtendedLocationTests.java deleted file mode 100644 index 9932014338574..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocation; -import com.azure.resourcemanager.azurestackhci.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = - BinaryData - .fromString("{\"name\":\"xhekuksjtxukcdm\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("xhekuksjtxukcdm", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model = - new ExtendedLocation().withName("xhekuksjtxukcdm").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("xhekuksjtxukcdm", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryDiskImageTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryDiskImageTests.java deleted file mode 100644 index dd37b911c70c9..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryDiskImageTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GalleryDiskImage; - -public final class GalleryDiskImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryDiskImage model = - BinaryData.fromString("{\"sizeInMB\":4167374630645699201}").toObject(GalleryDiskImage.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryDiskImage model = new GalleryDiskImage(); - model = BinaryData.fromObject(model).toObject(GalleryDiskImage.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageIdentifierTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageIdentifierTests.java deleted file mode 100644 index 9dee35a10faf4..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageIdentifierTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageIdentifier; -import org.junit.jupiter.api.Assertions; - -public final class GalleryImageIdentifierTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryImageIdentifier model = - BinaryData - .fromString("{\"publisher\":\"xrifkwmrvkts\",\"offer\":\"zntocipaouajps\",\"sku\":\"ucmpoyfd\"}") - .toObject(GalleryImageIdentifier.class); - Assertions.assertEquals("xrifkwmrvkts", model.publisher()); - Assertions.assertEquals("zntocipaouajps", model.offer()); - Assertions.assertEquals("ucmpoyfd", model.sku()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryImageIdentifier model = - new GalleryImageIdentifier().withPublisher("xrifkwmrvkts").withOffer("zntocipaouajps").withSku("ucmpoyfd"); - model = BinaryData.fromObject(model).toObject(GalleryImageIdentifier.class); - Assertions.assertEquals("xrifkwmrvkts", model.publisher()); - Assertions.assertEquals("zntocipaouajps", model.offer()); - Assertions.assertEquals("ucmpoyfd", model.sku()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageStatusDownloadStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageStatusDownloadStatusTests.java deleted file mode 100644 index 5bd9577532b49..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageStatusDownloadStatusTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageStatusDownloadStatus; -import org.junit.jupiter.api.Assertions; - -public final class GalleryImageStatusDownloadStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryImageStatusDownloadStatus model = - BinaryData - .fromString("{\"downloadSizeInMB\":5604417483302342339}") - .toObject(GalleryImageStatusDownloadStatus.class); - Assertions.assertEquals(5604417483302342339L, model.downloadSizeInMB()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryImageStatusDownloadStatus model = - new GalleryImageStatusDownloadStatus().withDownloadSizeInMB(5604417483302342339L); - model = BinaryData.fromObject(model).toObject(GalleryImageStatusDownloadStatus.class); - Assertions.assertEquals(5604417483302342339L, model.downloadSizeInMB()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageStatusProvisioningStatusTests.java deleted file mode 100644 index f28c6f13723aa..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageStatusProvisioningStatusTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageStatusProvisioningStatus; -import com.azure.resourcemanager.azurestackhci.models.Status; -import org.junit.jupiter.api.Assertions; - -public final class GalleryImageStatusProvisioningStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryImageStatusProvisioningStatus model = - BinaryData - .fromString("{\"operationId\":\"smy\",\"status\":\"Succeeded\"}") - .toObject(GalleryImageStatusProvisioningStatus.class); - Assertions.assertEquals("smy", model.operationId()); - Assertions.assertEquals(Status.SUCCEEDED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryImageStatusProvisioningStatus model = - new GalleryImageStatusProvisioningStatus().withOperationId("smy").withStatus(Status.SUCCEEDED); - model = BinaryData.fromObject(model).toObject(GalleryImageStatusProvisioningStatus.class); - Assertions.assertEquals("smy", model.operationId()); - Assertions.assertEquals(Status.SUCCEEDED, model.status()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionPropertiesTests.java deleted file mode 100644 index 6af26902fe748..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.GalleryImageVersionProperties; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersionStorageProfile; -import com.azure.resourcemanager.azurestackhci.models.GalleryOSDiskImage; - -public final class GalleryImageVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryImageVersionProperties model = - BinaryData - .fromString("{\"storageProfile\":{\"osDiskImage\":{\"sizeInMB\":5458295378310588928}}}") - .toObject(GalleryImageVersionProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryImageVersionProperties model = - new GalleryImageVersionProperties() - .withStorageProfile(new GalleryImageVersionStorageProfile().withOsDiskImage(new GalleryOSDiskImage())); - model = BinaryData.fromObject(model).toObject(GalleryImageVersionProperties.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionStorageProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionStorageProfileTests.java deleted file mode 100644 index 126437fb33f4a..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionStorageProfileTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersionStorageProfile; -import com.azure.resourcemanager.azurestackhci.models.GalleryOSDiskImage; - -public final class GalleryImageVersionStorageProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryImageVersionStorageProfile model = - BinaryData - .fromString("{\"osDiskImage\":{\"sizeInMB\":5597579256870764074}}") - .toObject(GalleryImageVersionStorageProfile.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryImageVersionStorageProfile model = - new GalleryImageVersionStorageProfile().withOsDiskImage(new GalleryOSDiskImage()); - model = BinaryData.fromObject(model).toObject(GalleryImageVersionStorageProfile.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionTests.java deleted file mode 100644 index 76936045917ce..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImageVersionTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersion; -import com.azure.resourcemanager.azurestackhci.models.GalleryImageVersionStorageProfile; -import com.azure.resourcemanager.azurestackhci.models.GalleryOSDiskImage; -import org.junit.jupiter.api.Assertions; - -public final class GalleryImageVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryImageVersion model = - BinaryData - .fromString( - "{\"name\":\"ogknygjofjdd\",\"properties\":{\"storageProfile\":{\"osDiskImage\":{\"sizeInMB\":3233201824029317370}}}}") - .toObject(GalleryImageVersion.class); - Assertions.assertEquals("ogknygjofjdd", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryImageVersion model = - new GalleryImageVersion() - .withName("ogknygjofjdd") - .withStorageProfile(new GalleryImageVersionStorageProfile().withOsDiskImage(new GalleryOSDiskImage())); - model = BinaryData.fromObject(model).toObject(GalleryImageVersion.class); - Assertions.assertEquals("ogknygjofjdd", model.name()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesUpdateRequestTests.java deleted file mode 100644 index 3a04ca1435899..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryImagesUpdateRequestTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GalleryImagesUpdateRequest; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class GalleryImagesUpdateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryImagesUpdateRequest model = - BinaryData - .fromString( - "{\"tags\":{\"anzwuxzdxta\":\"y\",\"hfpmrqobmtukknr\":\"rlhm\",\"gnwzsymglzufc\":\"rtihfxtijbpz\",\"hdbihan\":\"zk\"}}") - .toObject(GalleryImagesUpdateRequest.class); - Assertions.assertEquals("y", model.tags().get("anzwuxzdxta")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryImagesUpdateRequest model = - new GalleryImagesUpdateRequest() - .withTags( - mapOf( - "anzwuxzdxta", - "y", - "hfpmrqobmtukknr", - "rlhm", - "gnwzsymglzufc", - "rtihfxtijbpz", - "hdbihan", - "zk")); - model = BinaryData.fromObject(model).toObject(GalleryImagesUpdateRequest.class); - Assertions.assertEquals("y", model.tags().get("anzwuxzdxta")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryOSDiskImageTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryOSDiskImageTests.java deleted file mode 100644 index 470de108ecaaf..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GalleryOSDiskImageTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GalleryOSDiskImage; - -public final class GalleryOSDiskImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GalleryOSDiskImage model = - BinaryData.fromString("{\"sizeInMB\":8523359422088474782}").toObject(GalleryOSDiskImage.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GalleryOSDiskImage model = new GalleryOSDiskImage(); - model = BinaryData.fromObject(model).toObject(GalleryOSDiskImage.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentInstallStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentInstallStatusTests.java deleted file mode 100644 index e105984d93b98..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/GuestAgentInstallStatusTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.GuestAgentInstallStatus; - -public final class GuestAgentInstallStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GuestAgentInstallStatus model = - BinaryData - .fromString( - "{\"vmUuid\":\"fbkp\",\"status\":\"Succeeded\",\"lastStatusChange\":\"2021-02-08T07:21:06Z\",\"agentVersion\":\"ndnhj\",\"errorDetails\":[]}") - .toObject(GuestAgentInstallStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GuestAgentInstallStatus model = new GuestAgentInstallStatus(); - model = BinaryData.fromObject(model).toObject(GuestAgentInstallStatus.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileUpdateTests.java deleted file mode 100644 index 1492f0ba86b15..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HardwareProfileUpdateTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.HardwareProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.VmSizeEnum; -import org.junit.jupiter.api.Assertions; - -public final class HardwareProfileUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HardwareProfileUpdate model = - BinaryData - .fromString( - "{\"vmSize\":\"Standard_K8S5_v1\",\"processors\":1792717087,\"memoryMB\":3914209859881409326}") - .toObject(HardwareProfileUpdate.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_K8S5_V1, model.vmSize()); - Assertions.assertEquals(1792717087, model.processors()); - Assertions.assertEquals(3914209859881409326L, model.memoryMB()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HardwareProfileUpdate model = - new HardwareProfileUpdate() - .withVmSize(VmSizeEnum.STANDARD_K8S5_V1) - .withProcessors(1792717087) - .withMemoryMB(3914209859881409326L); - model = BinaryData.fromObject(model).toObject(HardwareProfileUpdate.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_K8S5_V1, model.vmSize()); - Assertions.assertEquals(1792717087, model.processors()); - Assertions.assertEquals(3914209859881409326L, model.memoryMB()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HttpProxyConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HttpProxyConfigurationTests.java deleted file mode 100644 index bd197a67ca0ab..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/HttpProxyConfigurationTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.HttpProxyConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HttpProxyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpProxyConfiguration model = - BinaryData - .fromString( - "{\"httpProxy\":\"sgwbnbbeld\",\"httpsProxy\":\"k\",\"noProxy\":[\"liourqhak\"],\"trustedCa\":\"hashsfwxosow\"}") - .toObject(HttpProxyConfiguration.class); - Assertions.assertEquals("sgwbnbbeld", model.httpProxy()); - Assertions.assertEquals("k", model.httpsProxy()); - Assertions.assertEquals("liourqhak", model.noProxy().get(0)); - Assertions.assertEquals("hashsfwxosow", model.trustedCa()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpProxyConfiguration model = - new HttpProxyConfiguration() - .withHttpProxy("sgwbnbbeld") - .withHttpsProxy("k") - .withNoProxy(Arrays.asList("liourqhak")) - .withTrustedCa("hashsfwxosow"); - model = BinaryData.fromObject(model).toObject(HttpProxyConfiguration.class); - Assertions.assertEquals("sgwbnbbeld", model.httpProxy()); - Assertions.assertEquals("k", model.httpsProxy()); - Assertions.assertEquals("liourqhak", model.noProxy().get(0)); - Assertions.assertEquals("hashsfwxosow", model.trustedCa()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IdentityTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IdentityTests.java deleted file mode 100644 index 2deda47d0c8b5..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IdentityTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.Identity; -import com.azure.resourcemanager.azurestackhci.models.ResourceIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class IdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Identity model = - BinaryData - .fromString("{\"principalId\":\"hvylwzbt\",\"tenantId\":\"xujznbmpowu\",\"type\":\"SystemAssigned\"}") - .toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Identity model = new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InterfaceDnsSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InterfaceDnsSettingsTests.java deleted file mode 100644 index e65e860692bad..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/InterfaceDnsSettingsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.InterfaceDnsSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InterfaceDnsSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InterfaceDnsSettings model = - BinaryData.fromString("{\"dnsServers\":[\"ypewrmjmwvvjekt\"]}").toObject(InterfaceDnsSettings.class); - Assertions.assertEquals("ypewrmjmwvvjekt", model.dnsServers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InterfaceDnsSettings model = new InterfaceDnsSettings().withDnsServers(Arrays.asList("ypewrmjmwvvjekt")); - model = BinaryData.fromObject(model).toObject(InterfaceDnsSettings.class); - Assertions.assertEquals("ypewrmjmwvvjekt", model.dnsServers().get(0)); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationPropertiesSubnetTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationPropertiesSubnetTests.java deleted file mode 100644 index 90707fa29d83d..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationPropertiesSubnetTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpConfigurationPropertiesSubnet; -import org.junit.jupiter.api.Assertions; - -public final class IpConfigurationPropertiesSubnetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpConfigurationPropertiesSubnet model = - BinaryData.fromString("{\"id\":\"zf\"}").toObject(IpConfigurationPropertiesSubnet.class); - Assertions.assertEquals("zf", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpConfigurationPropertiesSubnet model = new IpConfigurationPropertiesSubnet().withId("zf"); - model = BinaryData.fromObject(model).toObject(IpConfigurationPropertiesSubnet.class); - Assertions.assertEquals("zf", model.id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationPropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationPropertiesTests.java deleted file mode 100644 index 18abb9a34e5b3..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpConfigurationProperties; -import com.azure.resourcemanager.azurestackhci.models.IpConfigurationPropertiesSubnet; -import org.junit.jupiter.api.Assertions; - -public final class IpConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpConfigurationProperties model = - BinaryData - .fromString( - "{\"gateway\":\"ohoqqnwvlryav\",\"prefixLength\":\"heun\",\"privateIPAddress\":\"qhgyxzkonocukok\",\"subnet\":{\"id\":\"xuconu\"}}") - .toObject(IpConfigurationProperties.class); - Assertions.assertEquals("qhgyxzkonocukok", model.privateIpAddress()); - Assertions.assertEquals("xuconu", model.subnet().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpConfigurationProperties model = - new IpConfigurationProperties() - .withPrivateIpAddress("qhgyxzkonocukok") - .withSubnet(new IpConfigurationPropertiesSubnet().withId("xuconu")); - model = BinaryData.fromObject(model).toObject(IpConfigurationProperties.class); - Assertions.assertEquals("qhgyxzkonocukok", model.privateIpAddress()); - Assertions.assertEquals("xuconu", model.subnet().id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationTests.java deleted file mode 100644 index 7ac0871a0f962..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpConfigurationTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpConfiguration; -import com.azure.resourcemanager.azurestackhci.models.IpConfigurationProperties; -import com.azure.resourcemanager.azurestackhci.models.IpConfigurationPropertiesSubnet; -import org.junit.jupiter.api.Assertions; - -public final class IpConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpConfiguration model = - BinaryData - .fromString( - "{\"name\":\"hagalpbuxwgipwh\",\"properties\":{\"gateway\":\"wkgshwa\",\"prefixLength\":\"ixzbinjeputtmryw\",\"privateIPAddress\":\"zoqftiyqzrnkcqvy\",\"subnet\":{\"id\":\"hzls\"}}}") - .toObject(IpConfiguration.class); - Assertions.assertEquals("hagalpbuxwgipwh", model.name()); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.properties().privateIpAddress()); - Assertions.assertEquals("hzls", model.properties().subnet().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpConfiguration model = - new IpConfiguration() - .withName("hagalpbuxwgipwh") - .withProperties( - new IpConfigurationProperties() - .withPrivateIpAddress("zoqftiyqzrnkcqvy") - .withSubnet(new IpConfigurationPropertiesSubnet().withId("hzls"))); - model = BinaryData.fromObject(model).toObject(IpConfiguration.class); - Assertions.assertEquals("hagalpbuxwgipwh", model.name()); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.properties().privateIpAddress()); - Assertions.assertEquals("hzls", model.properties().subnet().id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolInfoTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolInfoTests.java deleted file mode 100644 index 404cb9f1b0d40..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolInfoTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpPoolInfo; - -public final class IpPoolInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPoolInfo model = - BinaryData.fromString("{\"used\":\"gwdslfhotwm\",\"available\":\"npwlbjnpg\"}").toObject(IpPoolInfo.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPoolInfo model = new IpPoolInfo(); - model = BinaryData.fromObject(model).toObject(IpPoolInfo.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolTests.java deleted file mode 100644 index 46ddfeb32fc4d..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/IpPoolTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpPool; -import com.azure.resourcemanager.azurestackhci.models.IpPoolInfo; -import com.azure.resourcemanager.azurestackhci.models.IpPoolTypeEnum; -import org.junit.jupiter.api.Assertions; - -public final class IpPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpPool model = - BinaryData - .fromString( - "{\"name\":\"seiphe\",\"ipPoolType\":\"vm\",\"start\":\"keyyi\",\"end\":\"jbdlwtgrhpdjpju\",\"info\":{\"used\":\"xazjpqyegual\",\"available\":\"xxhejjzzvd\"}}") - .toObject(IpPool.class); - Assertions.assertEquals("seiphe", model.name()); - Assertions.assertEquals(IpPoolTypeEnum.VM, model.ipPoolType()); - Assertions.assertEquals("keyyi", model.start()); - Assertions.assertEquals("jbdlwtgrhpdjpju", model.end()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpPool model = - new IpPool() - .withName("seiphe") - .withIpPoolType(IpPoolTypeEnum.VM) - .withStart("keyyi") - .withEnd("jbdlwtgrhpdjpju") - .withInfo(new IpPoolInfo()); - model = BinaryData.fromObject(model).toObject(IpPool.class); - Assertions.assertEquals("seiphe", model.name()); - Assertions.assertEquals(IpPoolTypeEnum.VM, model.ipPoolType()); - Assertions.assertEquals("keyyi", model.start()); - Assertions.assertEquals("jbdlwtgrhpdjpju", model.end()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworkPropertiesDhcpOptionsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworkPropertiesDhcpOptionsTests.java deleted file mode 100644 index 420b9f2c2cebf..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworkPropertiesDhcpOptionsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.LogicalNetworkPropertiesDhcpOptions; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogicalNetworkPropertiesDhcpOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogicalNetworkPropertiesDhcpOptions model = - BinaryData - .fromString("{\"dnsServers\":[\"tnwu\",\"zga\",\"x\",\"fizuckyf\"]}") - .toObject(LogicalNetworkPropertiesDhcpOptions.class); - Assertions.assertEquals("tnwu", model.dnsServers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogicalNetworkPropertiesDhcpOptions model = - new LogicalNetworkPropertiesDhcpOptions().withDnsServers(Arrays.asList("tnwu", "zga", "x", "fizuckyf")); - model = BinaryData.fromObject(model).toObject(LogicalNetworkPropertiesDhcpOptions.class); - Assertions.assertEquals("tnwu", model.dnsServers().get(0)); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworkStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworkStatusProvisioningStatusTests.java deleted file mode 100644 index 65af88bf57081..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworkStatusProvisioningStatusTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.LogicalNetworkStatusProvisioningStatus; -import com.azure.resourcemanager.azurestackhci.models.Status; -import org.junit.jupiter.api.Assertions; - -public final class LogicalNetworkStatusProvisioningStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogicalNetworkStatusProvisioningStatus model = - BinaryData - .fromString("{\"operationId\":\"pusuesn\",\"status\":\"Succeeded\"}") - .toObject(LogicalNetworkStatusProvisioningStatus.class); - Assertions.assertEquals("pusuesn", model.operationId()); - Assertions.assertEquals(Status.SUCCEEDED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogicalNetworkStatusProvisioningStatus model = - new LogicalNetworkStatusProvisioningStatus().withOperationId("pusuesn").withStatus(Status.SUCCEEDED); - model = BinaryData.fromObject(model).toObject(LogicalNetworkStatusProvisioningStatus.class); - Assertions.assertEquals("pusuesn", model.operationId()); - Assertions.assertEquals(Status.SUCCEEDED, model.status()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksUpdateRequestTests.java deleted file mode 100644 index 0e016193ba04b..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/LogicalNetworksUpdateRequestTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.LogicalNetworksUpdateRequest; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LogicalNetworksUpdateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogicalNetworksUpdateRequest model = - BinaryData - .fromString( - "{\"tags\":{\"xzdmohctb\":\"bavo\",\"ndnvo\":\"vudwx\",\"lazjdyggdtjixhbk\":\"gujjugwdkcglh\"}}") - .toObject(LogicalNetworksUpdateRequest.class); - Assertions.assertEquals("bavo", model.tags().get("xzdmohctb")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogicalNetworksUpdateRequest model = - new LogicalNetworksUpdateRequest() - .withTags(mapOf("xzdmohctb", "bavo", "ndnvo", "vudwx", "lazjdyggdtjixhbk", "gujjugwdkcglh")); - model = BinaryData.fromObject(model).toObject(LogicalNetworksUpdateRequest.class); - Assertions.assertEquals("bavo", model.tags().get("xzdmohctb")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImageStatusDownloadStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImageStatusDownloadStatusTests.java deleted file mode 100644 index fcd58a0c02fd2..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImageStatusDownloadStatusTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImageStatusDownloadStatus; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceGalleryImageStatusDownloadStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceGalleryImageStatusDownloadStatus model = - BinaryData - .fromString("{\"downloadSizeInMB\":4225896230813201107}") - .toObject(MarketplaceGalleryImageStatusDownloadStatus.class); - Assertions.assertEquals(4225896230813201107L, model.downloadSizeInMB()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceGalleryImageStatusDownloadStatus model = - new MarketplaceGalleryImageStatusDownloadStatus().withDownloadSizeInMB(4225896230813201107L); - model = BinaryData.fromObject(model).toObject(MarketplaceGalleryImageStatusDownloadStatus.class); - Assertions.assertEquals(4225896230813201107L, model.downloadSizeInMB()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImageStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImageStatusProvisioningStatusTests.java deleted file mode 100644 index 12af69a9c43b0..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImageStatusProvisioningStatusTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImageStatusProvisioningStatus; -import com.azure.resourcemanager.azurestackhci.models.Status; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceGalleryImageStatusProvisioningStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceGalleryImageStatusProvisioningStatus model = - BinaryData - .fromString("{\"operationId\":\"czvyifq\",\"status\":\"InProgress\"}") - .toObject(MarketplaceGalleryImageStatusProvisioningStatus.class); - Assertions.assertEquals("czvyifq", model.operationId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceGalleryImageStatusProvisioningStatus model = - new MarketplaceGalleryImageStatusProvisioningStatus() - .withOperationId("czvyifq") - .withStatus(Status.IN_PROGRESS); - model = BinaryData.fromObject(model).toObject(MarketplaceGalleryImageStatusProvisioningStatus.class); - Assertions.assertEquals("czvyifq", model.operationId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesUpdateRequestTests.java deleted file mode 100644 index aa663a9983174..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/MarketplaceGalleryImagesUpdateRequestTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.MarketplaceGalleryImagesUpdateRequest; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceGalleryImagesUpdateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceGalleryImagesUpdateRequest model = - BinaryData.fromString("{\"tags\":{\"d\":\"lrmv\"}}").toObject(MarketplaceGalleryImagesUpdateRequest.class); - Assertions.assertEquals("lrmv", model.tags().get("d")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceGalleryImagesUpdateRequest model = - new MarketplaceGalleryImagesUpdateRequest().withTags(mapOf("d", "lrmv")); - model = BinaryData.fromObject(model).toObject(MarketplaceGalleryImagesUpdateRequest.class); - Assertions.assertEquals("lrmv", model.tags().get("d")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfaceStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfaceStatusProvisioningStatusTests.java deleted file mode 100644 index 4fe6285bf0e88..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfaceStatusProvisioningStatusTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.NetworkInterfaceStatusProvisioningStatus; -import com.azure.resourcemanager.azurestackhci.models.Status; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfaceStatusProvisioningStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfaceStatusProvisioningStatus model = - BinaryData - .fromString("{\"operationId\":\"rzpwvlqdqgbiq\",\"status\":\"InProgress\"}") - .toObject(NetworkInterfaceStatusProvisioningStatus.class); - Assertions.assertEquals("rzpwvlqdqgbiq", model.operationId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfaceStatusProvisioningStatus model = - new NetworkInterfaceStatusProvisioningStatus() - .withOperationId("rzpwvlqdqgbiq") - .withStatus(Status.IN_PROGRESS); - model = BinaryData.fromObject(model).toObject(NetworkInterfaceStatusProvisioningStatus.class); - Assertions.assertEquals("rzpwvlqdqgbiq", model.operationId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesUpdateRequestTests.java deleted file mode 100644 index 8a2df30279026..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkInterfacesUpdateRequestTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.NetworkInterfacesUpdateRequest; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfacesUpdateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterfacesUpdateRequest model = - BinaryData - .fromString("{\"tags\":{\"kymuctqhjfbebr\":\"aetcktvfcivfs\"}}") - .toObject(NetworkInterfacesUpdateRequest.class); - Assertions.assertEquals("aetcktvfcivfs", model.tags().get("kymuctqhjfbebr")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkInterfacesUpdateRequest model = - new NetworkInterfacesUpdateRequest().withTags(mapOf("kymuctqhjfbebr", "aetcktvfcivfs")); - model = BinaryData.fromObject(model).toObject(NetworkInterfacesUpdateRequest.class); - Assertions.assertEquals("aetcktvfcivfs", model.tags().get("kymuctqhjfbebr")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkProfileUpdateNetworkInterfacesItemTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkProfileUpdateNetworkInterfacesItemTests.java deleted file mode 100644 index 26e6213d66698..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkProfileUpdateNetworkInterfacesItemTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.NetworkProfileUpdateNetworkInterfacesItem; -import org.junit.jupiter.api.Assertions; - -public final class NetworkProfileUpdateNetworkInterfacesItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkProfileUpdateNetworkInterfacesItem model = - BinaryData - .fromString("{\"id\":\"wyjsflhhcaalnjix\"}") - .toObject(NetworkProfileUpdateNetworkInterfacesItem.class); - Assertions.assertEquals("wyjsflhhcaalnjix", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkProfileUpdateNetworkInterfacesItem model = - new NetworkProfileUpdateNetworkInterfacesItem().withId("wyjsflhhcaalnjix"); - model = BinaryData.fromObject(model).toObject(NetworkProfileUpdateNetworkInterfacesItem.class); - Assertions.assertEquals("wyjsflhhcaalnjix", model.id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkProfileUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkProfileUpdateTests.java deleted file mode 100644 index 4c243a388138b..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/NetworkProfileUpdateTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.NetworkProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.NetworkProfileUpdateNetworkInterfacesItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkProfileUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkProfileUpdate model = - BinaryData.fromString("{\"networkInterfaces\":[{\"id\":\"smv\"}]}").toObject(NetworkProfileUpdate.class); - Assertions.assertEquals("smv", model.networkInterfaces().get(0).id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkProfileUpdate model = - new NetworkProfileUpdate() - .withNetworkInterfaces(Arrays.asList(new NetworkProfileUpdateNetworkInterfacesItem().withId("smv"))); - model = BinaryData.fromObject(model).toObject(NetworkProfileUpdate.class); - Assertions.assertEquals("smv", model.networkInterfaces().get(0).id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java deleted file mode 100644 index 58e21224c59ec..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationDisplayTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"zgvfcjrwz\",\"resource\":\"xjtfelluwfzit\",\"operation\":\"peqfpjkjl\",\"description\":\"fpdvhpfxxypi\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java deleted file mode 100644 index 7d81439d130b3..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.OperationInner; -import com.azure.resourcemanager.azurestackhci.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"zakljlahbc\",\"isDataAction\":true,\"display\":{\"provider\":\"fdosyg\",\"resource\":\"paojakhmsbzjh\",\"operation\":\"zevdphlx\",\"description\":\"lthqtrgqjbp\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java deleted file mode 100644 index ddc2c6fc18ac6..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"dcc\",\"isDataAction\":false,\"display\":{\"provider\":\"cnyejhkryhtnapcz\",\"resource\":\"okjye\",\"operation\":\"kvnipjoxz\",\"description\":\"chgejspodm\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"eho\",\"isDataAction\":false,\"display\":{\"provider\":\"uxinpmqnjaq\",\"resource\":\"xj\",\"operation\":\"r\",\"description\":\"vcputegj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"t\",\"isDataAction\":true,\"display\":{\"provider\":\"pjhulsuuvmkj\",\"resource\":\"k\",\"operation\":\"f\",\"description\":\"iodjp\"},\"origin\":\"user\",\"actionType\":\"Internal\"}],\"nextLink\":\"pvwryoqpsoacc\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java deleted file mode 100644 index 1e6ae6924f241..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OperationsListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.azurestackhci.AzureStackHciManager; -import com.azure.resourcemanager.azurestackhci.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"pjflcxogao\",\"isDataAction\":true,\"display\":{\"provider\":\"nsikvmkqzeqqkdl\",\"resource\":\"zxmhhvhgu\",\"operation\":\"odkwobd\",\"description\":\"xtibqdxbxwakbog\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AzureStackHciManager manager = - AzureStackHciManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateLinuxConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateLinuxConfigurationTests.java deleted file mode 100644 index f4fcbb658c7e6..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateLinuxConfigurationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdateLinuxConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class OsProfileUpdateLinuxConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OsProfileUpdateLinuxConfiguration model = - BinaryData - .fromString("{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":false}") - .toObject(OsProfileUpdateLinuxConfiguration.class); - Assertions.assertEquals(true, model.provisionVMAgent()); - Assertions.assertEquals(false, model.provisionVMConfigAgent()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OsProfileUpdateLinuxConfiguration model = - new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(true).withProvisionVMConfigAgent(false); - model = BinaryData.fromObject(model).toObject(OsProfileUpdateLinuxConfiguration.class); - Assertions.assertEquals(true, model.provisionVMAgent()); - Assertions.assertEquals(false, model.provisionVMConfigAgent()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateTests.java deleted file mode 100644 index 4bdcba95c4972..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdateLinuxConfiguration; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdateWindowsConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class OsProfileUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OsProfileUpdate model = - BinaryData - .fromString( - "{\"computerName\":\"xyawj\",\"linuxConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":true},\"windowsConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":false}}") - .toObject(OsProfileUpdate.class); - Assertions.assertEquals("xyawj", model.computerName()); - Assertions.assertEquals(true, model.linuxConfiguration().provisionVMAgent()); - Assertions.assertEquals(true, model.linuxConfiguration().provisionVMConfigAgent()); - Assertions.assertEquals(true, model.windowsConfiguration().provisionVMAgent()); - Assertions.assertEquals(false, model.windowsConfiguration().provisionVMConfigAgent()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OsProfileUpdate model = - new OsProfileUpdate() - .withComputerName("xyawj") - .withLinuxConfiguration( - new OsProfileUpdateLinuxConfiguration().withProvisionVMAgent(true).withProvisionVMConfigAgent(true)) - .withWindowsConfiguration( - new OsProfileUpdateWindowsConfiguration() - .withProvisionVMAgent(true) - .withProvisionVMConfigAgent(false)); - model = BinaryData.fromObject(model).toObject(OsProfileUpdate.class); - Assertions.assertEquals("xyawj", model.computerName()); - Assertions.assertEquals(true, model.linuxConfiguration().provisionVMAgent()); - Assertions.assertEquals(true, model.linuxConfiguration().provisionVMConfigAgent()); - Assertions.assertEquals(true, model.windowsConfiguration().provisionVMAgent()); - Assertions.assertEquals(false, model.windowsConfiguration().provisionVMConfigAgent()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateWindowsConfigurationTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateWindowsConfigurationTests.java deleted file mode 100644 index 6a82161ef4bf9..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/OsProfileUpdateWindowsConfigurationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdateWindowsConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class OsProfileUpdateWindowsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OsProfileUpdateWindowsConfiguration model = - BinaryData - .fromString("{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":true}") - .toObject(OsProfileUpdateWindowsConfiguration.class); - Assertions.assertEquals(true, model.provisionVMAgent()); - Assertions.assertEquals(true, model.provisionVMConfigAgent()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OsProfileUpdateWindowsConfiguration model = - new OsProfileUpdateWindowsConfiguration().withProvisionVMAgent(true).withProvisionVMConfigAgent(true); - model = BinaryData.fromObject(model).toObject(OsProfileUpdateWindowsConfiguration.class); - Assertions.assertEquals(true, model.provisionVMAgent()); - Assertions.assertEquals(true, model.provisionVMConfigAgent()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RoutePropertiesFormatTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RoutePropertiesFormatTests.java deleted file mode 100644 index 66e73df2b95f2..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RoutePropertiesFormatTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.RoutePropertiesFormat; -import org.junit.jupiter.api.Assertions; - -public final class RoutePropertiesFormatTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RoutePropertiesFormat model = - BinaryData - .fromString("{\"addressPrefix\":\"mngnzscxaqw\",\"nextHopIpAddress\":\"chcbonqvpkvlrxnj\"}") - .toObject(RoutePropertiesFormat.class); - Assertions.assertEquals("mngnzscxaqw", model.addressPrefix()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.nextHopIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RoutePropertiesFormat model = - new RoutePropertiesFormat().withAddressPrefix("mngnzscxaqw").withNextHopIpAddress("chcbonqvpkvlrxnj"); - model = BinaryData.fromObject(model).toObject(RoutePropertiesFormat.class); - Assertions.assertEquals("mngnzscxaqw", model.addressPrefix()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.nextHopIpAddress()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTablePropertiesFormatTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTablePropertiesFormatTests.java deleted file mode 100644 index d0a6703eb7ce0..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTablePropertiesFormatTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.RouteTablePropertiesFormat; -import com.azure.resourcemanager.azurestackhci.models.Route; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RouteTablePropertiesFormatTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RouteTablePropertiesFormat model = - BinaryData - .fromString( - "{\"routes\":[{\"properties\":{\"addressPrefix\":\"xlzevgbmqjqabcy\",\"nextHopIpAddress\":\"ivkwlzuvccfwnfnb\"},\"name\":\"fionl\"}]}") - .toObject(RouteTablePropertiesFormat.class); - Assertions.assertEquals("fionl", model.routes().get(0).name()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.routes().get(0).addressPrefix()); - Assertions.assertEquals("ivkwlzuvccfwnfnb", model.routes().get(0).nextHopIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RouteTablePropertiesFormat model = - new RouteTablePropertiesFormat() - .withRoutes( - Arrays - .asList( - new Route() - .withName("fionl") - .withAddressPrefix("xlzevgbmqjqabcy") - .withNextHopIpAddress("ivkwlzuvccfwnfnb"))); - model = BinaryData.fromObject(model).toObject(RouteTablePropertiesFormat.class); - Assertions.assertEquals("fionl", model.routes().get(0).name()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.routes().get(0).addressPrefix()); - Assertions.assertEquals("ivkwlzuvccfwnfnb", model.routes().get(0).nextHopIpAddress()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTableTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTableTests.java deleted file mode 100644 index 37ff539098fa7..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTableTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.Route; -import com.azure.resourcemanager.azurestackhci.models.RouteTable; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RouteTableTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RouteTable model = - BinaryData - .fromString( - "{\"etag\":\"vdfgiotk\",\"name\":\"utqxlngx\",\"type\":\"fgugnxkrxdqmid\",\"properties\":{\"routes\":[{\"properties\":{\"addressPrefix\":\"qdrabhjybigehoqf\",\"nextHopIpAddress\":\"wska\"},\"name\":\"ktzlcuiywg\"},{\"properties\":{\"addressPrefix\":\"gndrvynh\",\"nextHopIpAddress\":\"pphrcgynco\"},\"name\":\"ecfvmm\"}]}}") - .toObject(RouteTable.class); - Assertions.assertEquals("ktzlcuiywg", model.routes().get(0).name()); - Assertions.assertEquals("qdrabhjybigehoqf", model.routes().get(0).addressPrefix()); - Assertions.assertEquals("wska", model.routes().get(0).nextHopIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RouteTable model = - new RouteTable() - .withRoutes( - Arrays - .asList( - new Route() - .withName("ktzlcuiywg") - .withAddressPrefix("qdrabhjybigehoqf") - .withNextHopIpAddress("wska"), - new Route() - .withName("ecfvmm") - .withAddressPrefix("gndrvynh") - .withNextHopIpAddress("pphrcgynco"))); - model = BinaryData.fromObject(model).toObject(RouteTable.class); - Assertions.assertEquals("ktzlcuiywg", model.routes().get(0).name()); - Assertions.assertEquals("qdrabhjybigehoqf", model.routes().get(0).addressPrefix()); - Assertions.assertEquals("wska", model.routes().get(0).nextHopIpAddress()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTests.java deleted file mode 100644 index 294814c6bf3ce..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/RouteTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.Route; -import org.junit.jupiter.api.Assertions; - -public final class RouteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Route model = - BinaryData - .fromString( - "{\"properties\":{\"addressPrefix\":\"etqgtzxdpnq\",\"nextHopIpAddress\":\"qwxrjfeallnw\"},\"name\":\"bisnja\"}") - .toObject(Route.class); - Assertions.assertEquals("bisnja", model.name()); - Assertions.assertEquals("etqgtzxdpnq", model.addressPrefix()); - Assertions.assertEquals("qwxrjfeallnw", model.nextHopIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Route model = - new Route().withName("bisnja").withAddressPrefix("etqgtzxdpnq").withNextHopIpAddress("qwxrjfeallnw"); - model = BinaryData.fromObject(model).toObject(Route.class); - Assertions.assertEquals("bisnja", model.name()); - Assertions.assertEquals("etqgtzxdpnq", model.addressPrefix()); - Assertions.assertEquals("qwxrjfeallnw", model.nextHopIpAddress()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainerStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainerStatusProvisioningStatusTests.java deleted file mode 100644 index 38283f499408d..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainerStatusProvisioningStatusTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.Status; -import com.azure.resourcemanager.azurestackhci.models.StorageContainerStatusProvisioningStatus; -import org.junit.jupiter.api.Assertions; - -public final class StorageContainerStatusProvisioningStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageContainerStatusProvisioningStatus model = - BinaryData - .fromString("{\"operationId\":\"ijggmebfsiar\",\"status\":\"InProgress\"}") - .toObject(StorageContainerStatusProvisioningStatus.class); - Assertions.assertEquals("ijggmebfsiar", model.operationId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageContainerStatusProvisioningStatus model = - new StorageContainerStatusProvisioningStatus() - .withOperationId("ijggmebfsiar") - .withStatus(Status.IN_PROGRESS); - model = BinaryData.fromObject(model).toObject(StorageContainerStatusProvisioningStatus.class); - Assertions.assertEquals("ijggmebfsiar", model.operationId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.status()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersUpdateRequestTests.java deleted file mode 100644 index 554bcae616114..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageContainersUpdateRequestTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.StorageContainersUpdateRequest; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class StorageContainersUpdateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageContainersUpdateRequest model = - BinaryData - .fromString( - "{\"tags\":{\"jrunmpxtt\":\"vpnazzm\",\"bnlankxmyskpb\":\"bh\",\"nrs\":\"enbtkcxywny\",\"lhaaxdbabp\":\"nlqidybyxczf\"}}") - .toObject(StorageContainersUpdateRequest.class); - Assertions.assertEquals("vpnazzm", model.tags().get("jrunmpxtt")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageContainersUpdateRequest model = - new StorageContainersUpdateRequest() - .withTags( - mapOf( - "jrunmpxtt", - "vpnazzm", - "bnlankxmyskpb", - "bh", - "nrs", - "enbtkcxywny", - "lhaaxdbabp", - "nlqidybyxczf")); - model = BinaryData.fromObject(model).toObject(StorageContainersUpdateRequest.class); - Assertions.assertEquals("vpnazzm", model.tags().get("jrunmpxtt")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileUpdateDataDisksItemTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileUpdateDataDisksItemTests.java deleted file mode 100644 index d8feec5bcaa9c..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileUpdateDataDisksItemTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.StorageProfileUpdateDataDisksItem; -import org.junit.jupiter.api.Assertions; - -public final class StorageProfileUpdateDataDisksItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageProfileUpdateDataDisksItem model = - BinaryData.fromString("{\"id\":\"aboekqv\"}").toObject(StorageProfileUpdateDataDisksItem.class); - Assertions.assertEquals("aboekqv", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageProfileUpdateDataDisksItem model = new StorageProfileUpdateDataDisksItem().withId("aboekqv"); - model = BinaryData.fromObject(model).toObject(StorageProfileUpdateDataDisksItem.class); - Assertions.assertEquals("aboekqv", model.id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileUpdateTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileUpdateTests.java deleted file mode 100644 index d80c9f4a17310..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/StorageProfileUpdateTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.StorageProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.StorageProfileUpdateDataDisksItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StorageProfileUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageProfileUpdate model = - BinaryData - .fromString("{\"dataDisks\":[{\"id\":\"p\"},{\"id\":\"jyofdxluusdtto\"}]}") - .toObject(StorageProfileUpdate.class); - Assertions.assertEquals("p", model.dataDisks().get(0).id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageProfileUpdate model = - new StorageProfileUpdate() - .withDataDisks( - Arrays - .asList( - new StorageProfileUpdateDataDisksItem().withId("p"), - new StorageProfileUpdateDataDisksItem().withId("jyofdxluusdtto"))); - model = BinaryData.fromObject(model).toObject(StorageProfileUpdate.class); - Assertions.assertEquals("p", model.dataDisks().get(0).id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetPropertiesFormatIpConfigurationReferencesItemTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetPropertiesFormatIpConfigurationReferencesItemTests.java deleted file mode 100644 index 1a53215e9efe2..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetPropertiesFormatIpConfigurationReferencesItemTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.SubnetPropertiesFormatIpConfigurationReferencesItem; -import org.junit.jupiter.api.Assertions; - -public final class SubnetPropertiesFormatIpConfigurationReferencesItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubnetPropertiesFormatIpConfigurationReferencesItem model = - BinaryData - .fromString("{\"ID\":\"uhrzayvvt\"}") - .toObject(SubnetPropertiesFormatIpConfigurationReferencesItem.class); - Assertions.assertEquals("uhrzayvvt", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubnetPropertiesFormatIpConfigurationReferencesItem model = - new SubnetPropertiesFormatIpConfigurationReferencesItem().withId("uhrzayvvt"); - model = BinaryData.fromObject(model).toObject(SubnetPropertiesFormatIpConfigurationReferencesItem.class); - Assertions.assertEquals("uhrzayvvt", model.id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetPropertiesFormatTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetPropertiesFormatTests.java deleted file mode 100644 index 42660136fa6e3..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetPropertiesFormatTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.fluent.models.SubnetPropertiesFormat; -import com.azure.resourcemanager.azurestackhci.models.IpAllocationMethodEnum; -import com.azure.resourcemanager.azurestackhci.models.IpPool; -import com.azure.resourcemanager.azurestackhci.models.IpPoolInfo; -import com.azure.resourcemanager.azurestackhci.models.IpPoolTypeEnum; -import com.azure.resourcemanager.azurestackhci.models.Route; -import com.azure.resourcemanager.azurestackhci.models.RouteTable; -import com.azure.resourcemanager.azurestackhci.models.SubnetPropertiesFormatIpConfigurationReferencesItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubnetPropertiesFormatTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubnetPropertiesFormat model = - BinaryData - .fromString( - "{\"addressPrefix\":\"ummajtjaod\",\"addressPrefixes\":[\"nbdxk\",\"pxokajionp\",\"mexgstxgcp\",\"dg\"],\"ipAllocationMethod\":\"Static\",\"ipConfigurationReferences\":[{\"ID\":\"vdjwzrlovm\"}],\"routeTable\":{\"etag\":\"hijco\",\"name\":\"ctbzaq\",\"type\":\"sycbkbfk\",\"properties\":{\"routes\":[{\"properties\":{\"addressPrefix\":\"xxppofm\",\"nextHopIpAddress\":\"x\"},\"name\":\"jpgd\"},{\"properties\":{\"addressPrefix\":\"c\",\"nextHopIpAddress\":\"xhvpmoue\"},\"name\":\"dzxibqeojnxqbzvd\"},{\"properties\":{\"addressPrefix\":\"wndeicbtwnp\",\"nextHopIpAddress\":\"oqvuhr\"},\"name\":\"f\"}]}},\"ipPools\":[{\"name\":\"dglmjthjqkwp\",\"ipPoolType\":\"vm\",\"start\":\"xmqci\",\"end\":\"vhkhixu\",\"info\":{\"used\":\"topbobjogh\",\"available\":\"w\"}}],\"vlan\":54099605}") - .toObject(SubnetPropertiesFormat.class); - Assertions.assertEquals("ummajtjaod", model.addressPrefix()); - Assertions.assertEquals("nbdxk", model.addressPrefixes().get(0)); - Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("vdjwzrlovm", model.ipConfigurationReferences().get(0).id()); - Assertions.assertEquals("jpgd", model.routeTable().routes().get(0).name()); - Assertions.assertEquals("xxppofm", model.routeTable().routes().get(0).addressPrefix()); - Assertions.assertEquals("x", model.routeTable().routes().get(0).nextHopIpAddress()); - Assertions.assertEquals("dglmjthjqkwp", model.ipPools().get(0).name()); - Assertions.assertEquals(IpPoolTypeEnum.VM, model.ipPools().get(0).ipPoolType()); - Assertions.assertEquals("xmqci", model.ipPools().get(0).start()); - Assertions.assertEquals("vhkhixu", model.ipPools().get(0).end()); - Assertions.assertEquals(54099605, model.vlan()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubnetPropertiesFormat model = - new SubnetPropertiesFormat() - .withAddressPrefix("ummajtjaod") - .withAddressPrefixes(Arrays.asList("nbdxk", "pxokajionp", "mexgstxgcp", "dg")) - .withIpAllocationMethod(IpAllocationMethodEnum.STATIC) - .withIpConfigurationReferences( - Arrays.asList(new SubnetPropertiesFormatIpConfigurationReferencesItem().withId("vdjwzrlovm"))) - .withRouteTable( - new RouteTable() - .withRoutes( - Arrays - .asList( - new Route().withName("jpgd").withAddressPrefix("xxppofm").withNextHopIpAddress("x"), - new Route() - .withName("dzxibqeojnxqbzvd") - .withAddressPrefix("c") - .withNextHopIpAddress("xhvpmoue"), - new Route() - .withName("f") - .withAddressPrefix("wndeicbtwnp") - .withNextHopIpAddress("oqvuhr")))) - .withIpPools( - Arrays - .asList( - new IpPool() - .withName("dglmjthjqkwp") - .withIpPoolType(IpPoolTypeEnum.VM) - .withStart("xmqci") - .withEnd("vhkhixu") - .withInfo(new IpPoolInfo()))) - .withVlan(54099605); - model = BinaryData.fromObject(model).toObject(SubnetPropertiesFormat.class); - Assertions.assertEquals("ummajtjaod", model.addressPrefix()); - Assertions.assertEquals("nbdxk", model.addressPrefixes().get(0)); - Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("vdjwzrlovm", model.ipConfigurationReferences().get(0).id()); - Assertions.assertEquals("jpgd", model.routeTable().routes().get(0).name()); - Assertions.assertEquals("xxppofm", model.routeTable().routes().get(0).addressPrefix()); - Assertions.assertEquals("x", model.routeTable().routes().get(0).nextHopIpAddress()); - Assertions.assertEquals("dglmjthjqkwp", model.ipPools().get(0).name()); - Assertions.assertEquals(IpPoolTypeEnum.VM, model.ipPools().get(0).ipPoolType()); - Assertions.assertEquals("xmqci", model.ipPools().get(0).start()); - Assertions.assertEquals("vhkhixu", model.ipPools().get(0).end()); - Assertions.assertEquals(54099605, model.vlan()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetTests.java deleted file mode 100644 index a5c21509fd3de..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/SubnetTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.IpAllocationMethodEnum; -import com.azure.resourcemanager.azurestackhci.models.IpPool; -import com.azure.resourcemanager.azurestackhci.models.IpPoolInfo; -import com.azure.resourcemanager.azurestackhci.models.IpPoolTypeEnum; -import com.azure.resourcemanager.azurestackhci.models.Route; -import com.azure.resourcemanager.azurestackhci.models.RouteTable; -import com.azure.resourcemanager.azurestackhci.models.Subnet; -import com.azure.resourcemanager.azurestackhci.models.SubnetPropertiesFormatIpConfigurationReferencesItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubnetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Subnet model = - BinaryData - .fromString( - "{\"properties\":{\"addressPrefix\":\"fidfvzw\",\"addressPrefixes\":[\"htymw\"],\"ipAllocationMethod\":\"Static\",\"ipConfigurationReferences\":[{\"ID\":\"hwxmnteiwa\"},{\"ID\":\"vkmijcmmxdcuf\"},{\"ID\":\"srp\"}],\"routeTable\":{\"etag\":\"idnsezcxtb\",\"name\":\"gfycc\",\"type\":\"ewmdw\",\"properties\":{\"routes\":[{\"properties\":{},\"name\":\"h\"},{\"properties\":{},\"name\":\"sflnrosfqp\"}]}},\"ipPools\":[{\"name\":\"zzvypyqrimzinp\",\"ipPoolType\":\"vm\",\"start\":\"dkirsoodqxhcr\",\"end\":\"ohjtckw\",\"info\":{\"used\":\"oifiyipjxsqwpgr\",\"available\":\"znorcj\"}},{\"name\":\"snb\",\"ipPoolType\":\"vm\",\"start\":\"bnmo\",\"end\":\"cyshurzafbljjgp\",\"info\":{\"used\":\"qcjm\",\"available\":\"javbqidtqajz\"}},{\"name\":\"l\",\"ipPoolType\":\"vm\",\"start\":\"jkrlkhbzhfepg\",\"end\":\"qex\",\"info\":{\"used\":\"c\",\"available\":\"c\"}}],\"vlan\":1853852705},\"name\":\"rhhbcs\"}") - .toObject(Subnet.class); - Assertions.assertEquals("rhhbcs", model.name()); - Assertions.assertEquals("fidfvzw", model.addressPrefix()); - Assertions.assertEquals("htymw", model.addressPrefixes().get(0)); - Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("hwxmnteiwa", model.ipConfigurationReferences().get(0).id()); - Assertions.assertEquals("h", model.routeTable().routes().get(0).name()); - Assertions.assertEquals("zzvypyqrimzinp", model.ipPools().get(0).name()); - Assertions.assertEquals(IpPoolTypeEnum.VM, model.ipPools().get(0).ipPoolType()); - Assertions.assertEquals("dkirsoodqxhcr", model.ipPools().get(0).start()); - Assertions.assertEquals("ohjtckw", model.ipPools().get(0).end()); - Assertions.assertEquals(1853852705, model.vlan()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Subnet model = - new Subnet() - .withName("rhhbcs") - .withAddressPrefix("fidfvzw") - .withAddressPrefixes(Arrays.asList("htymw")) - .withIpAllocationMethod(IpAllocationMethodEnum.STATIC) - .withIpConfigurationReferences( - Arrays - .asList( - new SubnetPropertiesFormatIpConfigurationReferencesItem().withId("hwxmnteiwa"), - new SubnetPropertiesFormatIpConfigurationReferencesItem().withId("vkmijcmmxdcuf"), - new SubnetPropertiesFormatIpConfigurationReferencesItem().withId("srp"))) - .withRouteTable( - new RouteTable() - .withRoutes(Arrays.asList(new Route().withName("h"), new Route().withName("sflnrosfqp")))) - .withIpPools( - Arrays - .asList( - new IpPool() - .withName("zzvypyqrimzinp") - .withIpPoolType(IpPoolTypeEnum.VM) - .withStart("dkirsoodqxhcr") - .withEnd("ohjtckw") - .withInfo(new IpPoolInfo()), - new IpPool() - .withName("snb") - .withIpPoolType(IpPoolTypeEnum.VM) - .withStart("bnmo") - .withEnd("cyshurzafbljjgp") - .withInfo(new IpPoolInfo()), - new IpPool() - .withName("l") - .withIpPoolType(IpPoolTypeEnum.VM) - .withStart("jkrlkhbzhfepg") - .withEnd("qex") - .withInfo(new IpPoolInfo()))) - .withVlan(1853852705); - model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("rhhbcs", model.name()); - Assertions.assertEquals("fidfvzw", model.addressPrefix()); - Assertions.assertEquals("htymw", model.addressPrefixes().get(0)); - Assertions.assertEquals(IpAllocationMethodEnum.STATIC, model.ipAllocationMethod()); - Assertions.assertEquals("hwxmnteiwa", model.ipConfigurationReferences().get(0).id()); - Assertions.assertEquals("h", model.routeTable().routes().get(0).name()); - Assertions.assertEquals("zzvypyqrimzinp", model.ipPools().get(0).name()); - Assertions.assertEquals(IpPoolTypeEnum.VM, model.ipPools().get(0).ipPoolType()); - Assertions.assertEquals("dkirsoodqxhcr", model.ipPools().get(0).start()); - Assertions.assertEquals("ohjtckw", model.ipPools().get(0).end()); - Assertions.assertEquals(1853852705, model.vlan()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDiskStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDiskStatusProvisioningStatusTests.java deleted file mode 100644 index f0c9aa48bd33c..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDiskStatusProvisioningStatusTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.Status; -import com.azure.resourcemanager.azurestackhci.models.VirtualHardDiskStatusProvisioningStatus; -import org.junit.jupiter.api.Assertions; - -public final class VirtualHardDiskStatusProvisioningStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualHardDiskStatusProvisioningStatus model = - BinaryData - .fromString("{\"operationId\":\"cuh\",\"status\":\"Failed\"}") - .toObject(VirtualHardDiskStatusProvisioningStatus.class); - Assertions.assertEquals("cuh", model.operationId()); - Assertions.assertEquals(Status.FAILED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualHardDiskStatusProvisioningStatus model = - new VirtualHardDiskStatusProvisioningStatus().withOperationId("cuh").withStatus(Status.FAILED); - model = BinaryData.fromObject(model).toObject(VirtualHardDiskStatusProvisioningStatus.class); - Assertions.assertEquals("cuh", model.operationId()); - Assertions.assertEquals(Status.FAILED, model.status()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksUpdateRequestTests.java deleted file mode 100644 index 561c1138d5ce7..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualHardDisksUpdateRequestTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VirtualHardDisksUpdateRequest; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualHardDisksUpdateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualHardDisksUpdateRequest model = - BinaryData - .fromString("{\"tags\":{\"vgyuguos\":\"yqiklbbovplwzb\"}}") - .toObject(VirtualHardDisksUpdateRequest.class); - Assertions.assertEquals("yqiklbbovplwzb", model.tags().get("vgyuguos")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualHardDisksUpdateRequest model = - new VirtualHardDisksUpdateRequest().withTags(mapOf("vgyuguos", "yqiklbbovplwzb")); - model = BinaryData.fromObject(model).toObject(VirtualHardDisksUpdateRequest.class); - Assertions.assertEquals("yqiklbbovplwzb", model.tags().get("vgyuguos")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfigTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfigTests.java deleted file mode 100644 index b604ba726575f..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfigTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig model = - BinaryData - .fromString( - "{\"maximumMemoryMB\":2825151831912713640,\"minimumMemoryMB\":7536256841656348248,\"targetMemoryBuffer\":492744230}") - .toObject(VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.class); - Assertions.assertEquals(2825151831912713640L, model.maximumMemoryMB()); - Assertions.assertEquals(7536256841656348248L, model.minimumMemoryMB()); - Assertions.assertEquals(492744230, model.targetMemoryBuffer()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig model = - new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() - .withMaximumMemoryMB(2825151831912713640L) - .withMinimumMemoryMB(7536256841656348248L) - .withTargetMemoryBuffer(492744230); - model = - BinaryData - .fromObject(model) - .toObject(VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig.class); - Assertions.assertEquals(2825151831912713640L, model.maximumMemoryMB()); - Assertions.assertEquals(7536256841656348248L, model.minimumMemoryMB()); - Assertions.assertEquals(492744230, model.targetMemoryBuffer()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesHardwareProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesHardwareProfileTests.java deleted file mode 100644 index b6e98911b1daf..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesHardwareProfileTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesHardwareProfile; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig; -import com.azure.resourcemanager.azurestackhci.models.VmSizeEnum; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesHardwareProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesHardwareProfile model = - BinaryData - .fromString( - "{\"vmSize\":\"Standard_DS5_v2\",\"processors\":914615331,\"memoryMB\":7495165346064567191,\"dynamicMemoryConfig\":{\"maximumMemoryMB\":2295075824007541561,\"minimumMemoryMB\":4077961902359285386,\"targetMemoryBuffer\":2096880843}}") - .toObject(VirtualMachineInstancePropertiesHardwareProfile.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_DS5_V2, model.vmSize()); - Assertions.assertEquals(914615331, model.processors()); - Assertions.assertEquals(7495165346064567191L, model.memoryMB()); - Assertions.assertEquals(2295075824007541561L, model.dynamicMemoryConfig().maximumMemoryMB()); - Assertions.assertEquals(4077961902359285386L, model.dynamicMemoryConfig().minimumMemoryMB()); - Assertions.assertEquals(2096880843, model.dynamicMemoryConfig().targetMemoryBuffer()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesHardwareProfile model = - new VirtualMachineInstancePropertiesHardwareProfile() - .withVmSize(VmSizeEnum.STANDARD_DS5_V2) - .withProcessors(914615331) - .withMemoryMB(7495165346064567191L) - .withDynamicMemoryConfig( - new VirtualMachineInstancePropertiesHardwareProfileDynamicMemoryConfig() - .withMaximumMemoryMB(2295075824007541561L) - .withMinimumMemoryMB(4077961902359285386L) - .withTargetMemoryBuffer(2096880843)); - model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesHardwareProfile.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_DS5_V2, model.vmSize()); - Assertions.assertEquals(914615331, model.processors()); - Assertions.assertEquals(7495165346064567191L, model.memoryMB()); - Assertions.assertEquals(2295075824007541561L, model.dynamicMemoryConfig().maximumMemoryMB()); - Assertions.assertEquals(4077961902359285386L, model.dynamicMemoryConfig().minimumMemoryMB()); - Assertions.assertEquals(2096880843, model.dynamicMemoryConfig().targetMemoryBuffer()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItemTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItemTests.java deleted file mode 100644 index ca185d5a52784..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItemTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem model = - BinaryData - .fromString("{\"id\":\"zq\"}") - .toObject(VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem.class); - Assertions.assertEquals("zq", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem model = - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem().withId("zq"); - model = - BinaryData - .fromObject(model) - .toObject(VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem.class); - Assertions.assertEquals("zq", model.id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesNetworkProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesNetworkProfileTests.java deleted file mode 100644 index 47c50ed270947..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesNetworkProfileTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesNetworkProfile; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesNetworkProfile model = - BinaryData - .fromString("{\"networkInterfaces\":[{\"id\":\"oqnermclfpl\"},{\"id\":\"oxuscrpabgyepsbj\"}]}") - .toObject(VirtualMachineInstancePropertiesNetworkProfile.class); - Assertions.assertEquals("oqnermclfpl", model.networkInterfaces().get(0).id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesNetworkProfile model = - new VirtualMachineInstancePropertiesNetworkProfile() - .withNetworkInterfaces( - Arrays - .asList( - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("oqnermclfpl"), - new VirtualMachineInstancePropertiesNetworkProfileNetworkInterfacesItem() - .withId("oxuscrpabgyepsbj"))); - model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesNetworkProfile.class); - Assertions.assertEquals("oqnermclfpl", model.networkInterfaces().get(0).id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesSecurityProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesSecurityProfileTests.java deleted file mode 100644 index 6218298622c82..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesSecurityProfileTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.SecurityTypes; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesSecurityProfile; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesSecurityProfileUefiSettings; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesSecurityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesSecurityProfile model = - BinaryData - .fromString( - "{\"enableTPM\":true,\"uefiSettings\":{\"secureBootEnabled\":false},\"securityType\":\"ConfidentialVM\"}") - .toObject(VirtualMachineInstancePropertiesSecurityProfile.class); - Assertions.assertEquals(true, model.enableTpm()); - Assertions.assertEquals(false, model.uefiSettings().secureBootEnabled()); - Assertions.assertEquals(SecurityTypes.CONFIDENTIAL_VM, model.securityType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesSecurityProfile model = - new VirtualMachineInstancePropertiesSecurityProfile() - .withEnableTpm(true) - .withUefiSettings( - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings().withSecureBootEnabled(false)) - .withSecurityType(SecurityTypes.CONFIDENTIAL_VM); - model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesSecurityProfile.class); - Assertions.assertEquals(true, model.enableTpm()); - Assertions.assertEquals(false, model.uefiSettings().secureBootEnabled()); - Assertions.assertEquals(SecurityTypes.CONFIDENTIAL_VM, model.securityType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTests.java deleted file mode 100644 index 33d7ae7d5c315..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesSecurityProfileUefiSettings; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesSecurityProfileUefiSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesSecurityProfileUefiSettings model = - BinaryData - .fromString("{\"secureBootEnabled\":true}") - .toObject(VirtualMachineInstancePropertiesSecurityProfileUefiSettings.class); - Assertions.assertEquals(true, model.secureBootEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesSecurityProfileUefiSettings model = - new VirtualMachineInstancePropertiesSecurityProfileUefiSettings().withSecureBootEnabled(true); - model = - BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesSecurityProfileUefiSettings.class); - Assertions.assertEquals(true, model.secureBootEnabled()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileDataDisksItemTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileDataDisksItemTests.java deleted file mode 100644 index 347f240f18613..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileDataDisksItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesStorageProfileDataDisksItem; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesStorageProfileDataDisksItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesStorageProfileDataDisksItem model = - BinaryData - .fromString("{\"id\":\"adm\"}") - .toObject(VirtualMachineInstancePropertiesStorageProfileDataDisksItem.class); - Assertions.assertEquals("adm", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesStorageProfileDataDisksItem model = - new VirtualMachineInstancePropertiesStorageProfileDataDisksItem().withId("adm"); - model = - BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesStorageProfileDataDisksItem.class); - Assertions.assertEquals("adm", model.id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileImageReferenceTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileImageReferenceTests.java deleted file mode 100644 index 712e59ed24495..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileImageReferenceTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesStorageProfileImageReference; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesStorageProfileImageReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesStorageProfileImageReference model = - BinaryData - .fromString("{\"id\":\"rcrgvx\"}") - .toObject(VirtualMachineInstancePropertiesStorageProfileImageReference.class); - Assertions.assertEquals("rcrgvx", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesStorageProfileImageReference model = - new VirtualMachineInstancePropertiesStorageProfileImageReference().withId("rcrgvx"); - model = - BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesStorageProfileImageReference.class); - Assertions.assertEquals("rcrgvx", model.id()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileOsDiskTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileOsDiskTests.java deleted file mode 100644 index bdaa3e83ac304..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileOsDiskTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesStorageProfileOsDisk; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesStorageProfileOsDiskTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesStorageProfileOsDisk model = - BinaryData - .fromString("{\"id\":\"gomz\",\"osType\":\"Windows\"}") - .toObject(VirtualMachineInstancePropertiesStorageProfileOsDisk.class); - Assertions.assertEquals("gomz", model.id()); - Assertions.assertEquals(OperatingSystemTypes.WINDOWS, model.osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesStorageProfileOsDisk model = - new VirtualMachineInstancePropertiesStorageProfileOsDisk() - .withId("gomz") - .withOsType(OperatingSystemTypes.WINDOWS); - model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesStorageProfileOsDisk.class); - Assertions.assertEquals("gomz", model.id()); - Assertions.assertEquals(OperatingSystemTypes.WINDOWS, model.osType()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileTests.java deleted file mode 100644 index 1be2323028a09..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstancePropertiesStorageProfileTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.OperatingSystemTypes; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesStorageProfile; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesStorageProfileDataDisksItem; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesStorageProfileImageReference; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstancePropertiesStorageProfileOsDisk; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstancePropertiesStorageProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstancePropertiesStorageProfile model = - BinaryData - .fromString( - "{\"dataDisks\":[{\"id\":\"uzbpzkafku\"},{\"id\":\"crnwbmeh\"},{\"id\":\"eyvjusrtslhspkde\"},{\"id\":\"aofmxagkvtme\"}],\"imageReference\":{\"id\":\"krh\"},\"osDisk\":{\"id\":\"ljuahaquhcdh\",\"osType\":\"Linux\"},\"vmConfigStoragePathId\":\"laexqp\"}") - .toObject(VirtualMachineInstancePropertiesStorageProfile.class); - Assertions.assertEquals("uzbpzkafku", model.dataDisks().get(0).id()); - Assertions.assertEquals("krh", model.imageReference().id()); - Assertions.assertEquals("ljuahaquhcdh", model.osDisk().id()); - Assertions.assertEquals(OperatingSystemTypes.LINUX, model.osDisk().osType()); - Assertions.assertEquals("laexqp", model.vmConfigStoragePathId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstancePropertiesStorageProfile model = - new VirtualMachineInstancePropertiesStorageProfile() - .withDataDisks( - Arrays - .asList( - new VirtualMachineInstancePropertiesStorageProfileDataDisksItem().withId("uzbpzkafku"), - new VirtualMachineInstancePropertiesStorageProfileDataDisksItem().withId("crnwbmeh"), - new VirtualMachineInstancePropertiesStorageProfileDataDisksItem() - .withId("eyvjusrtslhspkde"), - new VirtualMachineInstancePropertiesStorageProfileDataDisksItem().withId("aofmxagkvtme"))) - .withImageReference(new VirtualMachineInstancePropertiesStorageProfileImageReference().withId("krh")) - .withOsDisk( - new VirtualMachineInstancePropertiesStorageProfileOsDisk() - .withId("ljuahaquhcdh") - .withOsType(OperatingSystemTypes.LINUX)) - .withVmConfigStoragePathId("laexqp"); - model = BinaryData.fromObject(model).toObject(VirtualMachineInstancePropertiesStorageProfile.class); - Assertions.assertEquals("uzbpzkafku", model.dataDisks().get(0).id()); - Assertions.assertEquals("krh", model.imageReference().id()); - Assertions.assertEquals("ljuahaquhcdh", model.osDisk().id()); - Assertions.assertEquals(OperatingSystemTypes.LINUX, model.osDisk().osType()); - Assertions.assertEquals("laexqp", model.vmConfigStoragePathId()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceStatusProvisioningStatusTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceStatusProvisioningStatusTests.java deleted file mode 100644 index 826a7bb003428..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceStatusProvisioningStatusTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.Status; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceStatusProvisioningStatus; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstanceStatusProvisioningStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstanceStatusProvisioningStatus model = - BinaryData - .fromString("{\"operationId\":\"wgxhn\",\"status\":\"Succeeded\"}") - .toObject(VirtualMachineInstanceStatusProvisioningStatus.class); - Assertions.assertEquals("wgxhn", model.operationId()); - Assertions.assertEquals(Status.SUCCEEDED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstanceStatusProvisioningStatus model = - new VirtualMachineInstanceStatusProvisioningStatus().withOperationId("wgxhn").withStatus(Status.SUCCEEDED); - model = BinaryData.fromObject(model).toObject(VirtualMachineInstanceStatusProvisioningStatus.class); - Assertions.assertEquals("wgxhn", model.operationId()); - Assertions.assertEquals(Status.SUCCEEDED, model.status()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceUpdatePropertiesTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceUpdatePropertiesTests.java deleted file mode 100644 index aee25e92da903..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceUpdatePropertiesTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.HardwareProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.NetworkProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.NetworkProfileUpdateNetworkInterfacesItem; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdateLinuxConfiguration; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdateWindowsConfiguration; -import com.azure.resourcemanager.azurestackhci.models.StorageProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.StorageProfileUpdateDataDisksItem; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpdateProperties; -import com.azure.resourcemanager.azurestackhci.models.VmSizeEnum; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstanceUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstanceUpdateProperties model = - BinaryData - .fromString( - "{\"hardwareProfile\":{\"vmSize\":\"Standard_NV12\",\"processors\":724820131,\"memoryMB\":4284842638181152780},\"storageProfile\":{\"dataDisks\":[{\"id\":\"cqibycnojv\"},{\"id\":\"mefqsgzvahapjyzh\"}]},\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"cjrvxdjzlmwlxkv\"},{\"id\":\"fhzovawjvzunluth\"},{\"id\":\"prnxipeil\"}]},\"osProfile\":{\"computerName\":\"uaejxdultsk\",\"linuxConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":true},\"windowsConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":false}}}") - .toObject(VirtualMachineInstanceUpdateProperties.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_NV12, model.hardwareProfile().vmSize()); - Assertions.assertEquals(724820131, model.hardwareProfile().processors()); - Assertions.assertEquals(4284842638181152780L, model.hardwareProfile().memoryMB()); - Assertions.assertEquals("cqibycnojv", model.storageProfile().dataDisks().get(0).id()); - Assertions.assertEquals("cjrvxdjzlmwlxkv", model.networkProfile().networkInterfaces().get(0).id()); - Assertions.assertEquals("uaejxdultsk", model.osProfile().computerName()); - Assertions.assertEquals(true, model.osProfile().linuxConfiguration().provisionVMAgent()); - Assertions.assertEquals(true, model.osProfile().linuxConfiguration().provisionVMConfigAgent()); - Assertions.assertEquals(true, model.osProfile().windowsConfiguration().provisionVMAgent()); - Assertions.assertEquals(false, model.osProfile().windowsConfiguration().provisionVMConfigAgent()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstanceUpdateProperties model = - new VirtualMachineInstanceUpdateProperties() - .withHardwareProfile( - new HardwareProfileUpdate() - .withVmSize(VmSizeEnum.STANDARD_NV12) - .withProcessors(724820131) - .withMemoryMB(4284842638181152780L)) - .withStorageProfile( - new StorageProfileUpdate() - .withDataDisks( - Arrays - .asList( - new StorageProfileUpdateDataDisksItem().withId("cqibycnojv"), - new StorageProfileUpdateDataDisksItem().withId("mefqsgzvahapjyzh")))) - .withNetworkProfile( - new NetworkProfileUpdate() - .withNetworkInterfaces( - Arrays - .asList( - new NetworkProfileUpdateNetworkInterfacesItem().withId("cjrvxdjzlmwlxkv"), - new NetworkProfileUpdateNetworkInterfacesItem().withId("fhzovawjvzunluth"), - new NetworkProfileUpdateNetworkInterfacesItem().withId("prnxipeil")))) - .withOsProfile( - new OsProfileUpdate() - .withComputerName("uaejxdultsk") - .withLinuxConfiguration( - new OsProfileUpdateLinuxConfiguration() - .withProvisionVMAgent(true) - .withProvisionVMConfigAgent(true)) - .withWindowsConfiguration( - new OsProfileUpdateWindowsConfiguration() - .withProvisionVMAgent(true) - .withProvisionVMConfigAgent(false))); - model = BinaryData.fromObject(model).toObject(VirtualMachineInstanceUpdateProperties.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_NV12, model.hardwareProfile().vmSize()); - Assertions.assertEquals(724820131, model.hardwareProfile().processors()); - Assertions.assertEquals(4284842638181152780L, model.hardwareProfile().memoryMB()); - Assertions.assertEquals("cqibycnojv", model.storageProfile().dataDisks().get(0).id()); - Assertions.assertEquals("cjrvxdjzlmwlxkv", model.networkProfile().networkInterfaces().get(0).id()); - Assertions.assertEquals("uaejxdultsk", model.osProfile().computerName()); - Assertions.assertEquals(true, model.osProfile().linuxConfiguration().provisionVMAgent()); - Assertions.assertEquals(true, model.osProfile().linuxConfiguration().provisionVMConfigAgent()); - Assertions.assertEquals(true, model.osProfile().windowsConfiguration().provisionVMAgent()); - Assertions.assertEquals(false, model.osProfile().windowsConfiguration().provisionVMConfigAgent()); - } -} diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceUpdateRequestTests.java b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceUpdateRequestTests.java deleted file mode 100644 index 459ade25ed461..0000000000000 --- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/src/test/java/com/azure/resourcemanager/azurestackhci/generated/VirtualMachineInstanceUpdateRequestTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.azurestackhci.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.azurestackhci.models.HardwareProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.Identity; -import com.azure.resourcemanager.azurestackhci.models.NetworkProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.NetworkProfileUpdateNetworkInterfacesItem; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdateLinuxConfiguration; -import com.azure.resourcemanager.azurestackhci.models.OsProfileUpdateWindowsConfiguration; -import com.azure.resourcemanager.azurestackhci.models.ResourceIdentityType; -import com.azure.resourcemanager.azurestackhci.models.StorageProfileUpdate; -import com.azure.resourcemanager.azurestackhci.models.StorageProfileUpdateDataDisksItem; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpdateProperties; -import com.azure.resourcemanager.azurestackhci.models.VirtualMachineInstanceUpdateRequest; -import com.azure.resourcemanager.azurestackhci.models.VmSizeEnum; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInstanceUpdateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInstanceUpdateRequest model = - BinaryData - .fromString( - "{\"properties\":{\"hardwareProfile\":{\"vmSize\":\"Standard_NV6\",\"processors\":97995700,\"memoryMB\":4253810910381406422},\"storageProfile\":{\"dataDisks\":[{\"id\":\"hfxobbcswsrtj\"}]},\"networkProfile\":{\"networkInterfaces\":[{\"id\":\"bpbewtghfgb\"},{\"id\":\"gw\"},{\"id\":\"vlvqhjkbegi\"},{\"id\":\"nmxiebwwaloayqc\"}]},\"osProfile\":{\"computerName\":\"tzjuzgwyzmhtxo\",\"linuxConfiguration\":{\"provisionVMAgent\":false,\"provisionVMConfigAgent\":false},\"windowsConfiguration\":{\"provisionVMAgent\":true,\"provisionVMConfigAgent\":false}}},\"identity\":{\"principalId\":\"qpsrknftguvri\",\"tenantId\":\"prwmdyvxqt\",\"type\":\"SystemAssigned\"}}") - .toObject(VirtualMachineInstanceUpdateRequest.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_NV6, model.properties().hardwareProfile().vmSize()); - Assertions.assertEquals(97995700, model.properties().hardwareProfile().processors()); - Assertions.assertEquals(4253810910381406422L, model.properties().hardwareProfile().memoryMB()); - Assertions.assertEquals("hfxobbcswsrtj", model.properties().storageProfile().dataDisks().get(0).id()); - Assertions.assertEquals("bpbewtghfgb", model.properties().networkProfile().networkInterfaces().get(0).id()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.properties().osProfile().computerName()); - Assertions.assertEquals(false, model.properties().osProfile().linuxConfiguration().provisionVMAgent()); - Assertions.assertEquals(false, model.properties().osProfile().linuxConfiguration().provisionVMConfigAgent()); - Assertions.assertEquals(true, model.properties().osProfile().windowsConfiguration().provisionVMAgent()); - Assertions.assertEquals(false, model.properties().osProfile().windowsConfiguration().provisionVMConfigAgent()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInstanceUpdateRequest model = - new VirtualMachineInstanceUpdateRequest() - .withProperties( - new VirtualMachineInstanceUpdateProperties() - .withHardwareProfile( - new HardwareProfileUpdate() - .withVmSize(VmSizeEnum.STANDARD_NV6) - .withProcessors(97995700) - .withMemoryMB(4253810910381406422L)) - .withStorageProfile( - new StorageProfileUpdate() - .withDataDisks( - Arrays.asList(new StorageProfileUpdateDataDisksItem().withId("hfxobbcswsrtj")))) - .withNetworkProfile( - new NetworkProfileUpdate() - .withNetworkInterfaces( - Arrays - .asList( - new NetworkProfileUpdateNetworkInterfacesItem().withId("bpbewtghfgb"), - new NetworkProfileUpdateNetworkInterfacesItem().withId("gw"), - new NetworkProfileUpdateNetworkInterfacesItem().withId("vlvqhjkbegi"), - new NetworkProfileUpdateNetworkInterfacesItem().withId("nmxiebwwaloayqc")))) - .withOsProfile( - new OsProfileUpdate() - .withComputerName("tzjuzgwyzmhtxo") - .withLinuxConfiguration( - new OsProfileUpdateLinuxConfiguration() - .withProvisionVMAgent(false) - .withProvisionVMConfigAgent(false)) - .withWindowsConfiguration( - new OsProfileUpdateWindowsConfiguration() - .withProvisionVMAgent(true) - .withProvisionVMConfigAgent(false)))) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)); - model = BinaryData.fromObject(model).toObject(VirtualMachineInstanceUpdateRequest.class); - Assertions.assertEquals(VmSizeEnum.STANDARD_NV6, model.properties().hardwareProfile().vmSize()); - Assertions.assertEquals(97995700, model.properties().hardwareProfile().processors()); - Assertions.assertEquals(4253810910381406422L, model.properties().hardwareProfile().memoryMB()); - Assertions.assertEquals("hfxobbcswsrtj", model.properties().storageProfile().dataDisks().get(0).id()); - Assertions.assertEquals("bpbewtghfgb", model.properties().networkProfile().networkInterfaces().get(0).id()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.properties().osProfile().computerName()); - Assertions.assertEquals(false, model.properties().osProfile().linuxConfiguration().provisionVMAgent()); - Assertions.assertEquals(false, model.properties().osProfile().linuxConfiguration().provisionVMConfigAgent()); - Assertions.assertEquals(true, model.properties().osProfile().windowsConfiguration().provisionVMAgent()); - Assertions.assertEquals(false, model.properties().osProfile().windowsConfiguration().provisionVMConfigAgent()); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } -}