diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/CHANGELOG.md b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/CHANGELOG.md index c81c7232d255..31513367fb80 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/CHANGELOG.md +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/CHANGELOG.md @@ -1,14 +1,347 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2026-07-29) -### Features Added +- Azure Resource Manager Pure Storage Block client library for Java. This package contains Microsoft Azure SDK for Pure Storage Block Management SDK. Package api-version 2026-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.AvsVmVolumeUpdateProperties` was modified + +* `validate()` was removed + +#### `models.ReservationUpdate` was modified + +* `validate()` was removed + +#### `models.ManagedServiceIdentity` was modified + +* `validate()` was removed + +#### `models.RangeLimits` was modified + +* `validate()` was removed + +#### `models.AvsDiskDetails` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `validate()` was removed + +#### `models.PerformancePolicyLimits` was modified + +* `validate()` was removed + +#### `models.HealthDetails` was modified + +* `validate()` was removed + +#### `models.VolumeProperties` was modified + +* `validate()` was removed + +#### `models.AvsStorageContainerProperties` was modified + +* `validate()` was removed + +#### `models.AzureVmwareService` was modified + +* `validate()` was removed + +#### `models.UserAssignedIdentity` was modified + +* `validate()` was removed + +#### `models.Address` was modified + +* `validate()` was removed + +#### `models.AvsVmProperties` was modified + +* `validate()` was removed + +#### `models.MarketplaceDetails` was modified + +* `validate()` was removed + +#### `models.CompanyDetails` was modified + +* `validate()` was removed + +#### `models.StoragePoolUpdate` was modified + +* `validate()` was removed + +#### `models.AvsVmDetails` was modified + +* `validate()` was removed + +#### `models.BillingUsageProperty` was modified + +* `validate()` was removed + +#### `models.ReservationPropertiesBaseResourceProperties` was modified + +* `validate()` was removed + +#### `models.OfferDetails` was modified + +* `validate()` was removed + +#### `models.SoftDeletion` was modified + +* `validate()` was removed + +#### `models.StoragePoolFinalizeAvsConnectionPost` was modified + +* `validate()` was removed + +#### `models.StoragePoolUpdateProperties` was modified + +* `validate()` was removed + +#### `models.StoragePoolEnableAvsConnectionPost` was modified + +* `validate()` was removed + +#### `models.AvsStorageContainerVolumeUpdate` was modified + +* `validate()` was removed + +#### `models.ServiceInitializationHandle` was modified + +* `validate()` was removed + +#### `models.AvsVmVolumeUpdate` was modified + +* `validate()` was removed + +#### `models.IopsUsage` was modified + +* `validate()` was removed + +#### `models.ReservationUpdateProperties` was modified + +* `validate()` was removed + +#### `models.AvsVmUpdate` was modified + +* `validate()` was removed + +#### `models.Space` was modified + +* `validate()` was removed + +#### `models.UserDetails` was modified + +* `validate()` was removed + +#### `models.VolumeLimits` was modified + +* `validate()` was removed + +#### `models.AvsStorageContainerVolumeUpdateProperties` was modified + +* `validate()` was removed + +#### `models.Alert` was modified + +* `validate()` was removed + +#### `models.StoragePoolLimits` was modified + +* `validate()` was removed + +#### `models.AvsVmUpdateProperties` was modified + +* `validate()` was removed + +#### `models.ProtectionPolicyLimits` was modified + +* `validate()` was removed + +#### `models.ServiceInitializationInfo` was modified + +* `validate()` was removed + +#### `models.BandwidthUsage` was modified + +* `validate()` was removed + +#### `models.StoragePoolProperties` was modified + +* `validate()` was removed + +#### `models.VnetInjection` was modified + +* `validate()` was removed + +### Features Added + +* `models.VolumeGroup$UpdateStages` was added + +* `models.SaaSResourceDetailsResponse` was added + +* `models.VolumeGroupSnapshotProperties` was added + +* `models.ProtectionParameters` was added + +* `models.LinkSaaSRequest` was added + +* `models.RecoverableVolumeGroups` was added + +* `models.PlatformConsoleActivationCode` was added + +* `models.VolumeGroupSnapshots` was added + +* `models.VolumeGroupSnapshot$Definition` was added + +* `models.SshPlatformConsoleAuthConfig` was added + +* `models.RecoverableVolumeGroupProperties` was added + +* `models.VolumeGroups` was added + +* `models.VolumeGroup$Definition` was added + +* `models.IscsiConnectionParameters` was added + +* `models.VolumeGroupProperties` was added + +* `models.Volume$Definition` was added + +* `models.PlatformConsoleSubnet` was added + +* `models.VolumeGroup$DefinitionStages` was added + +* `models.VolumeGroupSnapshotListRequest` was added + +* `models.PlatformConsoleAuthResult` was added + +* `models.VolumeGroupSnapshotPostListResult` was added + +* `models.SshPlatformConsoleAuthResult` was added + +* `models.VolumeGroupSnapshot$DefinitionStages` was added + +* `models.VolumeSourceType` was added + +* `models.VolumeOverwriteRequest` was added + +* `models.VolumeGroupOverwriteRequest` was added + +* `models.LatestLinkedSaaSResponse` was added + +* `models.RecoverableVolumeGroup` was added + +* `models.VolumeUpdate` was added + +* `models.DestroyedStateProperties` was added + +* `models.PlatformConsoleRole` was added + +* `models.PerformanceParameters` was added + +* `models.VolumeGroupSourceType` was added + +* `models.VolumeSnapshotSource` was added + +* `models.Volume$Update` was added + +* `models.VolumeSnapshotInfo` was added + +* `models.PlatformConsoleAccessSettings` was added + +* `models.Volume$UpdateStages` was added + +* `models.PlatformConsoleSettings` was added + +* `models.PlatformConsoleAuthConfig` was added + +* `models.ActivateSaaSRequest` was added + +* `models.VolumeGroup$Update` was added + +* `models.ConnectionParametersResponse` was added + +* `models.SaaSOperationGroups` was added + +* `models.Volume$DefinitionStages` was added + +* `models.VolumeGroupUpdate` was added + +* `models.Volume` was added + +* `models.AzureVolumeProperties` was added + +* `models.VolumeGroupSnapshot` was added + +* `models.VolumeGroupUpdateProperties` was added + +* `models.VolumeUpdateProperties` was added + +* `models.PlatformConsoleAuthType` was added + +* `models.IscsiEndpoint` was added + +* `models.VolumeGroup` was added + +* `models.VolumeGroupStatus` was added + +* `models.Volumes` was added + +#### `models.StoragePool` was modified + +* `configurePlatformConsoleAuthWithResponse(models.PlatformConsoleAuthConfig,com.azure.core.util.Context)` was added +* `listPlatformConsoleActivationCode()` was added +* `listPlatformConsoleActivationCodeWithResponse(com.azure.core.util.Context)` was added +* `configurePlatformConsoleAuth(models.PlatformConsoleAuthConfig)` was added + +#### `models.MarketplaceDetails` was modified + +* `saaSResourceId()` was added +* `withSaaSResourceId(java.lang.String)` was added + +#### `models.StoragePoolUpdateProperties` was modified + +* `platformConsoleSettings()` was added +* `withPlatformConsoleSettings(models.PlatformConsoleSettings)` was added + +#### `PureStorageBlockManager` was modified + +* `volumeGroupSnapshots()` was added +* `recoverableVolumeGroups()` was added +* `volumeGroups()` was added +* `volumes()` was added +* `saaSOperationGroups()` was added + +#### `models.Reservations` was modified + +* `latestLinkedSaaSWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `linkSaaS(java.lang.String,java.lang.String,models.LinkSaaSRequest,com.azure.core.util.Context)` was added +* `latestLinkedSaaS(java.lang.String,java.lang.String)` was added +* `linkSaaS(java.lang.String,java.lang.String,models.LinkSaaSRequest)` was added + +#### `models.Reservation` was modified + +* `linkSaaS(models.LinkSaaSRequest)` was added +* `linkSaaS(models.LinkSaaSRequest,com.azure.core.util.Context)` was added +* `latestLinkedSaaSWithResponse(com.azure.core.util.Context)` was added +* `latestLinkedSaaS()` was added + +#### `models.StoragePools` was modified + +* `configurePlatformConsoleAuthWithResponse(java.lang.String,java.lang.String,models.PlatformConsoleAuthConfig,com.azure.core.util.Context)` was added +* `configurePlatformConsoleAuth(java.lang.String,java.lang.String,models.PlatformConsoleAuthConfig)` was added +* `listPlatformConsoleActivationCode(java.lang.String,java.lang.String)` was added +* `listPlatformConsoleActivationCodeWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.StoragePoolProperties` was modified -### Other Changes +* `platformConsoleSettings()` was added +* `withPlatformConsoleSettings(models.PlatformConsoleSettings)` was added ## 1.0.0 (2025-06-30) diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/README.md b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/README.md index 86c5fe73d19c..ed27c33c37bd 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/README.md +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Pure Storage Block client library for Java. -This package contains Microsoft Azure SDK for Pure Storage Block Management SDK. Package api-version 2024-11-01. 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 Pure Storage Block Management SDK. Package api-version 2026-05-01-preview. 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-purestorageblock - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/SAMPLE.md b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/SAMPLE.md index 4cda39e76df9..8dd5d8eb0d9c 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/SAMPLE.md +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/SAMPLE.md @@ -32,14 +32,33 @@ - [List](#operations_list) +## RecoverableVolumeGroups + +- [Delete](#recoverablevolumegroups_delete) +- [Get](#recoverablevolumegroups_get) +- [ListByStoragePool](#recoverablevolumegroups_listbystoragepool) + ## Reservations +- [Create](#reservations_create) +- [Delete](#reservations_delete) - [GetBillingReport](#reservations_getbillingreport) - [GetBillingStatus](#reservations_getbillingstatus) +- [GetByResourceGroup](#reservations_getbyresourcegroup) - [GetResourceLimits](#reservations_getresourcelimits) +- [LatestLinkedSaaS](#reservations_latestlinkedsaas) +- [LinkSaaS](#reservations_linksaas) +- [List](#reservations_list) +- [ListByResourceGroup](#reservations_listbyresourcegroup) +- [Update](#reservations_update) + +## SaaSOperationGroup + +- [ActivateResource](#saasoperationgroup_activateresource) ## StoragePools +- [ConfigurePlatformConsoleAuth](#storagepools_configureplatformconsoleauth) - [Create](#storagepools_create) - [Delete](#storagepools_delete) - [DisableAvsConnection](#storagepools_disableavsconnection) @@ -51,8 +70,37 @@ - [GetHealthStatus](#storagepools_gethealthstatus) - [List](#storagepools_list) - [ListByResourceGroup](#storagepools_listbyresourcegroup) +- [ListPlatformConsoleActivationCode](#storagepools_listplatformconsoleactivationcode) - [RepairAvsConnection](#storagepools_repairavsconnection) - [Update](#storagepools_update) + +## VolumeGroupSnapshots + +- [Create](#volumegroupsnapshots_create) +- [Delete](#volumegroupsnapshots_delete) +- [Get](#volumegroupsnapshots_get) +- [ListByVolumeGroup](#volumegroupsnapshots_listbyvolumegroup) +- [ListSnapshots](#volumegroupsnapshots_listsnapshots) + +## VolumeGroups + +- [Create](#volumegroups_create) +- [Delete](#volumegroups_delete) +- [Get](#volumegroups_get) +- [GetStatus](#volumegroups_getstatus) +- [ListByStoragePool](#volumegroups_listbystoragepool) +- [ListConnectionParameters](#volumegroups_listconnectionparameters) +- [Overwrite](#volumegroups_overwrite) +- [Update](#volumegroups_update) + +## Volumes + +- [Create](#volumes_create) +- [Delete](#volumes_delete) +- [Get](#volumes_get) +- [ListByVolumeGroup](#volumes_listbyvolumegroup) +- [Overwrite](#volumes_overwrite) +- [Update](#volumes_update) ### AvsStorageContainerVolumes_Delete ```java @@ -61,7 +109,7 @@ */ public final class AvsStorageContainerVolumesDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainerVolumes_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Delete. @@ -71,7 +119,8 @@ public final class AvsStorageContainerVolumesDeleteSamples { public static void avsStorageContainerVolumesDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainerVolumes() - .delete("rgpurestorage", "storagePoolname", "name", "cbdec-ddbb", com.azure.core.util.Context.NONE); + .delete("rgpurestorage", "storagepool-01", "container-01", "a1b2c3d4-e5f6", + com.azure.core.util.Context.NONE); } } ``` @@ -84,7 +133,7 @@ public final class AvsStorageContainerVolumesDeleteSamples { */ public final class AvsStorageContainerVolumesGetSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Get. @@ -94,7 +143,7 @@ public final class AvsStorageContainerVolumesGetSamples { public static void avsStorageContainerVolumesGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainerVolumes() - .getWithResponse("rgpurestorage", "storagePoolname", "name", "cbdec-ddbb", + .getWithResponse("rgpurestorage", "storagepool-01", "container-01", "a1b2c3d4-e5f6", com.azure.core.util.Context.NONE); } } @@ -108,7 +157,7 @@ public final class AvsStorageContainerVolumesGetSamples { */ public final class AvsStorageContainerVolumesListByAvsStorageContainerSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_ListByAvsStorageContainer_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainerVolumes_ListByAvsStorageContainer_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_ListByAvsStorageContainer. @@ -118,7 +167,8 @@ public final class AvsStorageContainerVolumesListByAvsStorageContainerSamples { public static void avsStorageContainerVolumesListByAvsStorageContainer( com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainerVolumes() - .listByAvsStorageContainer("rgpurestorage", "storagePoolname", "name", com.azure.core.util.Context.NONE); + .listByAvsStorageContainer("rgpurestorage", "storagepool-01", "container-01", + com.azure.core.util.Context.NONE); } } ``` @@ -135,7 +185,7 @@ import com.azure.resourcemanager.purestorageblock.models.SoftDeletion; */ public final class AvsStorageContainerVolumesUpdateSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainerVolumes_Update_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Update. @@ -145,7 +195,7 @@ public final class AvsStorageContainerVolumesUpdateSamples { public static void avsStorageContainerVolumesUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainerVolumes() - .update("rgpurestorage", "storagePoolname", "name", "cbdec-ddbb", + .update("rgpurestorage", "storagepool-01", "container-01", "a1b2c3d4-e5f6", new AvsStorageContainerVolumeUpdate().withProperties(new AvsStorageContainerVolumeUpdateProperties() .withSoftDeletion(new SoftDeletion().withDestroyed(true))), com.azure.core.util.Context.NONE); @@ -161,7 +211,7 @@ public final class AvsStorageContainerVolumesUpdateSamples { */ public final class AvsStorageContainersDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainers_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_Delete. @@ -171,7 +221,7 @@ public final class AvsStorageContainersDeleteSamples { public static void avsStorageContainersDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainers() - .delete("rgpurestorage", "storagePoolName", "storageContainerName", com.azure.core.util.Context.NONE); + .delete("rgpurestorage", "storagepool-01", "container-01", com.azure.core.util.Context.NONE); } } ``` @@ -184,7 +234,7 @@ public final class AvsStorageContainersDeleteSamples { */ public final class AvsStorageContainersGetSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_Get. @@ -194,8 +244,7 @@ public final class AvsStorageContainersGetSamples { public static void avsStorageContainersGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainers() - .getWithResponse("rgpurestorage", "storagePoolName", "storageContainerName", - com.azure.core.util.Context.NONE); + .getWithResponse("rgpurestorage", "storagepool-01", "container-01", com.azure.core.util.Context.NONE); } } ``` @@ -208,7 +257,7 @@ public final class AvsStorageContainersGetSamples { */ public final class AvsStorageContainersListByStoragePoolSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainers_ListByStoragePool_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainers_ListByStoragePool_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_ListByStoragePool. @@ -230,7 +279,7 @@ public final class AvsStorageContainersListByStoragePoolSamples { */ public final class AvsVmVolumesDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsVmVolumes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVmVolumes_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Delete. @@ -239,7 +288,8 @@ public final class AvsVmVolumesDeleteSamples { */ public static void avsVmVolumesDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVmVolumes() - .delete("rgpurestorage", "storagePoolname", "cbdec-ddbb", "cbdec-ddbb", com.azure.core.util.Context.NONE); + .delete("rgpurestorage", "storagepool-01", "abc123def456", "a1b2c3d4-e5f6", + com.azure.core.util.Context.NONE); } } ``` @@ -252,7 +302,7 @@ public final class AvsVmVolumesDeleteSamples { */ public final class AvsVmVolumesGetSamples { /* - * x-ms-original-file: 2024-11-01/AvsVmVolumes_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Get. @@ -261,7 +311,7 @@ public final class AvsVmVolumesGetSamples { */ public static void avsVmVolumesGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVmVolumes() - .getWithResponse("rgpurestorage", "storagePoolname", "cbdec-ddbb", "cbdec-ddbb", + .getWithResponse("rgpurestorage", "storagepool-01", "abc123def456", "a1b2c3d4-e5f6", com.azure.core.util.Context.NONE); } } @@ -275,7 +325,7 @@ public final class AvsVmVolumesGetSamples { */ public final class AvsVmVolumesListByAvsVmSamples { /* - * x-ms-original-file: 2024-11-01/AvsVmVolumes_ListByAvsVm_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVmVolumes_ListByAvsVm_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_ListByAvsVm. @@ -285,7 +335,7 @@ public final class AvsVmVolumesListByAvsVmSamples { public static void avsVmVolumesListByAvsVm(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVmVolumes() - .listByAvsVm("rgpurestorage", "storagePoolname", "cbdec-ddbb", com.azure.core.util.Context.NONE); + .listByAvsVm("rgpurestorage", "storagepool-01", "abc123def456", com.azure.core.util.Context.NONE); } } ``` @@ -302,7 +352,7 @@ import com.azure.resourcemanager.purestorageblock.models.SoftDeletion; */ public final class AvsVmVolumesUpdateSamples { /* - * x-ms-original-file: 2024-11-01/AvsVmVolumes_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVmVolumes_Update_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Update. @@ -311,7 +361,7 @@ public final class AvsVmVolumesUpdateSamples { */ public static void avsVmVolumesUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVmVolumes() - .update("rgpurestorage", "storagePoolname", "cbdec-ddbb", "cbdec-ddbb", + .update("rgpurestorage", "storagepool-01", "abc123def456", "a1b2c3d4-e5f6", new AvsVmVolumeUpdate().withProperties( new AvsVmVolumeUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(true))), com.azure.core.util.Context.NONE); @@ -327,7 +377,7 @@ public final class AvsVmVolumesUpdateSamples { */ public final class AvsVmsDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsVms_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVms_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Delete. @@ -335,7 +385,7 @@ public final class AvsVmsDeleteSamples { * @param manager Entry point to PureStorageBlockManager. */ public static void avsVmsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { - manager.avsVms().delete("rgpurestorage", "storagePoolname", "cbdec-ddbb", com.azure.core.util.Context.NONE); + manager.avsVms().delete("rgpurestorage", "storagepool-01", "abc123def456", com.azure.core.util.Context.NONE); } } ``` @@ -348,7 +398,7 @@ public final class AvsVmsDeleteSamples { */ public final class AvsVmsGetSamples { /* - * x-ms-original-file: 2024-11-01/AvsVms_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVms_Get_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Get. @@ -357,7 +407,7 @@ public final class AvsVmsGetSamples { */ public static void avsVmsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVms() - .getWithResponse("rgpurestorage", "storagePoolname", "cbdec-ddbb", com.azure.core.util.Context.NONE); + .getWithResponse("rgpurestorage", "storagepool-01", "abc123def456", com.azure.core.util.Context.NONE); } } ``` @@ -370,7 +420,7 @@ public final class AvsVmsGetSamples { */ public final class AvsVmsListByStoragePoolSamples { /* - * x-ms-original-file: 2024-11-01/AvsVms_ListByStoragePool_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVms_ListByStoragePool_MaximumSet_Gen.json */ /** * Sample code: AvsVms_ListByStoragePool. @@ -379,7 +429,7 @@ public final class AvsVmsListByStoragePoolSamples { */ public static void avsVmsListByStoragePool(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { - manager.avsVms().listByStoragePool("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + manager.avsVms().listByStoragePool("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } ``` @@ -396,7 +446,7 @@ import com.azure.resourcemanager.purestorageblock.models.SoftDeletion; */ public final class AvsVmsUpdateSamples { /* - * x-ms-original-file: 2024-11-01/AvsVms_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVms_Update_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Update. @@ -405,7 +455,7 @@ public final class AvsVmsUpdateSamples { */ public static void avsVmsUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVms() - .update("rgpurestorage", "storagePoolname", "cbdec-ddbb", + .update("rgpurestorage", "storagepool-01", "abc123def456", new AvsVmUpdate().withProperties( new AvsVmUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(true))), com.azure.core.util.Context.NONE); @@ -421,7 +471,7 @@ public final class AvsVmsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2024-11-01/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List. @@ -433,7 +483,7 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: 2024-11-01/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumGen_Set. @@ -447,6 +497,165 @@ public final class OperationsListSamples { } ``` +### RecoverableVolumeGroups_Delete + +```java +/** + * Samples for RecoverableVolumeGroups Delete. + */ +public final class RecoverableVolumeGroupsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/RecoverableVolumeGroups_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: RecoverableVolumeGroups_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + recoverableVolumeGroupsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.recoverableVolumeGroups() + .delete("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} +``` + +### RecoverableVolumeGroups_Get + +```java +/** + * Samples for RecoverableVolumeGroups Get. + */ +public final class RecoverableVolumeGroupsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/RecoverableVolumeGroups_Get_MaximumSet_Gen.json + */ + /** + * Sample code: RecoverableVolumeGroups_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + recoverableVolumeGroupsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.recoverableVolumeGroups() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} +``` + +### RecoverableVolumeGroups_ListByStoragePool + +```java +/** + * Samples for RecoverableVolumeGroups ListByStoragePool. + */ +public final class RecoverableVolumeGroupsListByStoragePoolSamples { + /* + * x-ms-original-file: 2026-05-01-preview/RecoverableVolumeGroups_ListByStoragePool_MaximumSet_Gen.json + */ + /** + * Sample code: RecoverableVolumeGroups_ListByStoragePool. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void recoverableVolumeGroupsListByStoragePool( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.recoverableVolumeGroups() + .listByStoragePool("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Reservations_Create + +```java +import com.azure.resourcemanager.purestorageblock.models.Address; +import com.azure.resourcemanager.purestorageblock.models.CompanyDetails; +import com.azure.resourcemanager.purestorageblock.models.MarketplaceDetails; +import com.azure.resourcemanager.purestorageblock.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.purestorageblock.models.OfferDetails; +import com.azure.resourcemanager.purestorageblock.models.ReservationPropertiesBaseResourceProperties; +import com.azure.resourcemanager.purestorageblock.models.UserDetails; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Reservations Create. + */ +public final class ReservationsCreateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_Create_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_Create. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void reservationsCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations() + .define("reservation-01") + .withRegion("eastus") + .withExistingResourceGroup("rgpurestorage") + .withTags(mapOf("environment", "production")) + .withProperties(new ReservationPropertiesBaseResourceProperties() + .withMarketplace(new MarketplaceDetails() + .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START) + .withOfferDetails(new OfferDetails().withPublisherId("pure_storage") + .withOfferId("purestorage-block-offer") + .withPlanId("standard-plan") + .withPlanName("Standard Plan") + .withTermUnit("month") + .withTermId("12-month-term"))) + .withUser(new UserDetails().withFirstName("John") + .withLastName("Doe") + .withEmailAddress("john.doe@contoso.com") + .withUpn("john.doe@contoso.com") + .withPhoneNumber("+1-425-555-1234") + .withCompanyDetails(new CompanyDetails().withCompanyName("Contoso Ltd.") + .withAddress(new Address().withAddressLine1("1 Microsoft Way") + .withAddressLine2("Suite 100") + .withCity("Redmond") + .withState("Washington") + .withCountry("United States") + .withPostalCode("fakeTokenPlaceholder"))))) + .create(); + } + + // 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; + } +} +``` + +### Reservations_Delete + +```java +/** + * Samples for Reservations Delete. + */ +public final class ReservationsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void reservationsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations().delete("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); + } +} +``` + ### Reservations_GetBillingReport ```java @@ -455,7 +664,7 @@ public final class OperationsListSamples { */ public final class ReservationsGetBillingReportSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_GetBillingReport_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_GetBillingReport_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetBillingReport_MaximumSet. @@ -478,7 +687,7 @@ public final class ReservationsGetBillingReportSamples { */ public final class ReservationsGetBillingStatusSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_GetBillingStatus_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_GetBillingStatus_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetBillingStatus_MaximumSet. @@ -493,6 +702,28 @@ public final class ReservationsGetBillingStatusSamples { } ``` +### Reservations_GetByResourceGroup + +```java +/** + * Samples for Reservations GetByResourceGroup. + */ +public final class ReservationsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void reservationsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations() + .getByResourceGroupWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); + } +} +``` + ### Reservations_GetResourceLimits ```java @@ -501,7 +732,7 @@ public final class ReservationsGetBillingStatusSamples { */ public final class ReservationsGetResourceLimitsSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_GetResourceLimits_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_GetResourceLimits_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetResourceLimits. @@ -511,7 +742,216 @@ public final class ReservationsGetResourceLimitsSamples { public static void reservationsGetResourceLimits(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.reservations() - .getResourceLimitsWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getResourceLimitsWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Reservations_LatestLinkedSaaS + +```java +/** + * Samples for Reservations LatestLinkedSaaS. + */ +public final class ReservationsLatestLinkedSaaSSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_LatestLinkedSaaS_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_LatestLinkedSaaS. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + reservationsLatestLinkedSaaS(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations() + .latestLinkedSaaSWithResponse("rgpurestorage", "reservation-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Reservations_LinkSaaS + +```java +import com.azure.resourcemanager.purestorageblock.models.LinkSaaSRequest; + +/** + * Samples for Reservations LinkSaaS. + */ +public final class ReservationsLinkSaaSSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_LinkSaaS_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_LinkSaaS. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + reservationsLinkSaaS(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations() + .linkSaaS("rgpurestorage", "reservation-01", new LinkSaaSRequest().withSaaSResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/Microsoft.SaaS/resources/saas-resource-01"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Reservations_List + +```java +/** + * Samples for Reservations List. + */ +public final class ReservationsListSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_ListBySubscription. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + reservationsListBySubscription(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Reservations_ListByResourceGroup + +```java +/** + * Samples for Reservations ListByResourceGroup. + */ +public final class ReservationsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_ListByResourceGroup. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + reservationsListByResourceGroup(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations().listByResourceGroup("rgpurestorage", com.azure.core.util.Context.NONE); + } +} +``` + +### Reservations_Update + +```java +import com.azure.resourcemanager.purestorageblock.models.Address; +import com.azure.resourcemanager.purestorageblock.models.CompanyDetails; +import com.azure.resourcemanager.purestorageblock.models.Reservation; +import com.azure.resourcemanager.purestorageblock.models.ReservationUpdateProperties; +import com.azure.resourcemanager.purestorageblock.models.UserDetails; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Reservations Update. + */ +public final class ReservationsUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_Update. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void reservationsUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + Reservation resource = manager.reservations() + .getByResourceGroupWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key8751", "fakeTokenPlaceholder")) + .withProperties( + new ReservationUpdateProperties().withUser(new UserDetails().withFirstName("sjzquetrvxcrajxdfwfeuro") + .withLastName("qimvqxnlbclfouwzfk") + .withEmailAddress("john.doe@contoso.com") + .withUpn("pvafwnbigmhuigxfu") + .withPhoneNumber("jfljnoxsfsplwczwgvmlurfnorimvl") + .withCompanyDetails(new CompanyDetails().withCompanyName("uleytbkckdhaiykwjjcjqmnlik") + .withAddress(new Address().withAddressLine1("ryaasdffnhwialrgmukpiwtcjgbb") + .withAddressLine2("cvyuuqnvuqfrpkoplfzmhnwrqsbsgn") + .withCity("kdpzfxfbgozxwunkkhjthqdsnmce") + .withState("fygrbnektar") + .withCountry("trmpjpxsfmxprlnv") + .withPostalCode("fakeTokenPlaceholder"))))) + .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; + } +} +``` + +### SaaSOperationGroup_ActivateResource + +```java +import com.azure.resourcemanager.purestorageblock.models.ActivateSaaSRequest; + +/** + * Samples for SaaSOperationGroup ActivateResource. + */ +public final class SaaSOperationGroupActivateResourceSamples { + /* + * x-ms-original-file: 2026-05-01-preview/SaaSOperationGroup_ActivateSaaS_MaximumSet.json + */ + /** + * Sample code: SaaSOperationGroup_ActivateResource. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + saaSOperationGroupActivateResource(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.saaSOperationGroups() + .activateResource(new ActivateSaaSRequest().withSaasGuid("12345678-1234-5678-1234-567812345678") + .withPublisherId("purestorage1234567890"), com.azure.core.util.Context.NONE); + } +} +``` + +### StoragePools_ConfigurePlatformConsoleAuth + +```java +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleRole; +import com.azure.resourcemanager.purestorageblock.models.SshPlatformConsoleAuthConfig; + +/** + * Samples for StoragePools ConfigurePlatformConsoleAuth. + */ +public final class StoragePoolsConfigurePlatformConsoleAuthSamples { + /* + * x-ms-original-file: 2026-05-01-preview/StoragePools_ConfigurePlatformConsoleAuth_MaximumSet_Gen.json + */ + /** + * Sample code: StoragePools_ConfigurePlatformConsoleAuth. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void storagePoolsConfigurePlatformConsoleAuth( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.storagePools() + .configurePlatformConsoleAuthWithResponse("rgpurestorage", "storagepool-01", + new SshPlatformConsoleAuthConfig().withUsername("alice") + .withPublicKey("fakeTokenPlaceholder") + .withRole(PlatformConsoleRole.STORAGE_ADMIN), + com.azure.core.util.Context.NONE); } } ``` @@ -532,7 +972,7 @@ import java.util.Map; */ public final class StoragePoolsCreateSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_Create_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_Create_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Create. @@ -541,17 +981,20 @@ public final class StoragePoolsCreateSamples { */ public static void storagePoolsCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .define("storagePoolname") - .withRegion("lonlc") + .define("storagepool-01") + .withRegion("eastus") .withExistingResourceGroup("rgpurestorage") - .withTags(mapOf("key7593", "fakeTokenPlaceholder")) - .withProperties(new StoragePoolProperties().withAvailabilityZone("vknyl") - .withVnetInjection(new VnetInjection().withSubnetId("tnlctolrxdvnkjiphlrdxq") - .withVnetId("zbumtytyqwewjcyckwqchiypshv")) + .withTags(mapOf("environment", "production")) + .withProperties(new StoragePoolProperties().withAvailabilityZone("1") + .withVnetInjection(new VnetInjection().withSubnetId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/Microsoft.Network/virtualNetworks/vnet-01/subnets/subnet-01") + .withVnetId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/Microsoft.Network/virtualNetworks/vnet-01")) .withProvisionedBandwidthMbPerSec(17L) - .withReservationResourceId("xiowoxnbtcotutcmmrofvgdi")) + .withReservationResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/reservations/reservation-01")) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("key4211", new UserAssignedIdentity()))) + .withUserAssignedIdentities(mapOf("identity-01", new UserAssignedIdentity()))) .create(); } @@ -577,7 +1020,7 @@ public final class StoragePoolsCreateSamples { */ public final class StoragePoolsDeleteSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_Delete_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Delete. @@ -585,7 +1028,7 @@ public final class StoragePoolsDeleteSamples { * @param manager Entry point to PureStorageBlockManager. */ public static void storagePoolsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { - manager.storagePools().delete("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + manager.storagePools().delete("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } ``` @@ -598,7 +1041,7 @@ public final class StoragePoolsDeleteSamples { */ public final class StoragePoolsDisableAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_DisableAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_DisableAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_DisableAvsConnection. @@ -608,7 +1051,7 @@ public final class StoragePoolsDisableAvsConnectionSamples { public static void storagePoolsDisableAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .disableAvsConnection("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .disableAvsConnection("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } ``` @@ -623,7 +1066,7 @@ import com.azure.resourcemanager.purestorageblock.models.StoragePoolEnableAvsCon */ public final class StoragePoolsEnableAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_EnableAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_EnableAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_EnableAvsConnection. @@ -633,7 +1076,7 @@ public final class StoragePoolsEnableAvsConnectionSamples { public static void storagePoolsEnableAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .enableAvsConnection("rgpurestorage", "storagePoolname", + .enableAvsConnection("rgpurestorage", "storagepool-01", new StoragePoolEnableAvsConnectionPost().withClusterResourceId("tghkgktlddwlszbeh"), com.azure.core.util.Context.NONE); } @@ -651,7 +1094,7 @@ import com.azure.resourcemanager.purestorageblock.models.StoragePoolFinalizeAvsC */ public final class StoragePoolsFinalizeAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_FinalizeAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_FinalizeAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_FinalizeAvsConnection. @@ -661,7 +1104,7 @@ public final class StoragePoolsFinalizeAvsConnectionSamples { public static void storagePoolsFinalizeAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .finalizeAvsConnection("rgpurestorage", "storagePoolname", + .finalizeAvsConnection("rgpurestorage", "storagepool-01", new StoragePoolFinalizeAvsConnectionPost().withServiceInitializationDataEnc("hlgzaxrohv") .withServiceInitializationData(new ServiceInitializationInfo().withServiceAccountUsername("axchgm") .withServiceAccountPassword("fakeTokenPlaceholder") @@ -680,7 +1123,7 @@ public final class StoragePoolsFinalizeAvsConnectionSamples { */ public final class StoragePoolsGetAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_GetAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_GetAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetAvsConnection. @@ -690,7 +1133,7 @@ public final class StoragePoolsGetAvsConnectionSamples { public static void storagePoolsGetAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .getAvsConnectionWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getAvsConnectionWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } ``` @@ -703,7 +1146,7 @@ public final class StoragePoolsGetAvsConnectionSamples { */ public final class StoragePoolsGetAvsStatusSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_GetAvsStatus_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_GetAvsStatus_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetAvsStatus. @@ -713,7 +1156,7 @@ public final class StoragePoolsGetAvsStatusSamples { public static void storagePoolsGetAvsStatus(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .getAvsStatusWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getAvsStatusWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } ``` @@ -726,7 +1169,7 @@ public final class StoragePoolsGetAvsStatusSamples { */ public final class StoragePoolsGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_Get_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Get. @@ -735,7 +1178,7 @@ public final class StoragePoolsGetByResourceGroupSamples { */ public static void storagePoolsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .getByResourceGroupWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } ``` @@ -748,7 +1191,7 @@ public final class StoragePoolsGetByResourceGroupSamples { */ public final class StoragePoolsGetHealthStatusSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_GetHealthStatus_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_GetHealthStatus_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetHealthStatus. @@ -758,7 +1201,7 @@ public final class StoragePoolsGetHealthStatusSamples { public static void storagePoolsGetHealthStatus(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .getHealthStatusWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getHealthStatusWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } ``` @@ -771,7 +1214,7 @@ public final class StoragePoolsGetHealthStatusSamples { */ public final class StoragePoolsListSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: StoragePools_ListBySubscription. @@ -793,7 +1236,7 @@ public final class StoragePoolsListSamples { */ public final class StoragePoolsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: StoragePools_ListByResourceGroup. @@ -807,33 +1250,56 @@ public final class StoragePoolsListByResourceGroupSamples { } ``` -### StoragePools_RepairAvsConnection +### StoragePools_ListPlatformConsoleActivationCode ```java /** - * Samples for StoragePools RepairAvsConnection. + * Samples for StoragePools ListPlatformConsoleActivationCode. */ -public final class StoragePoolsRepairAvsConnectionSamples { +public final class StoragePoolsListPlatformConsoleActivationCodeSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_RepairAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_ListPlatformConsoleActivationCode_MaximumSet_Gen.json */ /** - * Sample code: StoragePools_RepairAvsConnection. + * Sample code: StoragePools_ListPlatformConsoleActivationCode. * * @param manager Entry point to PureStorageBlockManager. */ - public static void - storagePoolsRepairAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + public static void storagePoolsListPlatformConsoleActivationCode( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .repairAvsConnection("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .listPlatformConsoleActivationCodeWithResponse("rgpurestorage", "storagepool-01", + com.azure.core.util.Context.NONE); } } ``` -### StoragePools_Update +### StoragePools_RepairAvsConnection ```java -import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentity; +/** + * Samples for StoragePools RepairAvsConnection. + */ +public final class StoragePoolsRepairAvsConnectionSamples { + /* + * x-ms-original-file: 2026-05-01-preview/StoragePools_RepairAvsConnection_MaximumSet_Gen.json + */ + /** + * Sample code: StoragePools_RepairAvsConnection. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + storagePoolsRepairAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.storagePools().repairAvsConnection("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### StoragePools_Update + +```java +import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentity; import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentityType; import com.azure.resourcemanager.purestorageblock.models.StoragePool; import com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdateProperties; @@ -846,7 +1312,7 @@ import java.util.Map; */ public final class StoragePoolsUpdateSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_Update_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Update. @@ -855,12 +1321,12 @@ public final class StoragePoolsUpdateSamples { */ public static void storagePoolsUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { StoragePool resource = manager.storagePools() - .getByResourceGroupWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withTags(mapOf("key9065", "fakeTokenPlaceholder")) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("key4211", new UserAssignedIdentity()))) + .withUserAssignedIdentities(mapOf("identity-01", new UserAssignedIdentity()))) .withProperties(new StoragePoolUpdateProperties().withProvisionedBandwidthMbPerSec(23L)) .apply(); } @@ -879,3 +1345,542 @@ public final class StoragePoolsUpdateSamples { } ``` +### VolumeGroupSnapshots_Create + +```java +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotProperties; + +/** + * Samples for VolumeGroupSnapshots Create. + */ +public final class VolumeGroupSnapshotsCreateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_Create_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_Create. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupSnapshotsCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .define("snapshot-01") + .withExistingVolumeGroup("rgpurestorage", "storagepool-01", "volumegroup-01") + .withProperties(new VolumeGroupSnapshotProperties().withSourceSnapshotResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01/snapshots/snapshot-01")) + .create(); + } +} +``` + +### VolumeGroupSnapshots_Delete + +```java +/** + * Samples for VolumeGroupSnapshots Delete. + */ +public final class VolumeGroupSnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupSnapshotsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .delete("rgpurestorage", "storagepool-01", "volumegroup-01", "snapshotdd", + com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroupSnapshots_Get + +```java +/** + * Samples for VolumeGroupSnapshots Get. + */ +public final class VolumeGroupSnapshotsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_Get_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupSnapshotsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", "01", + com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroupSnapshots_ListByVolumeGroup + +```java +/** + * Samples for VolumeGroupSnapshots ListByVolumeGroup. + */ +public final class VolumeGroupSnapshotsListByVolumeGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_ListByVolumeGroup_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_ListByVolumeGroup. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupSnapshotsListByVolumeGroup( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .listByVolumeGroup("rgpurestorage", "storagepool-01", "volumegroup-01", null, null, null, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroupSnapshots_ListSnapshots + +```java +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotListRequest; + +/** + * Samples for VolumeGroupSnapshots ListSnapshots. + */ +public final class VolumeGroupSnapshotsListSnapshotsSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_ListSnapshots_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_ListSnapshots. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupSnapshotsListSnapshots(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .listSnapshotsWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", + new VolumeGroupSnapshotListRequest().withFilter("substringof('snapshot', name)") + .withOrderby("name asc") + .withTop(10) + .withSkip(0), + com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroups_Create + +```java +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for VolumeGroups Create. + */ +public final class VolumeGroupsCreateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Create_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Create. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .define("volumegroup-01") + .withRegion("eastus") + .withExistingStoragePool("rgpurestorage", "storagepool-01") + .withTags(mapOf("environment", "production")) + .withProperties(new VolumeGroupProperties().withSourceType(VolumeGroupSourceType.SNAPSHOT) + .withSourceSnapshotResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-src/snapshots/snapshot-01") + .withPerformanceParameters( + new PerformanceParameters().withBandwidthLimitMbPerSec(500L).withIopsLimit(10000L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("P7D")) + .withFrequency(Duration.parse("PT1H")))) + .create(); + } + + // 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; + } +} +``` + +### VolumeGroups_Delete + +```java +/** + * Samples for VolumeGroups Delete. + */ +public final class VolumeGroupsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .delete("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroups_Get + +```java +/** + * Samples for VolumeGroups Get. + */ +public final class VolumeGroupsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Get_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroups_GetStatus + +```java +/** + * Samples for VolumeGroups GetStatus. + */ +public final class VolumeGroupsGetStatusSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_GetStatus_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_GetStatus. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupsGetStatus(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .getStatusWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", + com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroups_ListByStoragePool + +```java +/** + * Samples for VolumeGroups ListByStoragePool. + */ +public final class VolumeGroupsListByStoragePoolSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_ListByStoragePool_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_ListByStoragePool. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupsListByStoragePool(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups().listByStoragePool("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroups_ListConnectionParameters + +```java +/** + * Samples for VolumeGroups ListConnectionParameters. + */ +public final class VolumeGroupsListConnectionParametersSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_ListConnectionParameters_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_ListConnectionParameters. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsListConnectionParameters( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .listConnectionParametersWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", + com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroups_Overwrite + +```java +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupOverwriteRequest; + +/** + * Samples for VolumeGroups Overwrite. + */ +public final class VolumeGroupsOverwriteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Overwrite_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Overwrite. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupsOverwrite(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .overwrite("rgpurestorage", "storagepool-01", "volumegroup-01", new VolumeGroupOverwriteRequest() + .withSourceSnapshotResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01/snapshots/snapshot-01") + .withSourceVolumeGroupResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01"), + com.azure.core.util.Context.NONE); + } +} +``` + +### VolumeGroups_Update + +```java +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdateProperties; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for VolumeGroups Update. + */ +public final class VolumeGroupsUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Update_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Update. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + VolumeGroup resource = manager.volumeGroups() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("environment", "production")) + .withProperties(new VolumeGroupUpdateProperties() + .withPerformanceParameters( + new PerformanceParameters().withBandwidthLimitMbPerSec(750L).withIopsLimit(15000L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("P14D")) + .withFrequency(Duration.parse("PT2H")))) + .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; + } +} +``` + +### Volumes_Create + +```java +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; + +/** + * Samples for Volumes Create. + */ +public final class VolumesCreateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Create_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Create. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .define("volume-01") + .withExistingVolumeGroup("rgpurestorage", "storagepool-01", "volumegroup-01") + .withProperties(new AzureVolumeProperties().withProvisionedSize(10737418240L) + .withSourceVolumeResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01/volumes/source-volume") + .withSourceType(VolumeSourceType.VOLUME)) + .create(); + } +} +``` + +### Volumes_Delete + +```java +/** + * Samples for Volumes Delete. + */ +public final class VolumesDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .delete("rgpurestorage", "storagepool-01", "volumegroup-01", "volume-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Volumes_Get + +```java +/** + * Samples for Volumes Get. + */ +public final class VolumesGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", "volume-01", + com.azure.core.util.Context.NONE); + } +} +``` + +### Volumes_ListByVolumeGroup + +```java +/** + * Samples for Volumes ListByVolumeGroup. + */ +public final class VolumesListByVolumeGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_ListByVolumeGroup_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_ListByVolumeGroup. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumesListByVolumeGroup(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .listByVolumeGroup("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} +``` + +### Volumes_Overwrite + +```java +import com.azure.resourcemanager.purestorageblock.models.VolumeOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotSource; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; + +/** + * Samples for Volumes Overwrite. + */ +public final class VolumesOverwriteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Overwrite_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Overwrite. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesOverwrite(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .overwrite("rgpurestorage", "storagepool-01", "volumegroup-01", "volume-01", new VolumeOverwriteRequest() + .withSourceType(VolumeSourceType.SNAPSHOT) + .withSourceVolumeGroupResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01") + .withSourceVolumeSnapshot(new VolumeSnapshotSource().withVolumeGroupSnapshotResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01/snapshots/snapshot-01") + .withVolumeSnapshotName("volume-01")), + com.azure.core.util.Context.NONE); + } +} +``` + +### Volumes_Update + +```java +import com.azure.resourcemanager.purestorageblock.models.Volume; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdateProperties; + +/** + * Samples for Volumes Update. + */ +public final class VolumesUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Update. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + Volume resource = manager.volumes() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", "volume-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new VolumeUpdateProperties().withProvisionedSize(21474836480L)).apply(); + } +} +``` + diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/pom.xml b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/pom.xml index 0d9c4d485480..2cbf8f80dacf 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/pom.xml +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/pom.xml @@ -3,7 +3,7 @@ ~ Licensed under the MIT License. ~ Code generated by Microsoft (R) TypeSpec Code Generator. --> - + 4.0.0 com.azure @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Pure Storage Block Management - This package contains Microsoft Azure SDK for Pure Storage Block Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2024-11-01. + This package contains Microsoft Azure SDK for Pure Storage Block Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2026-05-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/PureStorageBlockManager.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/PureStorageBlockManager.java index be7b9cef74fa..882da1949294 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/PureStorageBlockManager.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/PureStorageBlockManager.java @@ -31,15 +31,25 @@ import com.azure.resourcemanager.purestorageblock.implementation.AvsVmsImpl; import com.azure.resourcemanager.purestorageblock.implementation.OperationsImpl; import com.azure.resourcemanager.purestorageblock.implementation.PureStorageBlockMgmtClientBuilder; +import com.azure.resourcemanager.purestorageblock.implementation.RecoverableVolumeGroupsImpl; import com.azure.resourcemanager.purestorageblock.implementation.ReservationsImpl; +import com.azure.resourcemanager.purestorageblock.implementation.SaaSOperationGroupsImpl; import com.azure.resourcemanager.purestorageblock.implementation.StoragePoolsImpl; +import com.azure.resourcemanager.purestorageblock.implementation.VolumeGroupSnapshotsImpl; +import com.azure.resourcemanager.purestorageblock.implementation.VolumeGroupsImpl; +import com.azure.resourcemanager.purestorageblock.implementation.VolumesImpl; import com.azure.resourcemanager.purestorageblock.models.AvsStorageContainerVolumes; import com.azure.resourcemanager.purestorageblock.models.AvsStorageContainers; import com.azure.resourcemanager.purestorageblock.models.AvsVmVolumes; import com.azure.resourcemanager.purestorageblock.models.AvsVms; import com.azure.resourcemanager.purestorageblock.models.Operations; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroups; import com.azure.resourcemanager.purestorageblock.models.Reservations; +import com.azure.resourcemanager.purestorageblock.models.SaaSOperationGroups; import com.azure.resourcemanager.purestorageblock.models.StoragePools; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshots; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroups; +import com.azure.resourcemanager.purestorageblock.models.Volumes; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -66,6 +76,16 @@ public final class PureStorageBlockManager { private AvsVmVolumes avsVmVolumes; + private VolumeGroups volumeGroups; + + private Volumes volumes; + + private RecoverableVolumeGroups recoverableVolumeGroups; + + private SaaSOperationGroups saaSOperationGroups; + + private VolumeGroupSnapshots volumeGroupSnapshots; + private final PureStorageBlockMgmtClient clientObject; private PureStorageBlockManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -366,6 +386,67 @@ public AvsVmVolumes avsVmVolumes() { return avsVmVolumes; } + /** + * Gets the resource collection API of VolumeGroups. It manages VolumeGroup. + * + * @return Resource collection API of VolumeGroups. + */ + public VolumeGroups volumeGroups() { + if (this.volumeGroups == null) { + this.volumeGroups = new VolumeGroupsImpl(clientObject.getVolumeGroups(), this); + } + return volumeGroups; + } + + /** + * Gets the resource collection API of Volumes. It manages Volume. + * + * @return Resource collection API of Volumes. + */ + public Volumes volumes() { + if (this.volumes == null) { + this.volumes = new VolumesImpl(clientObject.getVolumes(), this); + } + return volumes; + } + + /** + * Gets the resource collection API of RecoverableVolumeGroups. + * + * @return Resource collection API of RecoverableVolumeGroups. + */ + public RecoverableVolumeGroups recoverableVolumeGroups() { + if (this.recoverableVolumeGroups == null) { + this.recoverableVolumeGroups + = new RecoverableVolumeGroupsImpl(clientObject.getRecoverableVolumeGroups(), this); + } + return recoverableVolumeGroups; + } + + /** + * Gets the resource collection API of SaaSOperationGroups. + * + * @return Resource collection API of SaaSOperationGroups. + */ + public SaaSOperationGroups saaSOperationGroups() { + if (this.saaSOperationGroups == null) { + this.saaSOperationGroups = new SaaSOperationGroupsImpl(clientObject.getSaaSOperationGroups(), this); + } + return saaSOperationGroups; + } + + /** + * Gets the resource collection API of VolumeGroupSnapshots. It manages VolumeGroupSnapshot. + * + * @return Resource collection API of VolumeGroupSnapshots. + */ + public VolumeGroupSnapshots volumeGroupSnapshots() { + if (this.volumeGroupSnapshots == null) { + this.volumeGroupSnapshots = new VolumeGroupSnapshotsImpl(clientObject.getVolumeGroupSnapshots(), this); + } + return volumeGroupSnapshots; + } + /** * Gets wrapped service client PureStorageBlockMgmtClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/PureStorageBlockMgmtClient.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/PureStorageBlockMgmtClient.java index 82cad8f93ef0..c90719e9c2af 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/PureStorageBlockMgmtClient.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/PureStorageBlockMgmtClient.java @@ -94,4 +94,39 @@ public interface PureStorageBlockMgmtClient { * @return the AvsVmVolumesClient object. */ AvsVmVolumesClient getAvsVmVolumes(); + + /** + * Gets the VolumeGroupsClient object to access its operations. + * + * @return the VolumeGroupsClient object. + */ + VolumeGroupsClient getVolumeGroups(); + + /** + * Gets the VolumesClient object to access its operations. + * + * @return the VolumesClient object. + */ + VolumesClient getVolumes(); + + /** + * Gets the RecoverableVolumeGroupsClient object to access its operations. + * + * @return the RecoverableVolumeGroupsClient object. + */ + RecoverableVolumeGroupsClient getRecoverableVolumeGroups(); + + /** + * Gets the SaaSOperationGroupsClient object to access its operations. + * + * @return the SaaSOperationGroupsClient object. + */ + SaaSOperationGroupsClient getSaaSOperationGroups(); + + /** + * Gets the VolumeGroupSnapshotsClient object to access its operations. + * + * @return the VolumeGroupSnapshotsClient object. + */ + VolumeGroupSnapshotsClient getVolumeGroupSnapshots(); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/RecoverableVolumeGroupsClient.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/RecoverableVolumeGroupsClient.java new file mode 100644 index 000000000000..8265d8acc06d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/RecoverableVolumeGroupsClient.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.purestorageblock.fluent.models.RecoverableVolumeGroupInner; + +/** + * An instance of this class provides access to all the operations defined in RecoverableVolumeGroupsClient. + */ +public interface RecoverableVolumeGroupsClient { + /** + * Get a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @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 recoverable volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName, Context context); + + /** + * Get a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 recoverable volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecoverableVolumeGroupInner get(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName); + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 RecoverableVolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName); + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @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 RecoverableVolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName, + Context context); + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, + String recoverableVolumeGroupName); + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @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 storagePoolName, + String recoverableVolumeGroupName, Context context); + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, String recoverableVolumeGroupName); + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @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 storagePoolName, String recoverableVolumeGroupName, Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/ReservationsClient.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/ReservationsClient.java index a98a4ffc040c..72ec675a20c6 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/ReservationsClient.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/ReservationsClient.java @@ -11,10 +11,12 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.purestorageblock.fluent.models.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.purestorageblock.fluent.models.LimitDetailsInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingStatusInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingUsageReportInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationInner; +import com.azure.resourcemanager.purestorageblock.models.LinkSaaSRequest; import com.azure.resourcemanager.purestorageblock.models.ReservationUpdate; /** @@ -354,4 +356,100 @@ Response getBillingReportWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) ReservationBillingUsageReportInner getBillingReport(String resourceGroupName, String reservationName); + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReservationInner> beginLinkSaaS(String resourceGroupName, + String reservationName, LinkSaaSRequest body); + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ReservationInner> beginLinkSaaS(String resourceGroupName, + String reservationName, LinkSaaSRequest body, Context context); + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReservationInner linkSaaS(String resourceGroupName, String reservationName, LinkSaaSRequest body); + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ReservationInner linkSaaS(String resourceGroupName, String reservationName, LinkSaaSRequest body, Context context); + + /** + * Returns the latest SaaS linked to the reservation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @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 response of get latest linked SaaS resource operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response latestLinkedSaaSWithResponse(String resourceGroupName, + String reservationName, Context context); + + /** + * Returns the latest SaaS linked to the reservation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 response of get latest linked SaaS resource operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String reservationName); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/SaaSOperationGroupsClient.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/SaaSOperationGroupsClient.java new file mode 100644 index 000000000000..53e35cce3c0e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/SaaSOperationGroupsClient.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.purestorageblock.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.purestorageblock.models.ActivateSaaSRequest; + +/** + * An instance of this class provides access to all the operations defined in SaaSOperationGroupsClient. + */ +public interface SaaSOperationGroupsClient { + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SaaSResourceDetailsResponseInner> + beginActivateResource(ActivateSaaSRequest body); + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SaaSResourceDetailsResponseInner> + beginActivateResource(ActivateSaaSRequest body, Context context); + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SaaSResourceDetailsResponseInner activateResource(ActivateSaaSRequest body); + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SaaSResourceDetailsResponseInner activateResource(ActivateSaaSRequest body, Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/StoragePoolsClient.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/StoragePoolsClient.java index e8241397e854..686c7884025c 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/StoragePoolsClient.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/StoragePoolsClient.java @@ -13,8 +13,11 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.purestorageblock.fluent.models.AvsConnectionInner; import com.azure.resourcemanager.purestorageblock.fluent.models.AvsStatusInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleActivationCodeInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner; import com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolHealthInfoInner; import com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolInner; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthConfig; import com.azure.resourcemanager.purestorageblock.models.StoragePoolEnableAvsConnectionPost; import com.azure.resourcemanager.purestorageblock.models.StoragePoolFinalizeAvsConnectionPost; import com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdate; @@ -581,4 +584,64 @@ SyncPoller, Void> beginRepairAvsConnection(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) void repairAvsConnection(String resourceGroupName, String storagePoolName, Context context); + + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @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 one-time activation code for platform console access along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listPlatformConsoleActivationCodeWithResponse(String resourceGroupName, + String storagePoolName, Context context); + + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 one-time activation code for platform console access. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PlatformConsoleActivationCodeInner listPlatformConsoleActivationCode(String resourceGroupName, + String storagePoolName); + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param config Platform console authentication configuration. + * @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 base model for platform console authentication result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response configurePlatformConsoleAuthWithResponse(String resourceGroupName, + String storagePoolName, PlatformConsoleAuthConfig config, Context context); + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param config Platform console authentication configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 base model for platform console authentication result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PlatformConsoleAuthResultInner configurePlatformConsoleAuth(String resourceGroupName, String storagePoolName, + PlatformConsoleAuthConfig config); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupSnapshotsClient.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupSnapshotsClient.java new file mode 100644 index 000000000000..c4d806902b48 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupSnapshotsClient.java @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.purestorageblock.fluent.models.VolumeGroupSnapshotInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotPostListResultInner; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotListRequest; + +/** + * An instance of this class provides access to all the operations defined in VolumeGroupSnapshotsClient. + */ +public interface VolumeGroupSnapshotsClient { + /** + * Get a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 volume group snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, Context context); + + /** + * Get a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 volume group snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupSnapshotInner get(String resourceGroupName, String storagePoolName, String volumeGroupName, + String snapshotName); + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeGroupSnapshotInner> beginCreate(String resourceGroupName, + String storagePoolName, String volumeGroupName, String snapshotName, VolumeGroupSnapshotInner resource); + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeGroupSnapshotInner> beginCreate(String resourceGroupName, + String storagePoolName, String volumeGroupName, String snapshotName, VolumeGroupSnapshotInner resource, + Context context); + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupSnapshotInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + String snapshotName, VolumeGroupSnapshotInner resource); + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupSnapshotInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + String snapshotName, VolumeGroupSnapshotInner resource, Context context); + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, + String volumeGroupName, String snapshotName); + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 storagePoolName, + String volumeGroupName, String snapshotName, Context context); + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, String volumeGroupName, String snapshotName); + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 storagePoolName, String volumeGroupName, String snapshotName, + Context context); + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 paged list result for volume group snapshots as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName); + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param filter OData filter expression (e.g. $filter=substringof('sna', name) and space/unique gt 1000). + * @param orderby OData order-by expression (e.g. $orderby=name asc). + * @param top Maximum number of results to return per page. + * @param skip Number of results to skip (page offset). + * @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 paged list result for volume group snapshots as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName, String filter, String orderby, Integer top, Integer skip, Context context); + + /** + * List all snapshots for a given volume group using POST with the same request and response contract. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties Snapshot list 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 list result for volume group snapshots returned by the listSnapshots POST action along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSnapshotsWithResponse(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupSnapshotListRequest properties, Context context); + + /** + * List all snapshots for a given volume group using POST with the same request and response contract. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties Snapshot list 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 list result for volume group snapshots returned by the listSnapshots POST action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupSnapshotPostListResultInner listSnapshots(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupSnapshotListRequest properties); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupsClient.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupsClient.java new file mode 100644 index 000000000000..9d73fae1c40a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupsClient.java @@ -0,0 +1,396 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.purestorageblock.fluent.models.ConnectionParametersResponseInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupStatusInner; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdate; + +/** + * An instance of this class provides access to all the operations defined in VolumeGroupsClient. + */ +public interface VolumeGroupsClient { + /** + * Get a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String storagePoolName, String volumeGroupName, + Context context); + + /** + * Get a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupInner get(String resourceGroupName, String storagePoolName, String volumeGroupName); + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeGroupInner> beginCreate(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupInner resource); + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeGroupInner> beginCreate(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupInner resource, Context context); + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupInner resource); + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupInner resource, Context context); + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 the {@link SyncPoller} for polling of volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeGroupInner> beginUpdate(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupUpdate properties); + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 the {@link SyncPoller} for polling of volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeGroupInner> beginUpdate(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupUpdate properties, Context context); + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupInner update(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupUpdate properties); + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupInner update(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupUpdate properties, Context context); + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, + String volumeGroupName); + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 storagePoolName, + String volumeGroupName, Context context); + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, String volumeGroupName); + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 storagePoolName, String volumeGroupName, Context context); + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 VolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName); + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @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 VolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName, + Context context); + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 connection parameters for ISCSI connection to the volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listConnectionParametersWithResponse(String resourceGroupName, + String storagePoolName, String volumeGroupName, Context context); + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 connection parameters for ISCSI connection to the volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectionParametersResponseInner listConnectionParameters(String resourceGroupName, String storagePoolName, + String volumeGroupName); + + /** + * Get current status and space information of the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 current status and space information of the volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getStatusWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context); + + /** + * Get current status and space information of the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status and space information of the volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeGroupStatusInner getStatus(String resourceGroupName, String storagePoolName, String volumeGroupName); + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginOverwrite(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupOverwriteRequest body); + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginOverwrite(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupOverwriteRequest body, Context context); + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body); + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body, Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumesClient.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumesClient.java new file mode 100644 index 000000000000..6987a076aab4 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumesClient.java @@ -0,0 +1,373 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.purestorageblock.fluent.models.VolumeInner; +import com.azure.resourcemanager.purestorageblock.models.VolumeOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdate; + +/** + * An instance of this class provides access to all the operations defined in VolumesClient. + */ +public interface VolumesClient { + /** + * Get a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, Context context); + + /** + * Get a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeInner get(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName); + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeInner> beginCreate(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeInner resource); + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeInner> beginCreate(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeInner resource, Context context); + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeInner resource); + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeInner resource, Context context); + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 the {@link SyncPoller} for polling of azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeInner> beginUpdate(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeUpdate properties); + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 the {@link SyncPoller} for polling of azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VolumeInner> beginUpdate(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeUpdate properties, Context context); + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeInner update(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeUpdate properties); + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VolumeInner update(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeUpdate properties, Context context); + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, + String volumeGroupName, String volumeName); + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 storagePoolName, + String volumeGroupName, String volumeName, Context context); + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, String volumeGroupName, String volumeName); + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 storagePoolName, String volumeGroupName, String volumeName, + Context context); + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 Volume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName); + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 Volume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context); + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginOverwrite(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeOverwriteRequest body); + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginOverwrite(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeOverwriteRequest body, Context context); + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeOverwriteRequest body); + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeOverwriteRequest body, Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ConnectionParametersResponseInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ConnectionParametersResponseInner.java new file mode 100644 index 000000000000..ccfa2e444893 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ConnectionParametersResponseInner.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.models.IscsiConnectionParameters; +import java.io.IOException; + +/** + * Connection parameters response. + */ +@Immutable +public final class ConnectionParametersResponseInner implements JsonSerializable { + /* + * ISCSI connection parameters + */ + private IscsiConnectionParameters iscsi; + + /** + * Creates an instance of ConnectionParametersResponseInner class. + */ + private ConnectionParametersResponseInner() { + } + + /** + * Get the iscsi property: ISCSI connection parameters. + * + * @return the iscsi value. + */ + public IscsiConnectionParameters iscsi() { + return this.iscsi; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("iscsi", this.iscsi); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ConnectionParametersResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ConnectionParametersResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ConnectionParametersResponseInner. + */ + public static ConnectionParametersResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ConnectionParametersResponseInner deserializedConnectionParametersResponseInner + = new ConnectionParametersResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("iscsi".equals(fieldName)) { + deserializedConnectionParametersResponseInner.iscsi = IscsiConnectionParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedConnectionParametersResponseInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/LatestLinkedSaaSResponseInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/LatestLinkedSaaSResponseInner.java new file mode 100644 index 000000000000..38bd3d12994d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/LatestLinkedSaaSResponseInner.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Response of get latest linked SaaS resource operation. + */ +@Immutable +public final class LatestLinkedSaaSResponseInner implements JsonSerializable { + /* + * SaaS resource id + */ + private String saaSResourceId; + + /* + * Flag indicating if the SaaS resource is hidden + */ + private Boolean isHiddenSaaS; + + /** + * Creates an instance of LatestLinkedSaaSResponseInner class. + */ + private LatestLinkedSaaSResponseInner() { + } + + /** + * Get the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + public String saaSResourceId() { + return this.saaSResourceId; + } + + /** + * Get the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. + * + * @return the isHiddenSaaS value. + */ + public Boolean isHiddenSaaS() { + return this.isHiddenSaaS; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId); + jsonWriter.writeBooleanField("isHiddenSaaS", this.isHiddenSaaS); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LatestLinkedSaaSResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LatestLinkedSaaSResponseInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LatestLinkedSaaSResponseInner. + */ + public static LatestLinkedSaaSResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LatestLinkedSaaSResponseInner deserializedLatestLinkedSaaSResponseInner + = new LatestLinkedSaaSResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saaSResourceId".equals(fieldName)) { + deserializedLatestLinkedSaaSResponseInner.saaSResourceId = reader.getString(); + } else if ("isHiddenSaaS".equals(fieldName)) { + deserializedLatestLinkedSaaSResponseInner.isHiddenSaaS = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedLatestLinkedSaaSResponseInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/PlatformConsoleActivationCodeInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/PlatformConsoleActivationCodeInner.java new file mode 100644 index 000000000000..16b48d021e4f --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/PlatformConsoleActivationCodeInner.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * One-time activation code for platform console access. + */ +@Immutable +public final class PlatformConsoleActivationCodeInner implements JsonSerializable { + /* + * Username to use when activating the console session + */ + private String username; + + /* + * One-time activation code for platform console access + */ + private String activationCode; + + /* + * Expiry time of the activation code in RFC3339 format + */ + private OffsetDateTime expiresAt; + + /** + * Creates an instance of PlatformConsoleActivationCodeInner class. + */ + private PlatformConsoleActivationCodeInner() { + } + + /** + * Get the username property: Username to use when activating the console session. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Get the activationCode property: One-time activation code for platform console access. + * + * @return the activationCode value. + */ + public String activationCode() { + return this.activationCode; + } + + /** + * Get the expiresAt property: Expiry time of the activation code in RFC3339 format. + * + * @return the expiresAt value. + */ + public OffsetDateTime expiresAt() { + return this.expiresAt; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("activationCode", this.activationCode); + jsonWriter.writeStringField("expiresAt", + this.expiresAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiresAt)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformConsoleActivationCodeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformConsoleActivationCodeInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PlatformConsoleActivationCodeInner. + */ + public static PlatformConsoleActivationCodeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformConsoleActivationCodeInner deserializedPlatformConsoleActivationCodeInner + = new PlatformConsoleActivationCodeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedPlatformConsoleActivationCodeInner.username = reader.getString(); + } else if ("activationCode".equals(fieldName)) { + deserializedPlatformConsoleActivationCodeInner.activationCode = reader.getString(); + } else if ("expiresAt".equals(fieldName)) { + deserializedPlatformConsoleActivationCodeInner.expiresAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformConsoleActivationCodeInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/PlatformConsoleAuthResultInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/PlatformConsoleAuthResultInner.java new file mode 100644 index 000000000000..fcaffdacf843 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/PlatformConsoleAuthResultInner.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthType; +import com.azure.resourcemanager.purestorageblock.models.SshPlatformConsoleAuthResult; +import java.io.IOException; + +/** + * Base model for platform console authentication result. Actual type depends on the authType used in the request. + */ +@Immutable +public class PlatformConsoleAuthResultInner implements JsonSerializable { + /* + * Authentication type discriminator + */ + private PlatformConsoleAuthType authType = PlatformConsoleAuthType.fromString("PlatformConsoleAuthResult"); + + /** + * Creates an instance of PlatformConsoleAuthResultInner class. + */ + protected PlatformConsoleAuthResultInner() { + } + + /** + * Get the authType property: Authentication type discriminator. + * + * @return the authType value. + */ + public PlatformConsoleAuthType authType() { + return this.authType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformConsoleAuthResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformConsoleAuthResultInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PlatformConsoleAuthResultInner. + */ + public static PlatformConsoleAuthResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("authType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("ssh".equals(discriminatorValue)) { + return SshPlatformConsoleAuthResult.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static PlatformConsoleAuthResultInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformConsoleAuthResultInner deserializedPlatformConsoleAuthResultInner + = new PlatformConsoleAuthResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authType".equals(fieldName)) { + deserializedPlatformConsoleAuthResultInner.authType + = PlatformConsoleAuthType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformConsoleAuthResultInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/RecoverableVolumeGroupInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/RecoverableVolumeGroupInner.java new file mode 100644 index 000000000000..4ab128255ef6 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/RecoverableVolumeGroupInner.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroupProperties; +import java.io.IOException; + +/** + * A destroyed volume group that is pending eradication. + */ +@Immutable +public final class RecoverableVolumeGroupInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private RecoverableVolumeGroupProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RecoverableVolumeGroupInner class. + */ + private RecoverableVolumeGroupInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public RecoverableVolumeGroupProperties properties() { + return this.properties; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableVolumeGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableVolumeGroupInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecoverableVolumeGroupInner. + */ + public static RecoverableVolumeGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableVolumeGroupInner deserializedRecoverableVolumeGroupInner = new RecoverableVolumeGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRecoverableVolumeGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRecoverableVolumeGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRecoverableVolumeGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRecoverableVolumeGroupInner.properties + = RecoverableVolumeGroupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRecoverableVolumeGroupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableVolumeGroupInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/SaaSResourceDetailsResponseInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/SaaSResourceDetailsResponseInner.java new file mode 100644 index 000000000000..f96140a9b248 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/SaaSResourceDetailsResponseInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Marketplace SaaS resource details. + */ +@Immutable +public final class SaaSResourceDetailsResponseInner extends ProxyResource { + /* + * Id of the Marketplace SaaS Resource + */ + private String saasId; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SaaSResourceDetailsResponseInner class. + */ + private SaaSResourceDetailsResponseInner() { + } + + /** + * Get the saasId property: Id of the Marketplace SaaS Resource. + * + * @return the saasId value. + */ + public String saasId() { + return this.saasId; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saasId", this.saasId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SaaSResourceDetailsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SaaSResourceDetailsResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SaaSResourceDetailsResponseInner. + */ + public static SaaSResourceDetailsResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SaaSResourceDetailsResponseInner deserializedSaaSResourceDetailsResponseInner + = new SaaSResourceDetailsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.type = reader.getString(); + } else if ("saasId".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.saasId = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedSaaSResourceDetailsResponseInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSaaSResourceDetailsResponseInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupInner.java new file mode 100644 index 000000000000..0742fd9cf84c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupInner.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties; +import java.io.IOException; +import java.util.Map; + +/** + * Volume Group resource. + */ +@Fluent +public final class VolumeGroupInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private VolumeGroupProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of VolumeGroupInner class. + */ + public VolumeGroupInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public VolumeGroupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the VolumeGroupInner object itself. + */ + public VolumeGroupInner withProperties(VolumeGroupProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public VolumeGroupInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public VolumeGroupInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeGroupInner. + */ + public static VolumeGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupInner deserializedVolumeGroupInner = new VolumeGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVolumeGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumeGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumeGroupInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedVolumeGroupInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVolumeGroupInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedVolumeGroupInner.properties = VolumeGroupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVolumeGroupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupSnapshotInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupSnapshotInner.java new file mode 100644 index 000000000000..4ae0b12ee8a7 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupSnapshotInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotProperties; +import java.io.IOException; + +/** + * A snapshot of a volume group. + */ +@Fluent +public final class VolumeGroupSnapshotInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private VolumeGroupSnapshotProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of VolumeGroupSnapshotInner class. + */ + public VolumeGroupSnapshotInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public VolumeGroupSnapshotProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the VolumeGroupSnapshotInner object itself. + */ + public VolumeGroupSnapshotInner withProperties(VolumeGroupSnapshotProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupSnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupSnapshotInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeGroupSnapshotInner. + */ + public static VolumeGroupSnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupSnapshotInner deserializedVolumeGroupSnapshotInner = new VolumeGroupSnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVolumeGroupSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumeGroupSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumeGroupSnapshotInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVolumeGroupSnapshotInner.properties = VolumeGroupSnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVolumeGroupSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupSnapshotInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupSnapshotPostListResultInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupSnapshotPostListResultInner.java new file mode 100644 index 000000000000..5346e78be542 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupSnapshotPostListResultInner.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * List result for volume group snapshots returned by the listSnapshots POST action. + */ +@Immutable +public final class VolumeGroupSnapshotPostListResultInner + implements JsonSerializable { + /* + * Array of volume group snapshots + */ + private List value; + + /* + * Number of snapshots in this response page + */ + private Integer count; + + /* + * Total number of snapshots + */ + private Integer totalCount; + + /** + * Creates an instance of VolumeGroupSnapshotPostListResultInner class. + */ + private VolumeGroupSnapshotPostListResultInner() { + } + + /** + * Get the value property: Array of volume group snapshots. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the count property: Number of snapshots in this response page. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Get the totalCount property: Total number of snapshots. + * + * @return the totalCount value. + */ + public Integer totalCount() { + return this.totalCount; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeNumberField("totalCount", this.totalCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupSnapshotPostListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupSnapshotPostListResultInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeGroupSnapshotPostListResultInner. + */ + public static VolumeGroupSnapshotPostListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupSnapshotPostListResultInner deserializedVolumeGroupSnapshotPostListResultInner + = new VolumeGroupSnapshotPostListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VolumeGroupSnapshotInner.fromJson(reader1)); + deserializedVolumeGroupSnapshotPostListResultInner.value = value; + } else if ("count".equals(fieldName)) { + deserializedVolumeGroupSnapshotPostListResultInner.count = reader.getNullable(JsonReader::getInt); + } else if ("totalCount".equals(fieldName)) { + deserializedVolumeGroupSnapshotPostListResultInner.totalCount + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupSnapshotPostListResultInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupStatusInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupStatusInner.java new file mode 100644 index 000000000000..3c4233b9dff4 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupStatusInner.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.models.Space; +import java.io.IOException; + +/** + * Volume group status information. + */ +@Immutable +public final class VolumeGroupStatusInner implements JsonSerializable { + /* + * Storage space usage for the volume group + */ + private Space space; + + /* + * Number of hosts currently connected to the volume group + */ + private int connectedHostCount; + + /** + * Creates an instance of VolumeGroupStatusInner class. + */ + private VolumeGroupStatusInner() { + } + + /** + * Get the space property: Storage space usage for the volume group. + * + * @return the space value. + */ + public Space space() { + return this.space; + } + + /** + * Get the connectedHostCount property: Number of hosts currently connected to the volume group. + * + * @return the connectedHostCount value. + */ + public int connectedHostCount() { + return this.connectedHostCount; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("space", this.space); + jsonWriter.writeIntField("connectedHostCount", this.connectedHostCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupStatusInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeGroupStatusInner. + */ + public static VolumeGroupStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupStatusInner deserializedVolumeGroupStatusInner = new VolumeGroupStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("space".equals(fieldName)) { + deserializedVolumeGroupStatusInner.space = Space.fromJson(reader); + } else if ("connectedHostCount".equals(fieldName)) { + deserializedVolumeGroupStatusInner.connectedHostCount = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupStatusInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeInner.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeInner.java new file mode 100644 index 000000000000..6395f6eb9716 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +import java.io.IOException; + +/** + * Azure Volume resource. + */ +@Fluent +public final class VolumeInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private AzureVolumeProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of VolumeInner class. + */ + public VolumeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public AzureVolumeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withProperties(AzureVolumeProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeInner. + */ + public static VolumeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeInner deserializedVolumeInner = new VolumeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVolumeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumeInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVolumeInner.properties = AzureVolumeProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVolumeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeInner; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ConnectionParametersResponseImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ConnectionParametersResponseImpl.java new file mode 100644 index 000000000000..1cbfa4e016e4 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ConnectionParametersResponseImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.resourcemanager.purestorageblock.fluent.models.ConnectionParametersResponseInner; +import com.azure.resourcemanager.purestorageblock.models.ConnectionParametersResponse; +import com.azure.resourcemanager.purestorageblock.models.IscsiConnectionParameters; + +public final class ConnectionParametersResponseImpl implements ConnectionParametersResponse { + private ConnectionParametersResponseInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + ConnectionParametersResponseImpl(ConnectionParametersResponseInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public IscsiConnectionParameters iscsi() { + return this.innerModel().iscsi(); + } + + public ConnectionParametersResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/LatestLinkedSaaSResponseImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/LatestLinkedSaaSResponseImpl.java new file mode 100644 index 000000000000..396abb28cda7 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/LatestLinkedSaaSResponseImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.resourcemanager.purestorageblock.fluent.models.LatestLinkedSaaSResponseInner; +import com.azure.resourcemanager.purestorageblock.models.LatestLinkedSaaSResponse; + +public final class LatestLinkedSaaSResponseImpl implements LatestLinkedSaaSResponse { + private LatestLinkedSaaSResponseInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + LatestLinkedSaaSResponseImpl(LatestLinkedSaaSResponseInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String saaSResourceId() { + return this.innerModel().saaSResourceId(); + } + + public Boolean isHiddenSaaS() { + return this.innerModel().isHiddenSaaS(); + } + + public LatestLinkedSaaSResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PlatformConsoleActivationCodeImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PlatformConsoleActivationCodeImpl.java new file mode 100644 index 000000000000..efd080a45707 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PlatformConsoleActivationCodeImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleActivationCodeInner; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleActivationCode; +import java.time.OffsetDateTime; + +public final class PlatformConsoleActivationCodeImpl implements PlatformConsoleActivationCode { + private PlatformConsoleActivationCodeInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + PlatformConsoleActivationCodeImpl(PlatformConsoleActivationCodeInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String username() { + return this.innerModel().username(); + } + + public String activationCode() { + return this.innerModel().activationCode(); + } + + public OffsetDateTime expiresAt() { + return this.innerModel().expiresAt(); + } + + public PlatformConsoleActivationCodeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PlatformConsoleAuthResultImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PlatformConsoleAuthResultImpl.java new file mode 100644 index 000000000000..84fbde3c3756 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PlatformConsoleAuthResultImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthResult; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthType; + +public final class PlatformConsoleAuthResultImpl implements PlatformConsoleAuthResult { + private PlatformConsoleAuthResultInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + PlatformConsoleAuthResultImpl(PlatformConsoleAuthResultInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public PlatformConsoleAuthType authType() { + return this.innerModel().authType(); + } + + public PlatformConsoleAuthResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientImpl.java index b25071543052..ae5ecebacb37 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientImpl.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientImpl.java @@ -32,8 +32,13 @@ import com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient; import com.azure.resourcemanager.purestorageblock.fluent.OperationsClient; import com.azure.resourcemanager.purestorageblock.fluent.PureStorageBlockMgmtClient; +import com.azure.resourcemanager.purestorageblock.fluent.RecoverableVolumeGroupsClient; import com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient; +import com.azure.resourcemanager.purestorageblock.fluent.SaaSOperationGroupsClient; import com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient; +import com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient; +import com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient; +import com.azure.resourcemanager.purestorageblock.fluent.VolumesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -230,6 +235,76 @@ public AvsVmVolumesClient getAvsVmVolumes() { return this.avsVmVolumes; } + /** + * The VolumeGroupsClient object to access its operations. + */ + private final VolumeGroupsClient volumeGroups; + + /** + * Gets the VolumeGroupsClient object to access its operations. + * + * @return the VolumeGroupsClient object. + */ + public VolumeGroupsClient getVolumeGroups() { + return this.volumeGroups; + } + + /** + * The VolumesClient object to access its operations. + */ + private final VolumesClient volumes; + + /** + * Gets the VolumesClient object to access its operations. + * + * @return the VolumesClient object. + */ + public VolumesClient getVolumes() { + return this.volumes; + } + + /** + * The RecoverableVolumeGroupsClient object to access its operations. + */ + private final RecoverableVolumeGroupsClient recoverableVolumeGroups; + + /** + * Gets the RecoverableVolumeGroupsClient object to access its operations. + * + * @return the RecoverableVolumeGroupsClient object. + */ + public RecoverableVolumeGroupsClient getRecoverableVolumeGroups() { + return this.recoverableVolumeGroups; + } + + /** + * The SaaSOperationGroupsClient object to access its operations. + */ + private final SaaSOperationGroupsClient saaSOperationGroups; + + /** + * Gets the SaaSOperationGroupsClient object to access its operations. + * + * @return the SaaSOperationGroupsClient object. + */ + public SaaSOperationGroupsClient getSaaSOperationGroups() { + return this.saaSOperationGroups; + } + + /** + * The VolumeGroupSnapshotsClient object to access its operations. + */ + private final VolumeGroupSnapshotsClient volumeGroupSnapshots; + + /** + * Gets the VolumeGroupSnapshotsClient object to access its operations. + * + * @return the VolumeGroupSnapshotsClient object. + */ + public VolumeGroupSnapshotsClient getVolumeGroupSnapshots() { + return this.volumeGroupSnapshots; + } + /** * Initializes an instance of PureStorageBlockMgmtClient client. * @@ -247,7 +322,7 @@ public AvsVmVolumesClient getAvsVmVolumes() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2024-11-01"; + this.apiVersion = "2026-05-01-preview"; this.operations = new OperationsClientImpl(this); this.reservations = new ReservationsClientImpl(this); this.storagePools = new StoragePoolsClientImpl(this); @@ -255,6 +330,11 @@ public AvsVmVolumesClient getAvsVmVolumes() { this.avsStorageContainerVolumes = new AvsStorageContainerVolumesClientImpl(this); this.avsVms = new AvsVmsClientImpl(this); this.avsVmVolumes = new AvsVmVolumesClientImpl(this); + this.volumeGroups = new VolumeGroupsClientImpl(this); + this.volumes = new VolumesClientImpl(this); + this.recoverableVolumeGroups = new RecoverableVolumeGroupsClientImpl(this); + this.saaSOperationGroups = new SaaSOperationGroupsClientImpl(this); + this.volumeGroupSnapshots = new VolumeGroupSnapshotsClientImpl(this); } /** diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupImpl.java new file mode 100644 index 000000000000..e69cb55ce18d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.purestorageblock.fluent.models.RecoverableVolumeGroupInner; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroupProperties; + +public final class RecoverableVolumeGroupImpl implements RecoverableVolumeGroup { + private RecoverableVolumeGroupInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + RecoverableVolumeGroupImpl(RecoverableVolumeGroupInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager 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 RecoverableVolumeGroupProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RecoverableVolumeGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupsClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupsClientImpl.java new file mode 100644 index 000000000000..df8f39a7cdf7 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupsClientImpl.java @@ -0,0 +1,569 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +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.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.BinaryData; +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.purestorageblock.fluent.RecoverableVolumeGroupsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.RecoverableVolumeGroupInner; +import com.azure.resourcemanager.purestorageblock.implementation.models.RecoverableVolumeGroupListResult; +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 RecoverableVolumeGroupsClient. + */ +public final class RecoverableVolumeGroupsClientImpl implements RecoverableVolumeGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final RecoverableVolumeGroupsService service; + + /** + * The service client containing this operation class. + */ + private final PureStorageBlockMgmtClientImpl client; + + /** + * Initializes an instance of RecoverableVolumeGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RecoverableVolumeGroupsClientImpl(PureStorageBlockMgmtClientImpl client) { + this.service = RestProxy.create(RecoverableVolumeGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PureStorageBlockMgmtClientRecoverableVolumeGroups to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PureStorageBlockMgmtClientRecoverableVolumeGroups") + public interface RecoverableVolumeGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/recoverableVolumeGroups/{recoverableVolumeGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, + @PathParam("recoverableVolumeGroupName") String recoverableVolumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/recoverableVolumeGroups/{recoverableVolumeGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, + @PathParam("recoverableVolumeGroupName") String recoverableVolumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/recoverableVolumeGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByStoragePool(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/recoverableVolumeGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByStoragePoolSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/recoverableVolumeGroups/{recoverableVolumeGroupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, + @PathParam("recoverableVolumeGroupName") String recoverableVolumeGroupName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/recoverableVolumeGroups/{recoverableVolumeGroupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, + @PathParam("recoverableVolumeGroupName") String recoverableVolumeGroupName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByStoragePoolNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByStoragePoolNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recoverable volume group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String storagePoolName, String recoverableVolumeGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, recoverableVolumeGroupName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recoverable volume group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName) { + return getWithResponseAsync(resourceGroupName, storagePoolName, recoverableVolumeGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @param context The 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 recoverable volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, storagePoolName, recoverableVolumeGroupName, accept, context); + } + + /** + * Get a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recoverable volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecoverableVolumeGroupInner get(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName) { + return getWithResponse(resourceGroupName, storagePoolName, recoverableVolumeGroupName, Context.NONE).getValue(); + } + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 RecoverableVolumeGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByStoragePoolSinglePageAsync(String resourceGroupName, + String storagePoolName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByStoragePool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, 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 recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 RecoverableVolumeGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByStoragePoolAsync(String resourceGroupName, + String storagePoolName) { + return new PagedFlux<>(() -> listByStoragePoolSinglePageAsync(resourceGroupName, storagePoolName), + nextLink -> listByStoragePoolNextSinglePageAsync(nextLink)); + } + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 RecoverableVolumeGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByStoragePoolSinglePage(String resourceGroupName, + String storagePoolName) { + final String accept = "application/json"; + Response res + = service.listByStoragePoolSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param context The 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 RecoverableVolumeGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByStoragePoolSinglePage(String resourceGroupName, + String storagePoolName, Context context) { + final String accept = "application/json"; + Response res + = service.listByStoragePoolSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 RecoverableVolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByStoragePool(String resourceGroupName, + String storagePoolName) { + return new PagedIterable<>(() -> listByStoragePoolSinglePage(resourceGroupName, storagePoolName), + nextLink -> listByStoragePoolNextSinglePage(nextLink)); + } + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param context The 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 RecoverableVolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByStoragePool(String resourceGroupName, + String storagePoolName, Context context) { + return new PagedIterable<>(() -> listByStoragePoolSinglePage(resourceGroupName, storagePoolName, context), + nextLink -> listByStoragePoolNextSinglePage(nextLink, context)); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String recoverableVolumeGroupName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, recoverableVolumeGroupName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, recoverableVolumeGroupName, + Context.NONE); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @param context The 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) + private Response deleteWithResponse(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, recoverableVolumeGroupName, context); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String recoverableVolumeGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, storagePoolName, recoverableVolumeGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String recoverableVolumeGroupName) { + Response response + = deleteWithResponse(resourceGroupName, storagePoolName, recoverableVolumeGroupName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @param context The 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 storagePoolName, + String recoverableVolumeGroupName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, storagePoolName, recoverableVolumeGroupName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 storagePoolName, + String recoverableVolumeGroupName) { + return beginDeleteAsync(resourceGroupName, storagePoolName, recoverableVolumeGroupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 storagePoolName, String recoverableVolumeGroupName) { + beginDelete(resourceGroupName, storagePoolName, recoverableVolumeGroupName).getFinalResult(); + } + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @param context The 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 storagePoolName, String recoverableVolumeGroupName, + Context context) { + beginDelete(resourceGroupName, storagePoolName, recoverableVolumeGroupName, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 RecoverableVolumeGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByStoragePoolNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByStoragePoolNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 RecoverableVolumeGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByStoragePoolNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByStoragePoolNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @param context The 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 RecoverableVolumeGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByStoragePoolNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listByStoragePoolNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupsImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupsImpl.java new file mode 100644 index 000000000000..2f2a5df1bbb7 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupsImpl.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.purestorageblock.fluent.RecoverableVolumeGroupsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.RecoverableVolumeGroupInner; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroups; + +public final class RecoverableVolumeGroupsImpl implements RecoverableVolumeGroups { + private static final ClientLogger LOGGER = new ClientLogger(RecoverableVolumeGroupsImpl.class); + + private final RecoverableVolumeGroupsClient innerClient; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + public RecoverableVolumeGroupsImpl(RecoverableVolumeGroupsClient innerClient, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, storagePoolName, recoverableVolumeGroupName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RecoverableVolumeGroupImpl(inner.getValue(), this.manager())); + } + + public RecoverableVolumeGroup get(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName) { + RecoverableVolumeGroupInner inner + = this.serviceClient().get(resourceGroupName, storagePoolName, recoverableVolumeGroupName); + if (inner != null) { + return new RecoverableVolumeGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName) { + PagedIterable inner + = this.serviceClient().listByStoragePool(resourceGroupName, storagePoolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoverableVolumeGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName, + Context context) { + PagedIterable inner + = this.serviceClient().listByStoragePool(resourceGroupName, storagePoolName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoverableVolumeGroupImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String storagePoolName, String recoverableVolumeGroupName) { + this.serviceClient().delete(resourceGroupName, storagePoolName, recoverableVolumeGroupName); + } + + public void delete(String resourceGroupName, String storagePoolName, String recoverableVolumeGroupName, + Context context) { + this.serviceClient().delete(resourceGroupName, storagePoolName, recoverableVolumeGroupName, context); + } + + private RecoverableVolumeGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationImpl.java index b51c9f4e9040..5d51655f076b 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationImpl.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationImpl.java @@ -9,7 +9,9 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationInner; +import com.azure.resourcemanager.purestorageblock.models.LatestLinkedSaaSResponse; import com.azure.resourcemanager.purestorageblock.models.LimitDetails; +import com.azure.resourcemanager.purestorageblock.models.LinkSaaSRequest; import com.azure.resourcemanager.purestorageblock.models.Reservation; import com.azure.resourcemanager.purestorageblock.models.ReservationBillingStatus; import com.azure.resourcemanager.purestorageblock.models.ReservationBillingUsageReport; @@ -175,6 +177,22 @@ public ReservationBillingUsageReport getBillingReport() { return serviceManager.reservations().getBillingReport(resourceGroupName, reservationName); } + public Reservation linkSaaS(LinkSaaSRequest body) { + return serviceManager.reservations().linkSaaS(resourceGroupName, reservationName, body); + } + + public Reservation linkSaaS(LinkSaaSRequest body, Context context) { + return serviceManager.reservations().linkSaaS(resourceGroupName, reservationName, body, context); + } + + public Response latestLinkedSaaSWithResponse(Context context) { + return serviceManager.reservations().latestLinkedSaaSWithResponse(resourceGroupName, reservationName, context); + } + + public LatestLinkedSaaSResponse latestLinkedSaaS() { + return serviceManager.reservations().latestLinkedSaaS(resourceGroupName, reservationName); + } + public ReservationImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsClientImpl.java index 9ce492057185..573ab27e8edb 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsClientImpl.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsClientImpl.java @@ -35,11 +35,13 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.purestorageblock.fluent.models.LimitDetailsInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingStatusInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingUsageReportInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationInner; import com.azure.resourcemanager.purestorageblock.implementation.models.ReservationListResult; +import com.azure.resourcemanager.purestorageblock.models.LinkSaaSRequest; import com.azure.resourcemanager.purestorageblock.models.ReservationUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -249,6 +251,44 @@ Response getBillingReportSync(@HostParam("en @PathParam("reservationName") String reservationName, @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/linkSaaS") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> linkSaaS(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("reservationName") String reservationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") LinkSaaSRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/linkSaaS") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response linkSaaSSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("reservationName") String reservationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") LinkSaaSRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/latestLinkedSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> latestLinkedSaaS(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("reservationName") String reservationName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/latestLinkedSaaS") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response latestLinkedSaaSSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("reservationName") String reservationName, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -1269,6 +1309,269 @@ public ReservationBillingUsageReportInner getBillingReport(String resourceGroupN return getBillingReportWithResponse(resourceGroupName, reservationName, Context.NONE).getValue(); } + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> linkSaaSWithResponseAsync(String resourceGroupName, String reservationName, + LinkSaaSRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.linkSaaS(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, reservationName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response linkSaaSWithResponse(String resourceGroupName, String reservationName, + LinkSaaSRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, reservationName, contentType, accept, body, + Context.NONE); + } + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response linkSaaSWithResponse(String resourceGroupName, String reservationName, + LinkSaaSRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, reservationName, contentType, accept, body, context); + } + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ReservationInner> beginLinkSaaSAsync(String resourceGroupName, + String reservationName, LinkSaaSRequest body) { + Mono>> mono = linkSaaSWithResponseAsync(resourceGroupName, reservationName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ReservationInner.class, ReservationInner.class, this.client.getContext()); + } + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReservationInner> beginLinkSaaS(String resourceGroupName, + String reservationName, LinkSaaSRequest body) { + Response response = linkSaaSWithResponse(resourceGroupName, reservationName, body); + return this.client.getLroResult(response, ReservationInner.class, + ReservationInner.class, Context.NONE); + } + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ReservationInner> beginLinkSaaS(String resourceGroupName, + String reservationName, LinkSaaSRequest body, Context context) { + Response response = linkSaaSWithResponse(resourceGroupName, reservationName, body, context); + return this.client.getLroResult(response, ReservationInner.class, + ReservationInner.class, context); + } + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono linkSaaSAsync(String resourceGroupName, String reservationName, + LinkSaaSRequest body) { + return beginLinkSaaSAsync(resourceGroupName, reservationName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReservationInner linkSaaS(String resourceGroupName, String reservationName, LinkSaaSRequest body) { + return beginLinkSaaS(resourceGroupName, reservationName, body).getFinalResult(); + } + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ReservationInner linkSaaS(String resourceGroupName, String reservationName, LinkSaaSRequest body, + Context context) { + return beginLinkSaaS(resourceGroupName, reservationName, body, context).getFinalResult(); + } + + /** + * Returns the latest SaaS linked to the reservation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of get latest linked SaaS resource operation along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> latestLinkedSaaSWithResponseAsync(String resourceGroupName, + String reservationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.latestLinkedSaaS(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, reservationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the latest SaaS linked to the reservation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of get latest linked SaaS resource operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono latestLinkedSaaSAsync(String resourceGroupName, + String reservationName) { + return latestLinkedSaaSWithResponseAsync(resourceGroupName, reservationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns the latest SaaS linked to the reservation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param context The 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 response of get latest linked SaaS resource operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response latestLinkedSaaSWithResponse(String resourceGroupName, + String reservationName, Context context) { + final String accept = "application/json"; + return service.latestLinkedSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, reservationName, accept, context); + } + + /** + * Returns the latest SaaS linked to the reservation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of get latest linked SaaS resource operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String reservationName) { + return latestLinkedSaaSWithResponse(resourceGroupName, reservationName, Context.NONE).getValue(); + } + /** * Get the next page of items. * diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsImpl.java index e5cd60e93330..9a7964ecf2fa 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsImpl.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsImpl.java @@ -10,11 +10,14 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.LatestLinkedSaaSResponseInner; import com.azure.resourcemanager.purestorageblock.fluent.models.LimitDetailsInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingStatusInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingUsageReportInner; import com.azure.resourcemanager.purestorageblock.fluent.models.ReservationInner; +import com.azure.resourcemanager.purestorageblock.models.LatestLinkedSaaSResponse; import com.azure.resourcemanager.purestorageblock.models.LimitDetails; +import com.azure.resourcemanager.purestorageblock.models.LinkSaaSRequest; import com.azure.resourcemanager.purestorageblock.models.Reservation; import com.azure.resourcemanager.purestorageblock.models.ReservationBillingStatus; import com.azure.resourcemanager.purestorageblock.models.ReservationBillingUsageReport; @@ -130,6 +133,42 @@ public ReservationBillingUsageReport getBillingReport(String resourceGroupName, } } + public Reservation linkSaaS(String resourceGroupName, String reservationName, LinkSaaSRequest body) { + ReservationInner inner = this.serviceClient().linkSaaS(resourceGroupName, reservationName, body); + if (inner != null) { + return new ReservationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Reservation linkSaaS(String resourceGroupName, String reservationName, LinkSaaSRequest body, + Context context) { + ReservationInner inner = this.serviceClient().linkSaaS(resourceGroupName, reservationName, body, context); + if (inner != null) { + return new ReservationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response latestLinkedSaaSWithResponse(String resourceGroupName, + String reservationName, Context context) { + Response inner + = this.serviceClient().latestLinkedSaaSWithResponse(resourceGroupName, reservationName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LatestLinkedSaaSResponseImpl(inner.getValue(), this.manager())); + } + + public LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String reservationName) { + LatestLinkedSaaSResponseInner inner = this.serviceClient().latestLinkedSaaS(resourceGroupName, reservationName); + if (inner != null) { + return new LatestLinkedSaaSResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public Reservation getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSOperationGroupsClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSOperationGroupsClientImpl.java new file mode 100644 index 000000000000..45848b2efecb --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSOperationGroupsClientImpl.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +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.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.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.BinaryData; +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.purestorageblock.fluent.SaaSOperationGroupsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.purestorageblock.models.ActivateSaaSRequest; +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 SaaSOperationGroupsClient. + */ +public final class SaaSOperationGroupsClientImpl implements SaaSOperationGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SaaSOperationGroupsService service; + + /** + * The service client containing this operation class. + */ + private final PureStorageBlockMgmtClientImpl client; + + /** + * Initializes an instance of SaaSOperationGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SaaSOperationGroupsClientImpl(PureStorageBlockMgmtClientImpl client) { + this.service = RestProxy.create(SaaSOperationGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PureStorageBlockMgmtClientSaaSOperationGroups to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PureStorageBlockMgmtClientSaaSOperationGroups") + public interface SaaSOperationGroupsService { + @Post("/subscriptions/{subscriptionId}/providers/PureStorage.Block/activateSaaS") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> activateResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActivateSaaSRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/providers/PureStorage.Block/activateSaaS") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response activateResourceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActivateSaaSRequest body, Context context); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> activateResourceWithResponseAsync(ActivateSaaSRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.activateResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response activateResourceWithResponse(ActivateSaaSRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.activateResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, body, Context.NONE); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @param context The 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 marketplace SaaS resource details along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response activateResourceWithResponse(ActivateSaaSRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.activateResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, body, context); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SaaSResourceDetailsResponseInner> + beginActivateResourceAsync(ActivateSaaSRequest body) { + Mono>> mono = activateResourceWithResponseAsync(body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SaaSResourceDetailsResponseInner.class, + SaaSResourceDetailsResponseInner.class, this.client.getContext()); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SaaSResourceDetailsResponseInner> + beginActivateResource(ActivateSaaSRequest body) { + Response response = activateResourceWithResponse(body); + return this.client.getLroResult(response, + SaaSResourceDetailsResponseInner.class, SaaSResourceDetailsResponseInner.class, Context.NONE); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @param context The 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 marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SaaSResourceDetailsResponseInner> + beginActivateResource(ActivateSaaSRequest body, Context context) { + Response response = activateResourceWithResponse(body, context); + return this.client.getLroResult(response, + SaaSResourceDetailsResponseInner.class, SaaSResourceDetailsResponseInner.class, context); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono activateResourceAsync(ActivateSaaSRequest body) { + return beginActivateResourceAsync(body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaaSResourceDetailsResponseInner activateResource(ActivateSaaSRequest body) { + return beginActivateResource(body).getFinalResult(); + } + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @param context The 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 marketplace SaaS resource details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaaSResourceDetailsResponseInner activateResource(ActivateSaaSRequest body, Context context) { + return beginActivateResource(body, context).getFinalResult(); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSOperationGroupsImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSOperationGroupsImpl.java new file mode 100644 index 000000000000..792f529c6032 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSOperationGroupsImpl.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.purestorageblock.fluent.SaaSOperationGroupsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.purestorageblock.models.ActivateSaaSRequest; +import com.azure.resourcemanager.purestorageblock.models.SaaSOperationGroups; +import com.azure.resourcemanager.purestorageblock.models.SaaSResourceDetailsResponse; + +public final class SaaSOperationGroupsImpl implements SaaSOperationGroups { + private static final ClientLogger LOGGER = new ClientLogger(SaaSOperationGroupsImpl.class); + + private final SaaSOperationGroupsClient innerClient; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + public SaaSOperationGroupsImpl(SaaSOperationGroupsClient innerClient, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public SaaSResourceDetailsResponse activateResource(ActivateSaaSRequest body) { + SaaSResourceDetailsResponseInner inner = this.serviceClient().activateResource(body); + if (inner != null) { + return new SaaSResourceDetailsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public SaaSResourceDetailsResponse activateResource(ActivateSaaSRequest body, Context context) { + SaaSResourceDetailsResponseInner inner = this.serviceClient().activateResource(body, context); + if (inner != null) { + return new SaaSResourceDetailsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private SaaSOperationGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSResourceDetailsResponseImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSResourceDetailsResponseImpl.java new file mode 100644 index 000000000000..568c5256250d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSResourceDetailsResponseImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.purestorageblock.fluent.models.SaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.purestorageblock.models.SaaSResourceDetailsResponse; + +public final class SaaSResourceDetailsResponseImpl implements SaaSResourceDetailsResponse { + private SaaSResourceDetailsResponseInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + SaaSResourceDetailsResponseImpl(SaaSResourceDetailsResponseInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager 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 saasId() { + return this.innerModel().saasId(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SaaSResourceDetailsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolImpl.java index c3a330e2d3b7..1bc3ddda1a3a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolImpl.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolImpl.java @@ -12,6 +12,9 @@ import com.azure.resourcemanager.purestorageblock.models.AvsConnection; import com.azure.resourcemanager.purestorageblock.models.AvsStatus; import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentity; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleActivationCode; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthConfig; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthResult; import com.azure.resourcemanager.purestorageblock.models.StoragePool; import com.azure.resourcemanager.purestorageblock.models.StoragePoolEnableAvsConnectionPost; import com.azure.resourcemanager.purestorageblock.models.StoragePoolFinalizeAvsConnectionPost; @@ -214,6 +217,25 @@ public void repairAvsConnection(Context context) { serviceManager.storagePools().repairAvsConnection(resourceGroupName, storagePoolName, context); } + public Response listPlatformConsoleActivationCodeWithResponse(Context context) { + return serviceManager.storagePools() + .listPlatformConsoleActivationCodeWithResponse(resourceGroupName, storagePoolName, context); + } + + public PlatformConsoleActivationCode listPlatformConsoleActivationCode() { + return serviceManager.storagePools().listPlatformConsoleActivationCode(resourceGroupName, storagePoolName); + } + + public Response + configurePlatformConsoleAuthWithResponse(PlatformConsoleAuthConfig config, Context context) { + return serviceManager.storagePools() + .configurePlatformConsoleAuthWithResponse(resourceGroupName, storagePoolName, config, context); + } + + public PlatformConsoleAuthResult configurePlatformConsoleAuth(PlatformConsoleAuthConfig config) { + return serviceManager.storagePools().configurePlatformConsoleAuth(resourceGroupName, storagePoolName, config); + } + public StoragePoolImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsClientImpl.java index 1cb7fbb4e4d7..5f0d3af687b5 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsClientImpl.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsClientImpl.java @@ -37,9 +37,12 @@ import com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient; import com.azure.resourcemanager.purestorageblock.fluent.models.AvsConnectionInner; import com.azure.resourcemanager.purestorageblock.fluent.models.AvsStatusInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleActivationCodeInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner; import com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolHealthInfoInner; import com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolInner; import com.azure.resourcemanager.purestorageblock.implementation.models.StoragePoolListResult; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthConfig; import com.azure.resourcemanager.purestorageblock.models.StoragePoolEnableAvsConnectionPost; import com.azure.resourcemanager.purestorageblock.models.StoragePoolFinalizeAvsConnectionPost; import com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdate; @@ -327,6 +330,50 @@ Response repairAvsConnectionSync(@HostParam("endpoint") String endpo @PathParam("resourceGroupName") String resourceGroupName, @PathParam("storagePoolName") String storagePoolName, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/listPlatformConsoleActivationCode") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPlatformConsoleActivationCode( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/listPlatformConsoleActivationCode") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listPlatformConsoleActivationCodeSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/configurePlatformConsoleAuth") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> configurePlatformConsoleAuth( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PlatformConsoleAuthConfig config, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/configurePlatformConsoleAuth") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response configurePlatformConsoleAuthSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PlatformConsoleAuthConfig config, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -1984,6 +2031,162 @@ public void repairAvsConnection(String resourceGroupName, String storagePoolName beginRepairAvsConnection(resourceGroupName, storagePoolName, context).getFinalResult(); } + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return one-time activation code for platform console access along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listPlatformConsoleActivationCodeWithResponseAsync(String resourceGroupName, String storagePoolName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listPlatformConsoleActivationCode(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storagePoolName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return one-time activation code for platform console access on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPlatformConsoleActivationCodeAsync(String resourceGroupName, + String storagePoolName) { + return listPlatformConsoleActivationCodeWithResponseAsync(resourceGroupName, storagePoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param context The 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 one-time activation code for platform console access along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listPlatformConsoleActivationCodeWithResponse( + String resourceGroupName, String storagePoolName, Context context) { + final String accept = "application/json"; + return service.listPlatformConsoleActivationCodeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, accept, context); + } + + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return one-time activation code for platform console access. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PlatformConsoleActivationCodeInner listPlatformConsoleActivationCode(String resourceGroupName, + String storagePoolName) { + return listPlatformConsoleActivationCodeWithResponse(resourceGroupName, storagePoolName, Context.NONE) + .getValue(); + } + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param config Platform console authentication configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base model for platform console authentication result along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> configurePlatformConsoleAuthWithResponseAsync( + String resourceGroupName, String storagePoolName, PlatformConsoleAuthConfig config) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.configurePlatformConsoleAuth(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storagePoolName, + contentType, accept, config, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param config Platform console authentication configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base model for platform console authentication result on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono configurePlatformConsoleAuthAsync(String resourceGroupName, + String storagePoolName, PlatformConsoleAuthConfig config) { + return configurePlatformConsoleAuthWithResponseAsync(resourceGroupName, storagePoolName, config) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param config Platform console authentication configuration. + * @param context The 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 base model for platform console authentication result along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response configurePlatformConsoleAuthWithResponse(String resourceGroupName, + String storagePoolName, PlatformConsoleAuthConfig config, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.configurePlatformConsoleAuthSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, contentType, accept, config, context); + } + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param config Platform console authentication configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base model for platform console authentication result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PlatformConsoleAuthResultInner configurePlatformConsoleAuth(String resourceGroupName, String storagePoolName, + PlatformConsoleAuthConfig config) { + return configurePlatformConsoleAuthWithResponse(resourceGroupName, storagePoolName, config, Context.NONE) + .getValue(); + } + /** * Get the next page of items. * diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsImpl.java index 3fe460e9f6c8..251031fe7956 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsImpl.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsImpl.java @@ -12,10 +12,15 @@ import com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient; import com.azure.resourcemanager.purestorageblock.fluent.models.AvsConnectionInner; import com.azure.resourcemanager.purestorageblock.fluent.models.AvsStatusInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleActivationCodeInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner; import com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolHealthInfoInner; import com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolInner; import com.azure.resourcemanager.purestorageblock.models.AvsConnection; import com.azure.resourcemanager.purestorageblock.models.AvsStatus; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleActivationCode; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthConfig; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthResult; import com.azure.resourcemanager.purestorageblock.models.StoragePool; import com.azure.resourcemanager.purestorageblock.models.StoragePoolEnableAvsConnectionPost; import com.azure.resourcemanager.purestorageblock.models.StoragePoolFinalizeAvsConnectionPost; @@ -167,6 +172,44 @@ public void repairAvsConnection(String resourceGroupName, String storagePoolName this.serviceClient().repairAvsConnection(resourceGroupName, storagePoolName, context); } + public Response listPlatformConsoleActivationCodeWithResponse( + String resourceGroupName, String storagePoolName, Context context) { + Response inner = this.serviceClient() + .listPlatformConsoleActivationCodeWithResponse(resourceGroupName, storagePoolName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PlatformConsoleActivationCodeImpl(inner.getValue(), this.manager())); + } + + public PlatformConsoleActivationCode listPlatformConsoleActivationCode(String resourceGroupName, + String storagePoolName) { + PlatformConsoleActivationCodeInner inner + = this.serviceClient().listPlatformConsoleActivationCode(resourceGroupName, storagePoolName); + if (inner != null) { + return new PlatformConsoleActivationCodeImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response configurePlatformConsoleAuthWithResponse(String resourceGroupName, + String storagePoolName, PlatformConsoleAuthConfig config, Context context) { + Response inner = this.serviceClient() + .configurePlatformConsoleAuthWithResponse(resourceGroupName, storagePoolName, config, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PlatformConsoleAuthResultImpl(inner.getValue(), this.manager())); + } + + public PlatformConsoleAuthResult configurePlatformConsoleAuth(String resourceGroupName, String storagePoolName, + PlatformConsoleAuthConfig config) { + PlatformConsoleAuthResultInner inner + = this.serviceClient().configurePlatformConsoleAuth(resourceGroupName, storagePoolName, config); + if (inner != null) { + return new PlatformConsoleAuthResultImpl(inner, this.manager()); + } else { + return null; + } + } + public StoragePool getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupImpl.java new file mode 100644 index 000000000000..938d7dde3f02 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupImpl.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner; +import com.azure.resourcemanager.purestorageblock.models.ConnectionParametersResponse; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupStatus; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdate; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdateProperties; +import java.util.Collections; +import java.util.Map; + +public final class VolumeGroupImpl implements VolumeGroup, VolumeGroup.Definition, VolumeGroup.Update { + private VolumeGroupInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager 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 VolumeGroupProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public VolumeGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String storagePoolName; + + private String volumeGroupName; + + private VolumeGroupUpdate updateProperties; + + public VolumeGroupImpl withExistingStoragePool(String resourceGroupName, String storagePoolName) { + this.resourceGroupName = resourceGroupName; + this.storagePoolName = storagePoolName; + return this; + } + + public VolumeGroup create() { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .create(resourceGroupName, storagePoolName, volumeGroupName, this.innerModel(), Context.NONE); + return this; + } + + public VolumeGroup create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .create(resourceGroupName, storagePoolName, volumeGroupName, this.innerModel(), context); + return this; + } + + VolumeGroupImpl(String name, com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = new VolumeGroupInner(); + this.serviceManager = serviceManager; + this.volumeGroupName = name; + } + + public VolumeGroupImpl update() { + this.updateProperties = new VolumeGroupUpdate(); + return this; + } + + public VolumeGroup apply() { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .update(resourceGroupName, storagePoolName, volumeGroupName, updateProperties, Context.NONE); + return this; + } + + public VolumeGroup apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .update(resourceGroupName, storagePoolName, volumeGroupName, updateProperties, context); + return this; + } + + VolumeGroupImpl(VolumeGroupInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.storagePoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "storagePools"); + this.volumeGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumeGroups"); + } + + public VolumeGroup refresh() { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, Context.NONE) + .getValue(); + return this; + } + + public VolumeGroup refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroups() + .getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, context) + .getValue(); + return this; + } + + public Response listConnectionParametersWithResponse(Context context) { + return serviceManager.volumeGroups() + .listConnectionParametersWithResponse(resourceGroupName, storagePoolName, volumeGroupName, context); + } + + public ConnectionParametersResponse listConnectionParameters() { + return serviceManager.volumeGroups() + .listConnectionParameters(resourceGroupName, storagePoolName, volumeGroupName); + } + + public Response getStatusWithResponse(Context context) { + return serviceManager.volumeGroups() + .getStatusWithResponse(resourceGroupName, storagePoolName, volumeGroupName, context); + } + + public VolumeGroupStatus getStatus() { + return serviceManager.volumeGroups().getStatus(resourceGroupName, storagePoolName, volumeGroupName); + } + + public void overwrite(VolumeGroupOverwriteRequest body) { + serviceManager.volumeGroups().overwrite(resourceGroupName, storagePoolName, volumeGroupName, body); + } + + public void overwrite(VolumeGroupOverwriteRequest body, Context context) { + serviceManager.volumeGroups().overwrite(resourceGroupName, storagePoolName, volumeGroupName, body, context); + } + + public VolumeGroupImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public VolumeGroupImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public VolumeGroupImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public VolumeGroupImpl withProperties(VolumeGroupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public VolumeGroupImpl withProperties(VolumeGroupUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotImpl.java new file mode 100644 index 000000000000..7d39aee6db67 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotImpl.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshot; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotProperties; + +public final class VolumeGroupSnapshotImpl implements VolumeGroupSnapshot, VolumeGroupSnapshot.Definition { + private VolumeGroupSnapshotInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + VolumeGroupSnapshotImpl(VolumeGroupSnapshotInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager 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 VolumeGroupSnapshotProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public VolumeGroupSnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String storagePoolName; + + private String volumeGroupName; + + private String snapshotName; + + public VolumeGroupSnapshotImpl withExistingVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + this.resourceGroupName = resourceGroupName; + this.storagePoolName = storagePoolName; + this.volumeGroupName = volumeGroupName; + return this; + } + + public VolumeGroupSnapshot create() { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroupSnapshots() + .create(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, this.innerModel(), Context.NONE); + return this; + } + + public VolumeGroupSnapshot create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroupSnapshots() + .create(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, this.innerModel(), context); + return this; + } + + VolumeGroupSnapshotImpl(String name, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = new VolumeGroupSnapshotInner(); + this.serviceManager = serviceManager; + this.snapshotName = name; + } + + public VolumeGroupSnapshot refresh() { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroupSnapshots() + .getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, Context.NONE) + .getValue(); + return this; + } + + public VolumeGroupSnapshot refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVolumeGroupSnapshots() + .getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, context) + .getValue(); + return this; + } + + public VolumeGroupSnapshotImpl withProperties(VolumeGroupSnapshotProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotPostListResultImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotPostListResultImpl.java new file mode 100644 index 000000000000..2779eb264d14 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotPostListResultImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotPostListResultInner; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshot; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotPostListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class VolumeGroupSnapshotPostListResultImpl implements VolumeGroupSnapshotPostListResult { + private VolumeGroupSnapshotPostListResultInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + VolumeGroupSnapshotPostListResultImpl(VolumeGroupSnapshotPostListResultInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new VolumeGroupSnapshotImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Integer count() { + return this.innerModel().count(); + } + + public Integer totalCount() { + return this.innerModel().totalCount(); + } + + public VolumeGroupSnapshotPostListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotsClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotsClientImpl.java new file mode 100644 index 000000000000..5d878b51ea34 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotsClientImpl.java @@ -0,0 +1,991 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.BinaryData; +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.purestorageblock.fluent.VolumeGroupSnapshotsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotPostListResultInner; +import com.azure.resourcemanager.purestorageblock.implementation.models.VolumeGroupSnapshotListResult; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotListRequest; +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 VolumeGroupSnapshotsClient. + */ +public final class VolumeGroupSnapshotsClientImpl implements VolumeGroupSnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final VolumeGroupSnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final PureStorageBlockMgmtClientImpl client; + + /** + * Initializes an instance of VolumeGroupSnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VolumeGroupSnapshotsClientImpl(PureStorageBlockMgmtClientImpl client) { + this.service = RestProxy.create(VolumeGroupSnapshotsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PureStorageBlockMgmtClientVolumeGroupSnapshots to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PureStorageBlockMgmtClientVolumeGroupSnapshots") + public interface VolumeGroupSnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/snapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/snapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/snapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VolumeGroupSnapshotInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/snapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VolumeGroupSnapshotInner resource, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/snapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("snapshotName") String snapshotName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/snapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("snapshotName") String snapshotName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVolumeGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @QueryParam("$filter") String filter, @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/snapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVolumeGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @QueryParam("$filter") String filter, @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/listSnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSnapshots(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumeGroupSnapshotListRequest properties, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/listSnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSnapshotsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumeGroupSnapshotListRequest properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVolumeGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVolumeGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume group snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, String snapshotName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, snapshotName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume group snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName) { + return getWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, snapshotName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @param context The 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 volume group snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, storagePoolName, volumeGroupName, snapshotName, accept, context); + } + + /** + * Get a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume group snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupSnapshotInner get(String resourceGroupName, String storagePoolName, String volumeGroupName, + String snapshotName) { + return getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, Context.NONE) + .getValue(); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, VolumeGroupSnapshotInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, snapshotName, + contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, VolumeGroupSnapshotInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, snapshotName, + contentType, accept, resource, Context.NONE); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, VolumeGroupSnapshotInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, snapshotName, + contentType, accept, resource, context); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeGroupSnapshotInner> beginCreateAsync( + String resourceGroupName, String storagePoolName, String volumeGroupName, String snapshotName, + VolumeGroupSnapshotInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VolumeGroupSnapshotInner.class, VolumeGroupSnapshotInner.class, + this.client.getContext()); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeGroupSnapshotInner> beginCreate( + String resourceGroupName, String storagePoolName, String volumeGroupName, String snapshotName, + VolumeGroupSnapshotInner resource) { + Response response + = createWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, resource); + return this.client.getLroResult(response, + VolumeGroupSnapshotInner.class, VolumeGroupSnapshotInner.class, Context.NONE); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeGroupSnapshotInner> beginCreate( + String resourceGroupName, String storagePoolName, String volumeGroupName, String snapshotName, + VolumeGroupSnapshotInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, resource, context); + return this.client.getLroResult(response, + VolumeGroupSnapshotInner.class, VolumeGroupSnapshotInner.class, context); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, VolumeGroupSnapshotInner resource) { + return beginCreateAsync(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupSnapshotInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + String snapshotName, VolumeGroupSnapshotInner resource) { + return beginCreate(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, resource) + .getFinalResult(); + } + + /** + * Create a manual snapshot of a volume group, or recover from an existing snapshot by providing + * sourceSnapshotResourceId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 a snapshot of a volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupSnapshotInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + String snapshotName, VolumeGroupSnapshotInner resource, Context context) { + return beginCreate(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, resource, context) + .getFinalResult(); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName, String snapshotName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, snapshotName, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, snapshotName, + Context.NONE); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @param context The 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) + private Response deleteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, snapshotName, + context); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName, String snapshotName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, snapshotName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName, String snapshotName) { + Response response + = deleteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @param context The 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 storagePoolName, + String volumeGroupName, String snapshotName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 storagePoolName, String volumeGroupName, + String snapshotName) { + return beginDeleteAsync(resourceGroupName, storagePoolName, volumeGroupName, snapshotName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 storagePoolName, String volumeGroupName, String snapshotName) { + beginDelete(resourceGroupName, storagePoolName, volumeGroupName, snapshotName).getFinalResult(); + } + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @param context The 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 storagePoolName, String volumeGroupName, String snapshotName, + Context context) { + beginDelete(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, context).getFinalResult(); + } + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param filter OData filter expression (e.g. $filter=substringof('sna', name) and space/unique gt 1000). + * @param orderby OData order-by expression (e.g. $orderby=name asc). + * @param top Maximum number of results to return per page. + * @param skip Number of results to skip (page offset). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged list result for volume group snapshots along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVolumeGroupSinglePageAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, String filter, String orderby, Integer top, Integer skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVolumeGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, filter, orderby, + top, skip, 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 snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param filter OData filter expression (e.g. $filter=substringof('sna', name) and space/unique gt 1000). + * @param orderby OData order-by expression (e.g. $orderby=name asc). + * @param top Maximum number of results to return per page. + * @param skip Number of results to skip (page offset). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged list result for volume group snapshots as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVolumeGroupAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, String filter, String orderby, Integer top, Integer skip) { + return new PagedFlux<>(() -> listByVolumeGroupSinglePageAsync(resourceGroupName, storagePoolName, + volumeGroupName, filter, orderby, top, skip), nextLink -> listByVolumeGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged list result for volume group snapshots as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVolumeGroupAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final Integer skip = null; + return new PagedFlux<>(() -> listByVolumeGroupSinglePageAsync(resourceGroupName, storagePoolName, + volumeGroupName, filter, orderby, top, skip), nextLink -> listByVolumeGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param filter OData filter expression (e.g. $filter=substringof('sna', name) and space/unique gt 1000). + * @param orderby OData order-by expression (e.g. $orderby=name asc). + * @param top Maximum number of results to return per page. + * @param skip Number of results to skip (page offset). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged list result for volume group snapshots along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVolumeGroupSinglePage(String resourceGroupName, + String storagePoolName, String volumeGroupName, String filter, String orderby, Integer top, Integer skip) { + final String accept = "application/json"; + Response res = service.listByVolumeGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storagePoolName, + volumeGroupName, filter, orderby, top, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param filter OData filter expression (e.g. $filter=substringof('sna', name) and space/unique gt 1000). + * @param orderby OData order-by expression (e.g. $orderby=name asc). + * @param top Maximum number of results to return per page. + * @param skip Number of results to skip (page offset). + * @param context The 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 paged list result for volume group snapshots along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVolumeGroupSinglePage(String resourceGroupName, + String storagePoolName, String volumeGroupName, String filter, String orderby, Integer top, Integer skip, + Context context) { + final String accept = "application/json"; + Response res = service.listByVolumeGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storagePoolName, + volumeGroupName, filter, orderby, top, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged list result for volume group snapshots as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final Integer skip = null; + return new PagedIterable<>(() -> listByVolumeGroupSinglePage(resourceGroupName, storagePoolName, + volumeGroupName, filter, orderby, top, skip), nextLink -> listByVolumeGroupNextSinglePage(nextLink)); + } + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param filter OData filter expression (e.g. $filter=substringof('sna', name) and space/unique gt 1000). + * @param orderby OData order-by expression (e.g. $orderby=name asc). + * @param top Maximum number of results to return per page. + * @param skip Number of results to skip (page offset). + * @param context The 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 paged list result for volume group snapshots as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName, String filter, String orderby, Integer top, Integer skip, Context context) { + return new PagedIterable<>(() -> listByVolumeGroupSinglePage(resourceGroupName, storagePoolName, + volumeGroupName, filter, orderby, top, skip, context), + nextLink -> listByVolumeGroupNextSinglePage(nextLink, context)); + } + + /** + * List all snapshots for a given volume group using POST with the same request and response contract. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties Snapshot list 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 list result for volume group snapshots returned by the listSnapshots POST action along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsWithResponseAsync( + String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupSnapshotListRequest properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSnapshots(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, + accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all snapshots for a given volume group using POST with the same request and response contract. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties Snapshot list 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 list result for volume group snapshots returned by the listSnapshots POST action on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSnapshotsAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupSnapshotListRequest properties) { + return listSnapshotsWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all snapshots for a given volume group using POST with the same request and response contract. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties Snapshot list 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 list result for volume group snapshots returned by the listSnapshots POST action along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSnapshotsWithResponse(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupSnapshotListRequest properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.listSnapshotsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, accept, + properties, context); + } + + /** + * List all snapshots for a given volume group using POST with the same request and response contract. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties Snapshot list 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 list result for volume group snapshots returned by the listSnapshots POST action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupSnapshotPostListResultInner listSnapshots(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupSnapshotListRequest properties) { + return listSnapshotsWithResponse(resourceGroupName, storagePoolName, volumeGroupName, properties, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged list result for volume group snapshots along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVolumeGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVolumeGroupNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged list result for volume group snapshots along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVolumeGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByVolumeGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @param context The 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 paged list result for volume group snapshots along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVolumeGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByVolumeGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotsImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotsImpl.java new file mode 100644 index 000000000000..64b8aeebc401 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotsImpl.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.purestorageblock.fluent.VolumeGroupSnapshotsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotPostListResultInner; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshot; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotListRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotPostListResult; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshots; + +public final class VolumeGroupSnapshotsImpl implements VolumeGroupSnapshots { + private static final ClientLogger LOGGER = new ClientLogger(VolumeGroupSnapshotsImpl.class); + + private final VolumeGroupSnapshotsClient innerClient; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + public VolumeGroupSnapshotsImpl(VolumeGroupSnapshotsClient innerClient, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VolumeGroupSnapshotImpl(inner.getValue(), this.manager())); + } + + public VolumeGroupSnapshot get(String resourceGroupName, String storagePoolName, String volumeGroupName, + String snapshotName) { + VolumeGroupSnapshotInner inner + = this.serviceClient().get(resourceGroupName, storagePoolName, volumeGroupName, snapshotName); + if (inner != null) { + return new VolumeGroupSnapshotImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String storagePoolName, String volumeGroupName, String snapshotName) { + this.serviceClient().delete(resourceGroupName, storagePoolName, volumeGroupName, snapshotName); + } + + public void delete(String resourceGroupName, String storagePoolName, String volumeGroupName, String snapshotName, + Context context) { + this.serviceClient().delete(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, context); + } + + public PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + PagedIterable inner + = this.serviceClient().listByVolumeGroup(resourceGroupName, storagePoolName, volumeGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeGroupSnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName, String filter, String orderby, Integer top, Integer skip, Context context) { + PagedIterable inner = this.serviceClient() + .listByVolumeGroup(resourceGroupName, storagePoolName, volumeGroupName, filter, orderby, top, skip, + context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeGroupSnapshotImpl(inner1, this.manager())); + } + + public Response listSnapshotsWithResponse(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupSnapshotListRequest properties, Context context) { + Response inner = this.serviceClient() + .listSnapshotsWithResponse(resourceGroupName, storagePoolName, volumeGroupName, properties, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VolumeGroupSnapshotPostListResultImpl(inner.getValue(), this.manager())); + } + + public VolumeGroupSnapshotPostListResult listSnapshots(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupSnapshotListRequest properties) { + VolumeGroupSnapshotPostListResultInner inner + = this.serviceClient().listSnapshots(resourceGroupName, storagePoolName, volumeGroupName, properties); + if (inner != null) { + return new VolumeGroupSnapshotPostListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public VolumeGroupSnapshot 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + return this.getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + this.delete(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); + } + this.delete(resourceGroupName, storagePoolName, volumeGroupName, snapshotName, context); + } + + private VolumeGroupSnapshotsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } + + public VolumeGroupSnapshotImpl define(String name) { + return new VolumeGroupSnapshotImpl(name, this.manager()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupStatusImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupStatusImpl.java new file mode 100644 index 000000000000..cbe094af6e31 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupStatusImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupStatusInner; +import com.azure.resourcemanager.purestorageblock.models.Space; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupStatus; + +public final class VolumeGroupStatusImpl implements VolumeGroupStatus { + private VolumeGroupStatusInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + VolumeGroupStatusImpl(VolumeGroupStatusInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Space space() { + return this.innerModel().space(); + } + + public int connectedHostCount() { + return this.innerModel().connectedHostCount(); + } + + public VolumeGroupStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsClientImpl.java new file mode 100644 index 000000000000..0b37b0fce84e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsClientImpl.java @@ -0,0 +1,1384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.BinaryData; +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.purestorageblock.fluent.VolumeGroupsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.ConnectionParametersResponseInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupStatusInner; +import com.azure.resourcemanager.purestorageblock.implementation.models.VolumeGroupListResult; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdate; +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 VolumeGroupsClient. + */ +public final class VolumeGroupsClientImpl implements VolumeGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final VolumeGroupsService service; + + /** + * The service client containing this operation class. + */ + private final PureStorageBlockMgmtClientImpl client; + + /** + * Initializes an instance of VolumeGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VolumeGroupsClientImpl(PureStorageBlockMgmtClientImpl client) { + this.service + = RestProxy.create(VolumeGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PureStorageBlockMgmtClientVolumeGroups to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PureStorageBlockMgmtClientVolumeGroups") + public interface VolumeGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumeGroupInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumeGroupInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumeGroupUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VolumeGroupUpdate properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByStoragePool(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByStoragePoolSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/listConnectionParameters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listConnectionParameters( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/listConnectionParameters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listConnectionParametersSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getStatusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/overwrite") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> overwrite(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") VolumeGroupOverwriteRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/overwrite") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response overwriteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") VolumeGroupOverwriteRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByStoragePoolNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByStoragePoolNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String storagePoolName, String volumeGroupName) { + return getWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param context The 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 volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, storagePoolName, volumeGroupName, accept, context); + } + + /** + * Get a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupInner get(String resourceGroupName, String storagePoolName, String volumeGroupName) { + return getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, Context.NONE).getValue(); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, + accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, accept, + resource, Context.NONE); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, accept, + resource, context); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeGroupInner> beginCreateAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VolumeGroupInner.class, VolumeGroupInner.class, this.client.getContext()); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeGroupInner> beginCreate(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupInner resource) { + Response response + = createWithResponse(resourceGroupName, storagePoolName, volumeGroupName, resource); + return this.client.getLroResult(response, VolumeGroupInner.class, + VolumeGroupInner.class, Context.NONE); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeGroupInner> beginCreate(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, storagePoolName, volumeGroupName, resource, context); + return this.client.getLroResult(response, VolumeGroupInner.class, + VolumeGroupInner.class, context); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupInner resource) { + return beginCreateAsync(resourceGroupName, storagePoolName, volumeGroupName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupInner resource) { + return beginCreate(resourceGroupName, storagePoolName, volumeGroupName, resource).getFinalResult(); + } + + /** + * Create a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupInner resource, Context context) { + return beginCreate(resourceGroupName, storagePoolName, volumeGroupName, resource, context).getFinalResult(); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 volume Group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, + accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 volume Group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, accept, + properties, Context.NONE); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 volume Group resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupUpdate properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, accept, + properties, context); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 the {@link PollerFlux} for polling of volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeGroupInner> beginUpdateAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VolumeGroupInner.class, VolumeGroupInner.class, this.client.getContext()); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 the {@link SyncPoller} for polling of volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeGroupInner> beginUpdate(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupUpdate properties) { + Response response + = updateWithResponse(resourceGroupName, storagePoolName, volumeGroupName, properties); + return this.client.getLroResult(response, VolumeGroupInner.class, + VolumeGroupInner.class, Context.NONE); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 the {@link SyncPoller} for polling of volume Group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeGroupInner> beginUpdate(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupUpdate properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, storagePoolName, volumeGroupName, properties, context); + return this.client.getLroResult(response, VolumeGroupInner.class, + VolumeGroupInner.class, context); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 volume Group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupUpdate properties) { + return beginUpdateAsync(resourceGroupName, storagePoolName, volumeGroupName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupInner update(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupUpdate properties) { + return beginUpdate(resourceGroupName, storagePoolName, volumeGroupName, properties).getFinalResult(); + } + + /** + * Update a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties The resource properties 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 volume Group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupInner update(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupUpdate properties, Context context) { + return beginUpdate(resourceGroupName, storagePoolName, volumeGroupName, properties, context).getFinalResult(); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, Context.NONE); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param context The 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) + private Response deleteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, context); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName) { + Response response = deleteWithResponse(resourceGroupName, storagePoolName, volumeGroupName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param context The 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 storagePoolName, + String volumeGroupName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 storagePoolName, String volumeGroupName) { + return beginDeleteAsync(resourceGroupName, storagePoolName, volumeGroupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 storagePoolName, String volumeGroupName) { + beginDelete(resourceGroupName, storagePoolName, volumeGroupName).getFinalResult(); + } + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param context The 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 storagePoolName, String volumeGroupName, Context context) { + beginDelete(resourceGroupName, storagePoolName, volumeGroupName, context).getFinalResult(); + } + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 VolumeGroup list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByStoragePoolSinglePageAsync(String resourceGroupName, + String storagePoolName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByStoragePool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, 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 volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 VolumeGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByStoragePoolAsync(String resourceGroupName, String storagePoolName) { + return new PagedFlux<>(() -> listByStoragePoolSinglePageAsync(resourceGroupName, storagePoolName), + nextLink -> listByStoragePoolNextSinglePageAsync(nextLink)); + } + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 VolumeGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByStoragePoolSinglePage(String resourceGroupName, + String storagePoolName) { + final String accept = "application/json"; + Response res + = service.listByStoragePoolSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param context The 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 VolumeGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByStoragePoolSinglePage(String resourceGroupName, + String storagePoolName, Context context) { + final String accept = "application/json"; + Response res + = service.listByStoragePoolSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 VolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName) { + return new PagedIterable<>(() -> listByStoragePoolSinglePage(resourceGroupName, storagePoolName), + nextLink -> listByStoragePoolNextSinglePage(nextLink)); + } + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param context The 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 VolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName, + Context context) { + return new PagedIterable<>(() -> listByStoragePoolSinglePage(resourceGroupName, storagePoolName, context), + nextLink -> listByStoragePoolNextSinglePage(nextLink, context)); + } + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return connection parameters for ISCSI connection to the volume group along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConnectionParametersWithResponseAsync( + String resourceGroupName, String storagePoolName, String volumeGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listConnectionParameters(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storagePoolName, + volumeGroupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return connection parameters for ISCSI connection to the volume group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listConnectionParametersAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName) { + return listConnectionParametersWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param context The 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 connection parameters for ISCSI connection to the volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listConnectionParametersWithResponse(String resourceGroupName, + String storagePoolName, String volumeGroupName, Context context) { + final String accept = "application/json"; + return service.listConnectionParametersSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, accept, context); + } + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return connection parameters for ISCSI connection to the volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectionParametersResponseInner listConnectionParameters(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + return listConnectionParametersWithResponse(resourceGroupName, storagePoolName, volumeGroupName, Context.NONE) + .getValue(); + } + + /** + * Get current status and space information of the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return current status and space information of the volume group along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStatusWithResponseAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getStatus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get current status and space information of the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return current status and space information of the volume group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getStatusAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + return getStatusWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get current status and space information of the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param context The 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 current status and space information of the volume group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getStatusWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context) { + final String accept = "application/json"; + return service.getStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, accept, context); + } + + /** + * Get current status and space information of the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return current status and space information of the volume group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeGroupStatusInner getStatus(String resourceGroupName, String storagePoolName, String volumeGroupName) { + return getStatusWithResponse(resourceGroupName, storagePoolName, volumeGroupName, Context.NONE).getValue(); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> overwriteWithResponseAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupOverwriteRequest body) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.overwrite(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response overwriteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupOverwriteRequest body) { + final String contentType = "application/json"; + return service.overwriteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, body, + Context.NONE); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response overwriteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupOverwriteRequest body, Context context) { + final String contentType = "application/json"; + return service.overwriteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, contentType, body, + context); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginOverwriteAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupOverwriteRequest body) { + Mono>> mono + = overwriteWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginOverwrite(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupOverwriteRequest body) { + Response response + = overwriteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginOverwrite(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupOverwriteRequest body, Context context) { + Response response + = overwriteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono overwriteAsync(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body) { + return beginOverwriteAsync(resourceGroupName, storagePoolName, volumeGroupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body) { + beginOverwrite(resourceGroupName, storagePoolName, volumeGroupName, body).getFinalResult(); + } + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body, Context context) { + beginOverwrite(resourceGroupName, storagePoolName, volumeGroupName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 VolumeGroup list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByStoragePoolNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByStoragePoolNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 VolumeGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByStoragePoolNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByStoragePoolNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @param context The 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 VolumeGroup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByStoragePoolNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByStoragePoolNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsImpl.java new file mode 100644 index 000000000000..ca593639f43d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsImpl.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.purestorageblock.fluent.VolumeGroupsClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.ConnectionParametersResponseInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupStatusInner; +import com.azure.resourcemanager.purestorageblock.models.ConnectionParametersResponse; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupStatus; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroups; + +public final class VolumeGroupsImpl implements VolumeGroups { + private static final ClientLogger LOGGER = new ClientLogger(VolumeGroupsImpl.class); + + private final VolumeGroupsClient innerClient; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + public VolumeGroupsImpl(VolumeGroupsClient innerClient, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VolumeGroupImpl(inner.getValue(), this.manager())); + } + + public VolumeGroup get(String resourceGroupName, String storagePoolName, String volumeGroupName) { + VolumeGroupInner inner = this.serviceClient().get(resourceGroupName, storagePoolName, volumeGroupName); + if (inner != null) { + return new VolumeGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String storagePoolName, String volumeGroupName) { + this.serviceClient().delete(resourceGroupName, storagePoolName, volumeGroupName); + } + + public void delete(String resourceGroupName, String storagePoolName, String volumeGroupName, Context context) { + this.serviceClient().delete(resourceGroupName, storagePoolName, volumeGroupName, context); + } + + public PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName) { + PagedIterable inner + = this.serviceClient().listByStoragePool(resourceGroupName, storagePoolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName, + Context context) { + PagedIterable inner + = this.serviceClient().listByStoragePool(resourceGroupName, storagePoolName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeGroupImpl(inner1, this.manager())); + } + + public Response listConnectionParametersWithResponse(String resourceGroupName, + String storagePoolName, String volumeGroupName, Context context) { + Response inner = this.serviceClient() + .listConnectionParametersWithResponse(resourceGroupName, storagePoolName, volumeGroupName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ConnectionParametersResponseImpl(inner.getValue(), this.manager())); + } + + public ConnectionParametersResponse listConnectionParameters(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + ConnectionParametersResponseInner inner + = this.serviceClient().listConnectionParameters(resourceGroupName, storagePoolName, volumeGroupName); + if (inner != null) { + return new ConnectionParametersResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getStatusWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context) { + Response inner + = this.serviceClient().getStatusWithResponse(resourceGroupName, storagePoolName, volumeGroupName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VolumeGroupStatusImpl(inner.getValue(), this.manager())); + } + + public VolumeGroupStatus getStatus(String resourceGroupName, String storagePoolName, String volumeGroupName) { + VolumeGroupStatusInner inner + = this.serviceClient().getStatus(resourceGroupName, storagePoolName, volumeGroupName); + if (inner != null) { + return new VolumeGroupStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body) { + this.serviceClient().overwrite(resourceGroupName, storagePoolName, volumeGroupName, body); + } + + public void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body, Context context) { + this.serviceClient().overwrite(resourceGroupName, storagePoolName, volumeGroupName, body, context); + } + + public VolumeGroup 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + return this.getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + return this.getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + this.delete(resourceGroupName, storagePoolName, volumeGroupName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + this.delete(resourceGroupName, storagePoolName, volumeGroupName, context); + } + + private VolumeGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } + + public VolumeGroupImpl define(String name) { + return new VolumeGroupImpl(name, this.manager()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeImpl.java new file mode 100644 index 000000000000..cf0fcc7fc0cc --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeImpl.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner; +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +import com.azure.resourcemanager.purestorageblock.models.Volume; +import com.azure.resourcemanager.purestorageblock.models.VolumeOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdate; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdateProperties; + +public final class VolumeImpl implements Volume, Volume.Definition, Volume.Update { + private VolumeInner innerObject; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public AzureVolumeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public VolumeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String storagePoolName; + + private String volumeGroupName; + + private String volumeName; + + private VolumeUpdate updateProperties; + + public VolumeImpl withExistingVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + this.resourceGroupName = resourceGroupName; + this.storagePoolName = storagePoolName; + this.volumeGroupName = volumeGroupName; + return this; + } + + public Volume create() { + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .create(resourceGroupName, storagePoolName, volumeGroupName, volumeName, this.innerModel(), Context.NONE); + return this; + } + + public Volume create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .create(resourceGroupName, storagePoolName, volumeGroupName, volumeName, this.innerModel(), context); + return this; + } + + VolumeImpl(String name, com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = new VolumeInner(); + this.serviceManager = serviceManager; + this.volumeName = name; + } + + public VolumeImpl update() { + this.updateProperties = new VolumeUpdate(); + return this; + } + + public Volume apply() { + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .update(resourceGroupName, storagePoolName, volumeGroupName, volumeName, updateProperties, Context.NONE); + return this; + } + + public Volume apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .update(resourceGroupName, storagePoolName, volumeGroupName, volumeName, updateProperties, context); + return this; + } + + VolumeImpl(VolumeInner innerObject, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.storagePoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "storagePools"); + this.volumeGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumeGroups"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumes"); + } + + public Volume refresh() { + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, Context.NONE) + .getValue(); + return this; + } + + public Volume refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVolumes() + .getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, context) + .getValue(); + return this; + } + + public void overwrite(VolumeOverwriteRequest body) { + serviceManager.volumes().overwrite(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body); + } + + public void overwrite(VolumeOverwriteRequest body, Context context) { + serviceManager.volumes() + .overwrite(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body, context); + } + + public VolumeImpl withProperties(AzureVolumeProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public VolumeImpl withProperties(VolumeUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesClientImpl.java new file mode 100644 index 000000000000..3580a63f1981 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesClientImpl.java @@ -0,0 +1,1288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.BinaryData; +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.purestorageblock.fluent.VolumesClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner; +import com.azure.resourcemanager.purestorageblock.implementation.models.VolumeListResult; +import com.azure.resourcemanager.purestorageblock.models.VolumeOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdate; +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 VolumesClient. + */ +public final class VolumesClientImpl implements VolumesClient { + /** + * The proxy service used to perform REST calls. + */ + private final VolumesService service; + + /** + * The service client containing this operation class. + */ + private final PureStorageBlockMgmtClientImpl client; + + /** + * Initializes an instance of VolumesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VolumesClientImpl(PureStorageBlockMgmtClientImpl client) { + this.service = RestProxy.create(VolumesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PureStorageBlockMgmtClientVolumes to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PureStorageBlockMgmtClientVolumes") + public interface VolumesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VolumeInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VolumeInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VolumeUpdate properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") VolumeUpdate properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVolumeGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVolumeGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}/overwrite") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> overwrite(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") VolumeOverwriteRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/volumeGroups/{volumeGroupName}/volumes/{volumeName}/overwrite") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response overwriteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("storagePoolName") String storagePoolName, @PathParam("volumeGroupName") String volumeGroupName, + @PathParam("volumeName") String volumeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") VolumeOverwriteRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVolumeGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVolumeGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName) { + return getWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param context The 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 volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, storagePoolName, volumeGroupName, volumeName, accept, context); + } + + /** + * Get a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeInner get(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName) { + return getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, Context.NONE) + .getValue(); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeInner resource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, accept, resource, Context.NONE); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeInner resource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, accept, resource, context); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeInner> beginCreateAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, String volumeName, VolumeInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VolumeInner.class, VolumeInner.class, this.client.getContext()); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeInner> beginCreate(String resourceGroupName, + String storagePoolName, String volumeGroupName, String volumeName, VolumeInner resource) { + Response response + = createWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, resource); + return this.client.getLroResult(response, VolumeInner.class, VolumeInner.class, + Context.NONE); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeInner> beginCreate(String resourceGroupName, + String storagePoolName, String volumeGroupName, String volumeName, VolumeInner resource, Context context) { + Response response + = createWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, resource, context); + return this.client.getLroResult(response, VolumeInner.class, VolumeInner.class, + context); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, VolumeInner resource) { + return beginCreateAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, VolumeInner resource) { + return beginCreate(resourceGroupName, storagePoolName, volumeGroupName, volumeName, resource).getFinalResult(); + } + + /** + * Create a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeInner create(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, VolumeInner resource, Context context) { + return beginCreate(resourceGroupName, storagePoolName, volumeGroupName, volumeName, resource, context) + .getFinalResult(); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 azure Volume resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 azure Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeUpdate properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, accept, properties, Context.NONE); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 azure Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeUpdate properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, accept, properties, context); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 the {@link PollerFlux} for polling of azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VolumeInner> beginUpdateAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, String volumeName, VolumeUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + VolumeInner.class, VolumeInner.class, this.client.getContext()); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 the {@link SyncPoller} for polling of azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeInner> beginUpdate(String resourceGroupName, + String storagePoolName, String volumeGroupName, String volumeName, VolumeUpdate properties) { + Response response + = updateWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, properties); + return this.client.getLroResult(response, VolumeInner.class, VolumeInner.class, + Context.NONE); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 the {@link SyncPoller} for polling of azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VolumeInner> beginUpdate(String resourceGroupName, + String storagePoolName, String volumeGroupName, String volumeName, VolumeUpdate properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, properties, context); + return this.client.getLroResult(response, VolumeInner.class, VolumeInner.class, + context); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 azure Volume resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, VolumeUpdate properties) { + return beginUpdateAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeInner update(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, VolumeUpdate properties) { + return beginUpdate(resourceGroupName, storagePoolName, volumeGroupName, volumeName, properties) + .getFinalResult(); + } + + /** + * Update a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param properties The resource properties 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 azure Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VolumeInner update(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, VolumeUpdate properties, Context context) { + return beginUpdate(resourceGroupName, storagePoolName, volumeGroupName, volumeName, properties, context) + .getFinalResult(); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName, String volumeName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + Context.NONE); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param context The 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) + private Response deleteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, context); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName, String volumeName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 storagePoolName, + String volumeGroupName, String volumeName) { + Response response + = deleteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param context The 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 storagePoolName, + String volumeGroupName, String volumeName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 storagePoolName, String volumeGroupName, + String volumeName) { + return beginDeleteAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 storagePoolName, String volumeGroupName, String volumeName) { + beginDelete(resourceGroupName, storagePoolName, volumeGroupName, volumeName).getFinalResult(); + } + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param context The 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 storagePoolName, String volumeGroupName, String volumeName, + Context context) { + beginDelete(resourceGroupName, storagePoolName, volumeGroupName, volumeName, context).getFinalResult(); + } + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Volume list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVolumeGroupSinglePageAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVolumeGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, 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 volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Volume list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVolumeGroupAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + return new PagedFlux<>( + () -> listByVolumeGroupSinglePageAsync(resourceGroupName, storagePoolName, volumeGroupName), + nextLink -> listByVolumeGroupNextSinglePageAsync(nextLink)); + } + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Volume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVolumeGroupSinglePage(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + final String accept = "application/json"; + Response res = service.listByVolumeGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, storagePoolName, + volumeGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param context The 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 Volume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVolumeGroupSinglePage(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context) { + final String accept = "application/json"; + Response res + = service.listByVolumeGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Volume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + return new PagedIterable<>( + () -> listByVolumeGroupSinglePage(resourceGroupName, storagePoolName, volumeGroupName), + nextLink -> listByVolumeGroupNextSinglePage(nextLink)); + } + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param context The 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 Volume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context) { + return new PagedIterable<>( + () -> listByVolumeGroupSinglePage(resourceGroupName, storagePoolName, volumeGroupName, context), + nextLink -> listByVolumeGroupNextSinglePage(nextLink, context)); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> overwriteWithResponseAsync(String resourceGroupName, + String storagePoolName, String volumeGroupName, String volumeName, VolumeOverwriteRequest body) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.overwrite(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response overwriteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeOverwriteRequest body) { + final String contentType = "application/json"; + return service.overwriteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, body, Context.NONE); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response overwriteWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeOverwriteRequest body, Context context) { + final String contentType = "application/json"; + return service.overwriteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, storagePoolName, volumeGroupName, volumeName, + contentType, body, context); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginOverwriteAsync(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeOverwriteRequest body) { + Mono>> mono + = overwriteWithResponseAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginOverwrite(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeOverwriteRequest body) { + Response response + = overwriteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginOverwrite(String resourceGroupName, String storagePoolName, + String volumeGroupName, String volumeName, VolumeOverwriteRequest body, Context context) { + Response response + = overwriteWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono overwriteAsync(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, VolumeOverwriteRequest body) { + return beginOverwriteAsync(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeOverwriteRequest body) { + beginOverwrite(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body).getFinalResult(); + } + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeOverwriteRequest body, Context context) { + beginOverwrite(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Volume list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVolumeGroupNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVolumeGroupNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Volume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVolumeGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByVolumeGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return 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. + * @param context The 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 Volume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVolumeGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByVolumeGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesImpl.java new file mode 100644 index 000000000000..b48aa0cdee40 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesImpl.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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.purestorageblock.fluent.VolumesClient; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner; +import com.azure.resourcemanager.purestorageblock.models.Volume; +import com.azure.resourcemanager.purestorageblock.models.VolumeOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.Volumes; + +public final class VolumesImpl implements Volumes { + private static final ClientLogger LOGGER = new ClientLogger(VolumesImpl.class); + + private final VolumesClient innerClient; + + private final com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager; + + public VolumesImpl(VolumesClient innerClient, + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VolumeImpl(inner.getValue(), this.manager())); + } + + public Volume get(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName) { + VolumeInner inner = this.serviceClient().get(resourceGroupName, storagePoolName, volumeGroupName, volumeName); + if (inner != null) { + return new VolumeImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName) { + this.serviceClient().delete(resourceGroupName, storagePoolName, volumeGroupName, volumeName); + } + + public void delete(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + Context context) { + this.serviceClient().delete(resourceGroupName, storagePoolName, volumeGroupName, volumeName, context); + } + + public PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName) { + PagedIterable inner + = this.serviceClient().listByVolumeGroup(resourceGroupName, storagePoolName, volumeGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); + } + + public PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByVolumeGroup(resourceGroupName, storagePoolName, volumeGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); + } + + public void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeOverwriteRequest body) { + this.serviceClient().overwrite(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body); + } + + public void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeOverwriteRequest body, Context context) { + this.serviceClient().overwrite(resourceGroupName, storagePoolName, volumeGroupName, volumeName, body, context); + } + + public Volume 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + return this.getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + return this.getWithResponse(resourceGroupName, storagePoolName, volumeGroupName, volumeName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + this.delete(resourceGroupName, storagePoolName, volumeGroupName, volumeName, 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 storagePoolName = ResourceManagerUtils.getValueFromIdByName(id, "storagePools"); + if (storagePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storagePools'.", id))); + } + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); + if (volumeGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + this.delete(resourceGroupName, storagePoolName, volumeGroupName, volumeName, context); + } + + private VolumesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager() { + return this.serviceManager; + } + + public VolumeImpl define(String name) { + return new VolumeImpl(name, this.manager()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/RecoverableVolumeGroupListResult.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/RecoverableVolumeGroupListResult.java new file mode 100644 index 000000000000..5aec20bf2990 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/RecoverableVolumeGroupListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.fluent.models.RecoverableVolumeGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a RecoverableVolumeGroup list operation. + */ +@Immutable +public final class RecoverableVolumeGroupListResult implements JsonSerializable { + /* + * The RecoverableVolumeGroup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of RecoverableVolumeGroupListResult class. + */ + private RecoverableVolumeGroupListResult() { + } + + /** + * Get the value property: The RecoverableVolumeGroup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableVolumeGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableVolumeGroupListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RecoverableVolumeGroupListResult. + */ + public static RecoverableVolumeGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableVolumeGroupListResult deserializedRecoverableVolumeGroupListResult + = new RecoverableVolumeGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RecoverableVolumeGroupInner.fromJson(reader1)); + deserializedRecoverableVolumeGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRecoverableVolumeGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableVolumeGroupListResult; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeGroupListResult.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeGroupListResult.java new file mode 100644 index 000000000000..018b1dbdd877 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeGroupListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a VolumeGroup list operation. + */ +@Immutable +public final class VolumeGroupListResult implements JsonSerializable { + /* + * The VolumeGroup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of VolumeGroupListResult class. + */ + private VolumeGroupListResult() { + } + + /** + * Get the value property: The VolumeGroup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeGroupListResult. + */ + public static VolumeGroupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupListResult deserializedVolumeGroupListResult = new VolumeGroupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> VolumeGroupInner.fromJson(reader1)); + deserializedVolumeGroupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVolumeGroupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupListResult; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeGroupSnapshotListResult.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeGroupSnapshotListResult.java new file mode 100644 index 000000000000..bba6db52df2b --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeGroupSnapshotListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * Paged list result for volume group snapshots. + */ +@Immutable +public final class VolumeGroupSnapshotListResult implements JsonSerializable { + /* + * Array of volume group snapshots + */ + private List value; + + /* + * URL to fetch the next page of results + */ + private String nextLink; + + /** + * Creates an instance of VolumeGroupSnapshotListResult class. + */ + private VolumeGroupSnapshotListResult() { + } + + /** + * Get the value property: Array of volume group snapshots. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to fetch the next page of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupSnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupSnapshotListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeGroupSnapshotListResult. + */ + public static VolumeGroupSnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupSnapshotListResult deserializedVolumeGroupSnapshotListResult + = new VolumeGroupSnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VolumeGroupSnapshotInner.fromJson(reader1)); + deserializedVolumeGroupSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVolumeGroupSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupSnapshotListResult; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeListResult.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeListResult.java new file mode 100644 index 000000000000..47dcd3ada609 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeListResult.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Volume list operation. + */ +@Immutable +public final class VolumeListResult implements JsonSerializable { + /* + * The Volume items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of VolumeListResult class. + */ + private VolumeListResult() { + } + + /** + * Get the value property: The Volume items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeListResult. + */ + public static VolumeListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeListResult deserializedVolumeListResult = new VolumeListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> VolumeInner.fromJson(reader1)); + deserializedVolumeListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVolumeListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeListResult; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ActivateSaaSRequest.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ActivateSaaSRequest.java new file mode 100644 index 000000000000..1f601347c904 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ActivateSaaSRequest.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SaaS guid for Activate SaaS Resource. + */ +@Fluent +public final class ActivateSaaSRequest implements JsonSerializable { + /* + * SaaS guid for Activate SaaS Resource + */ + private String saasGuid; + + /* + * Publisher Id for PureStorage resource + */ + private String publisherId; + + /** + * Creates an instance of ActivateSaaSRequest class. + */ + public ActivateSaaSRequest() { + } + + /** + * Get the saasGuid property: SaaS guid for Activate SaaS Resource. + * + * @return the saasGuid value. + */ + public String saasGuid() { + return this.saasGuid; + } + + /** + * Set the saasGuid property: SaaS guid for Activate SaaS Resource. + * + * @param saasGuid the saasGuid value to set. + * @return the ActivateSaaSRequest object itself. + */ + public ActivateSaaSRequest withSaasGuid(String saasGuid) { + this.saasGuid = saasGuid; + return this; + } + + /** + * Get the publisherId property: Publisher Id for PureStorage resource. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Set the publisherId property: Publisher Id for PureStorage resource. + * + * @param publisherId the publisherId value to set. + * @return the ActivateSaaSRequest object itself. + */ + public ActivateSaaSRequest withPublisherId(String publisherId) { + this.publisherId = publisherId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saasGuid", this.saasGuid); + jsonWriter.writeStringField("publisherId", this.publisherId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActivateSaaSRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActivateSaaSRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActivateSaaSRequest. + */ + public static ActivateSaaSRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActivateSaaSRequest deserializedActivateSaaSRequest = new ActivateSaaSRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saasGuid".equals(fieldName)) { + deserializedActivateSaaSRequest.saasGuid = reader.getString(); + } else if ("publisherId".equals(fieldName)) { + deserializedActivateSaaSRequest.publisherId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActivateSaaSRequest; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/AzureVolumeProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/AzureVolumeProperties.java new file mode 100644 index 000000000000..a4ae6bbe815a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/AzureVolumeProperties.java @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Properties of an Azure volume. + */ +@Fluent +public final class AzureVolumeProperties implements JsonSerializable { + /* + * Storage space usage for the volume + */ + private Space space; + + /* + * Currently provisioned size of the volume, in bytes + */ + private Long provisionedSize; + + /* + * Serial number of the volume + */ + private String serialNumber; + + /* + * Volume creation date, as an RFC 3339 timestamp + */ + private OffsetDateTime createdAt; + + /* + * Azure resource ID of the source volume for cloning + */ + private String sourceVolumeResourceId; + + /* + * Azure Resource ID of the source volume group to clone from. + */ + private String sourceVolumeGroupResourceId; + + /* + * Indicates the source type for volume creation + */ + private VolumeSourceType sourceType; + + /* + * Source volume group snapshot and volume snapshot name to restore from + */ + private VolumeSnapshotSource sourceVolumeSnapshot; + + /* + * Serial number of the source volume to import + */ + private String sourceSerialNumber; + + /* + * Azure resource ID of the soft-deleted volume to recover within the same volume group + */ + private String sourceRecoverableVolumeResourceId; + + /* + * Soft-deletion state of the volume + */ + private DestroyedStateProperties softDeletion; + + /* + * Provisioning state of the resource + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of AzureVolumeProperties class. + */ + public AzureVolumeProperties() { + } + + /** + * Get the space property: Storage space usage for the volume. + * + * @return the space value. + */ + public Space space() { + return this.space; + } + + /** + * Get the provisionedSize property: Currently provisioned size of the volume, in bytes. + * + * @return the provisionedSize value. + */ + public Long provisionedSize() { + return this.provisionedSize; + } + + /** + * Set the provisionedSize property: Currently provisioned size of the volume, in bytes. + * + * @param provisionedSize the provisionedSize value to set. + * @return the AzureVolumeProperties object itself. + */ + public AzureVolumeProperties withProvisionedSize(Long provisionedSize) { + this.provisionedSize = provisionedSize; + return this; + } + + /** + * Get the serialNumber property: Serial number of the volume. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the createdAt property: Volume creation date, as an RFC 3339 timestamp. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the sourceVolumeResourceId property: Azure resource ID of the source volume for cloning. + * + * @return the sourceVolumeResourceId value. + */ + public String sourceVolumeResourceId() { + return this.sourceVolumeResourceId; + } + + /** + * Set the sourceVolumeResourceId property: Azure resource ID of the source volume for cloning. + * + * @param sourceVolumeResourceId the sourceVolumeResourceId value to set. + * @return the AzureVolumeProperties object itself. + */ + public AzureVolumeProperties withSourceVolumeResourceId(String sourceVolumeResourceId) { + this.sourceVolumeResourceId = sourceVolumeResourceId; + return this; + } + + /** + * Get the sourceVolumeGroupResourceId property: Azure Resource ID of the source volume group to clone from. + * + * @return the sourceVolumeGroupResourceId value. + */ + public String sourceVolumeGroupResourceId() { + return this.sourceVolumeGroupResourceId; + } + + /** + * Set the sourceVolumeGroupResourceId property: Azure Resource ID of the source volume group to clone from. + * + * @param sourceVolumeGroupResourceId the sourceVolumeGroupResourceId value to set. + * @return the AzureVolumeProperties object itself. + */ + public AzureVolumeProperties withSourceVolumeGroupResourceId(String sourceVolumeGroupResourceId) { + this.sourceVolumeGroupResourceId = sourceVolumeGroupResourceId; + return this; + } + + /** + * Get the sourceType property: Indicates the source type for volume creation. + * + * @return the sourceType value. + */ + public VolumeSourceType sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: Indicates the source type for volume creation. + * + * @param sourceType the sourceType value to set. + * @return the AzureVolumeProperties object itself. + */ + public AzureVolumeProperties withSourceType(VolumeSourceType sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the sourceVolumeSnapshot property: Source volume group snapshot and volume snapshot name to restore from. + * + * @return the sourceVolumeSnapshot value. + */ + public VolumeSnapshotSource sourceVolumeSnapshot() { + return this.sourceVolumeSnapshot; + } + + /** + * Set the sourceVolumeSnapshot property: Source volume group snapshot and volume snapshot name to restore from. + * + * @param sourceVolumeSnapshot the sourceVolumeSnapshot value to set. + * @return the AzureVolumeProperties object itself. + */ + public AzureVolumeProperties withSourceVolumeSnapshot(VolumeSnapshotSource sourceVolumeSnapshot) { + this.sourceVolumeSnapshot = sourceVolumeSnapshot; + return this; + } + + /** + * Get the sourceSerialNumber property: Serial number of the source volume to import. + * + * @return the sourceSerialNumber value. + */ + public String sourceSerialNumber() { + return this.sourceSerialNumber; + } + + /** + * Set the sourceSerialNumber property: Serial number of the source volume to import. + * + * @param sourceSerialNumber the sourceSerialNumber value to set. + * @return the AzureVolumeProperties object itself. + */ + public AzureVolumeProperties withSourceSerialNumber(String sourceSerialNumber) { + this.sourceSerialNumber = sourceSerialNumber; + return this; + } + + /** + * Get the sourceRecoverableVolumeResourceId property: Azure resource ID of the soft-deleted volume to recover + * within the same volume group. + * + * @return the sourceRecoverableVolumeResourceId value. + */ + public String sourceRecoverableVolumeResourceId() { + return this.sourceRecoverableVolumeResourceId; + } + + /** + * Set the sourceRecoverableVolumeResourceId property: Azure resource ID of the soft-deleted volume to recover + * within the same volume group. + * + * @param sourceRecoverableVolumeResourceId the sourceRecoverableVolumeResourceId value to set. + * @return the AzureVolumeProperties object itself. + */ + public AzureVolumeProperties withSourceRecoverableVolumeResourceId(String sourceRecoverableVolumeResourceId) { + this.sourceRecoverableVolumeResourceId = sourceRecoverableVolumeResourceId; + return this; + } + + /** + * Get the softDeletion property: Soft-deletion state of the volume. + * + * @return the softDeletion value. + */ + public DestroyedStateProperties softDeletion() { + return this.softDeletion; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("provisionedSize", this.provisionedSize); + jsonWriter.writeStringField("sourceVolumeResourceId", this.sourceVolumeResourceId); + jsonWriter.writeStringField("sourceVolumeGroupResourceId", this.sourceVolumeGroupResourceId); + jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); + jsonWriter.writeJsonField("sourceVolumeSnapshot", this.sourceVolumeSnapshot); + jsonWriter.writeStringField("sourceSerialNumber", this.sourceSerialNumber); + jsonWriter.writeStringField("sourceRecoverableVolumeResourceId", this.sourceRecoverableVolumeResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureVolumeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureVolumeProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the AzureVolumeProperties. + */ + public static AzureVolumeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureVolumeProperties deserializedAzureVolumeProperties = new AzureVolumeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("space".equals(fieldName)) { + deserializedAzureVolumeProperties.space = Space.fromJson(reader); + } else if ("provisionedSize".equals(fieldName)) { + deserializedAzureVolumeProperties.provisionedSize = reader.getNullable(JsonReader::getLong); + } else if ("serialNumber".equals(fieldName)) { + deserializedAzureVolumeProperties.serialNumber = reader.getString(); + } else if ("createdAt".equals(fieldName)) { + deserializedAzureVolumeProperties.createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("sourceVolumeResourceId".equals(fieldName)) { + deserializedAzureVolumeProperties.sourceVolumeResourceId = reader.getString(); + } else if ("sourceVolumeGroupResourceId".equals(fieldName)) { + deserializedAzureVolumeProperties.sourceVolumeGroupResourceId = reader.getString(); + } else if ("sourceType".equals(fieldName)) { + deserializedAzureVolumeProperties.sourceType = VolumeSourceType.fromString(reader.getString()); + } else if ("sourceVolumeSnapshot".equals(fieldName)) { + deserializedAzureVolumeProperties.sourceVolumeSnapshot = VolumeSnapshotSource.fromJson(reader); + } else if ("sourceSerialNumber".equals(fieldName)) { + deserializedAzureVolumeProperties.sourceSerialNumber = reader.getString(); + } else if ("sourceRecoverableVolumeResourceId".equals(fieldName)) { + deserializedAzureVolumeProperties.sourceRecoverableVolumeResourceId = reader.getString(); + } else if ("softDeletion".equals(fieldName)) { + deserializedAzureVolumeProperties.softDeletion = DestroyedStateProperties.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedAzureVolumeProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureVolumeProperties; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ConnectionParametersResponse.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ConnectionParametersResponse.java new file mode 100644 index 000000000000..943a2a6e82f3 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ConnectionParametersResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.resourcemanager.purestorageblock.fluent.models.ConnectionParametersResponseInner; + +/** + * An immutable client-side representation of ConnectionParametersResponse. + */ +public interface ConnectionParametersResponse { + /** + * Gets the iscsi property: ISCSI connection parameters. + * + * @return the iscsi value. + */ + IscsiConnectionParameters iscsi(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.ConnectionParametersResponseInner object. + * + * @return the inner object. + */ + ConnectionParametersResponseInner innerModel(); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/DestroyedStateProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/DestroyedStateProperties.java new file mode 100644 index 000000000000..da91bb55dc39 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/DestroyedStateProperties.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Soft-deletion (destroyed) state of a resource. + */ +@Immutable +public final class DestroyedStateProperties implements JsonSerializable { + /* + * If false, the resource is active; if true, the resource has been destroyed + */ + private boolean destroyed; + + /* + * Date and time at which the resource was destroyed, as an RFC 3339 timestamp + */ + private OffsetDateTime destroyedAt; + + /* + * Name of the resource before it was destroyed + */ + private String previousName; + + /* + * Date at which the resource will be eradicated and impossible to recover, as an RFC 3339 timestamp + */ + private OffsetDateTime eradicationTimestamp; + + /** + * Creates an instance of DestroyedStateProperties class. + */ + private DestroyedStateProperties() { + } + + /** + * Get the destroyed property: If false, the resource is active; if true, the resource has been destroyed. + * + * @return the destroyed value. + */ + public boolean destroyed() { + return this.destroyed; + } + + /** + * Get the destroyedAt property: Date and time at which the resource was destroyed, as an RFC 3339 timestamp. + * + * @return the destroyedAt value. + */ + public OffsetDateTime destroyedAt() { + return this.destroyedAt; + } + + /** + * Get the previousName property: Name of the resource before it was destroyed. + * + * @return the previousName value. + */ + public String previousName() { + return this.previousName; + } + + /** + * Get the eradicationTimestamp property: Date at which the resource will be eradicated and impossible to recover, + * as an RFC 3339 timestamp. + * + * @return the eradicationTimestamp value. + */ + public OffsetDateTime eradicationTimestamp() { + return this.eradicationTimestamp; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DestroyedStateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DestroyedStateProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DestroyedStateProperties. + */ + public static DestroyedStateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DestroyedStateProperties deserializedDestroyedStateProperties = new DestroyedStateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("destroyed".equals(fieldName)) { + deserializedDestroyedStateProperties.destroyed = reader.getBoolean(); + } else if ("destroyedAt".equals(fieldName)) { + deserializedDestroyedStateProperties.destroyedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("previousName".equals(fieldName)) { + deserializedDestroyedStateProperties.previousName = reader.getString(); + } else if ("eradicationTimestamp".equals(fieldName)) { + deserializedDestroyedStateProperties.eradicationTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedDestroyedStateProperties; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/IscsiConnectionParameters.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/IscsiConnectionParameters.java new file mode 100644 index 000000000000..8a1ee64b0a09 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/IscsiConnectionParameters.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * ISCSI connection parameters. + */ +@Immutable +public final class IscsiConnectionParameters implements JsonSerializable { + /* + * List of ISCSI endpoints for connection + */ + private List endpoints; + + /** + * Creates an instance of IscsiConnectionParameters class. + */ + private IscsiConnectionParameters() { + } + + /** + * Get the endpoints property: List of ISCSI endpoints for connection. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IscsiConnectionParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IscsiConnectionParameters if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IscsiConnectionParameters. + */ + public static IscsiConnectionParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IscsiConnectionParameters deserializedIscsiConnectionParameters = new IscsiConnectionParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpoints".equals(fieldName)) { + List endpoints = reader.readArray(reader1 -> IscsiEndpoint.fromJson(reader1)); + deserializedIscsiConnectionParameters.endpoints = endpoints; + } else { + reader.skipChildren(); + } + } + + return deserializedIscsiConnectionParameters; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/IscsiEndpoint.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/IscsiEndpoint.java new file mode 100644 index 000000000000..511d09d32dc2 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/IscsiEndpoint.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * ISCSI connection endpoint details. + */ +@Immutable +public final class IscsiEndpoint implements JsonSerializable { + /* + * IP address of the endpoint + */ + private String ip; + + /* + * Port number of the endpoint + */ + private int port; + + /* + * IQN (iSCSI Qualified Name) of the endpoint + */ + private String iqn; + + /** + * Creates an instance of IscsiEndpoint class. + */ + private IscsiEndpoint() { + } + + /** + * Get the ip property: IP address of the endpoint. + * + * @return the ip value. + */ + public String ip() { + return this.ip; + } + + /** + * Get the port property: Port number of the endpoint. + * + * @return the port value. + */ + public int port() { + return this.port; + } + + /** + * Get the iqn property: IQN (iSCSI Qualified Name) of the endpoint. + * + * @return the iqn value. + */ + public String iqn() { + return this.iqn; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ip", this.ip); + jsonWriter.writeIntField("port", this.port); + jsonWriter.writeStringField("iqn", this.iqn); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IscsiEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IscsiEndpoint if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IscsiEndpoint. + */ + public static IscsiEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IscsiEndpoint deserializedIscsiEndpoint = new IscsiEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ip".equals(fieldName)) { + deserializedIscsiEndpoint.ip = reader.getString(); + } else if ("port".equals(fieldName)) { + deserializedIscsiEndpoint.port = reader.getInt(); + } else if ("iqn".equals(fieldName)) { + deserializedIscsiEndpoint.iqn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIscsiEndpoint; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/LatestLinkedSaaSResponse.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/LatestLinkedSaaSResponse.java new file mode 100644 index 000000000000..788a4beff02c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/LatestLinkedSaaSResponse.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.resourcemanager.purestorageblock.fluent.models.LatestLinkedSaaSResponseInner; + +/** + * An immutable client-side representation of LatestLinkedSaaSResponse. + */ +public interface LatestLinkedSaaSResponse { + /** + * Gets the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + String saaSResourceId(); + + /** + * Gets the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden. + * + * @return the isHiddenSaaS value. + */ + Boolean isHiddenSaaS(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.LatestLinkedSaaSResponseInner object. + * + * @return the inner object. + */ + LatestLinkedSaaSResponseInner innerModel(); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/LinkSaaSRequest.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/LinkSaaSRequest.java new file mode 100644 index 000000000000..9908610ea0ac --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/LinkSaaSRequest.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SaaS details for linking to a reservation. + */ +@Fluent +public final class LinkSaaSRequest implements JsonSerializable { + /* + * SaaS resource id + */ + private String saaSResourceId; + + /** + * Creates an instance of LinkSaaSRequest class. + */ + public LinkSaaSRequest() { + } + + /** + * Get the saaSResourceId property: SaaS resource id. + * + * @return the saaSResourceId value. + */ + public String saaSResourceId() { + return this.saaSResourceId; + } + + /** + * Set the saaSResourceId property: SaaS resource id. + * + * @param saaSResourceId the saaSResourceId value to set. + * @return the LinkSaaSRequest object itself. + */ + public LinkSaaSRequest withSaaSResourceId(String saaSResourceId) { + this.saaSResourceId = saaSResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinkSaaSRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinkSaaSRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LinkSaaSRequest. + */ + public static LinkSaaSRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinkSaaSRequest deserializedLinkSaaSRequest = new LinkSaaSRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("saaSResourceId".equals(fieldName)) { + deserializedLinkSaaSRequest.saaSResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLinkSaaSRequest; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/MarketplaceDetails.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/MarketplaceDetails.java index 79c3da866024..7d9d5ceb0ef5 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/MarketplaceDetails.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/MarketplaceDetails.java @@ -31,6 +31,11 @@ public final class MarketplaceDetails implements JsonSerializable { + /* + * Bandwidth limit in MB per second + */ + private Long bandwidthLimitMbPerSec; + + /* + * IOPS limit + */ + private Long iopsLimit; + + /** + * Creates an instance of PerformanceParameters class. + */ + public PerformanceParameters() { + } + + /** + * Get the bandwidthLimitMbPerSec property: Bandwidth limit in MB per second. + * + * @return the bandwidthLimitMbPerSec value. + */ + public Long bandwidthLimitMbPerSec() { + return this.bandwidthLimitMbPerSec; + } + + /** + * Set the bandwidthLimitMbPerSec property: Bandwidth limit in MB per second. + * + * @param bandwidthLimitMbPerSec the bandwidthLimitMbPerSec value to set. + * @return the PerformanceParameters object itself. + */ + public PerformanceParameters withBandwidthLimitMbPerSec(Long bandwidthLimitMbPerSec) { + this.bandwidthLimitMbPerSec = bandwidthLimitMbPerSec; + return this; + } + + /** + * Get the iopsLimit property: IOPS limit. + * + * @return the iopsLimit value. + */ + public Long iopsLimit() { + return this.iopsLimit; + } + + /** + * Set the iopsLimit property: IOPS limit. + * + * @param iopsLimit the iopsLimit value to set. + * @return the PerformanceParameters object itself. + */ + public PerformanceParameters withIopsLimit(Long iopsLimit) { + this.iopsLimit = iopsLimit; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("bandwidthLimitMbPerSec", this.bandwidthLimitMbPerSec); + jsonWriter.writeNumberField("iopsLimit", this.iopsLimit); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PerformanceParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PerformanceParameters if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PerformanceParameters. + */ + public static PerformanceParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PerformanceParameters deserializedPerformanceParameters = new PerformanceParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("bandwidthLimitMbPerSec".equals(fieldName)) { + deserializedPerformanceParameters.bandwidthLimitMbPerSec = reader.getNullable(JsonReader::getLong); + } else if ("iopsLimit".equals(fieldName)) { + deserializedPerformanceParameters.iopsLimit = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedPerformanceParameters; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAccessSettings.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAccessSettings.java new file mode 100644 index 000000000000..2d1a8ee22ca9 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAccessSettings.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Access settings for a platform console interface. + */ +@Fluent +public final class PlatformConsoleAccessSettings implements JsonSerializable { + /* + * Whether this console interface access is enabled + */ + private boolean enabled; + + /** + * Creates an instance of PlatformConsoleAccessSettings class. + */ + public PlatformConsoleAccessSettings() { + } + + /** + * Get the enabled property: Whether this console interface access is enabled. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether this console interface access is enabled. + * + * @param enabled the enabled value to set. + * @return the PlatformConsoleAccessSettings object itself. + */ + public PlatformConsoleAccessSettings withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformConsoleAccessSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformConsoleAccessSettings if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PlatformConsoleAccessSettings. + */ + public static PlatformConsoleAccessSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformConsoleAccessSettings deserializedPlatformConsoleAccessSettings + = new PlatformConsoleAccessSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedPlatformConsoleAccessSettings.enabled = reader.getBoolean(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformConsoleAccessSettings; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleActivationCode.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleActivationCode.java new file mode 100644 index 000000000000..28bb165ce05b --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleActivationCode.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleActivationCodeInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of PlatformConsoleActivationCode. + */ +public interface PlatformConsoleActivationCode { + /** + * Gets the username property: Username to use when activating the console session. + * + * @return the username value. + */ + String username(); + + /** + * Gets the activationCode property: One-time activation code for platform console access. + * + * @return the activationCode value. + */ + String activationCode(); + + /** + * Gets the expiresAt property: Expiry time of the activation code in RFC3339 format. + * + * @return the expiresAt value. + */ + OffsetDateTime expiresAt(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleActivationCodeInner + * object. + * + * @return the inner object. + */ + PlatformConsoleActivationCodeInner innerModel(); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthConfig.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthConfig.java new file mode 100644 index 000000000000..0902bce3244d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthConfig.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Base model for platform console authentication configuration. Extend with a type-specific subtype for each auth + * mechanism. + */ +@Immutable +public class PlatformConsoleAuthConfig implements JsonSerializable { + /* + * Authentication type discriminator + */ + private PlatformConsoleAuthType authType = PlatformConsoleAuthType.fromString("PlatformConsoleAuthConfig"); + + /** + * Creates an instance of PlatformConsoleAuthConfig class. + */ + public PlatformConsoleAuthConfig() { + } + + /** + * Get the authType property: Authentication type discriminator. + * + * @return the authType value. + */ + public PlatformConsoleAuthType authType() { + return this.authType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformConsoleAuthConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformConsoleAuthConfig if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PlatformConsoleAuthConfig. + */ + public static PlatformConsoleAuthConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("authType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("ssh".equals(discriminatorValue)) { + return SshPlatformConsoleAuthConfig.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static PlatformConsoleAuthConfig fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformConsoleAuthConfig deserializedPlatformConsoleAuthConfig = new PlatformConsoleAuthConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("authType".equals(fieldName)) { + deserializedPlatformConsoleAuthConfig.authType + = PlatformConsoleAuthType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformConsoleAuthConfig; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthResult.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthResult.java new file mode 100644 index 000000000000..4e0f6cab0a10 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthResult.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner; + +/** + * An immutable client-side representation of PlatformConsoleAuthResult. + */ +public interface PlatformConsoleAuthResult { + /** + * Gets the authType property: Authentication type discriminator. + * + * @return the authType value. + */ + PlatformConsoleAuthType authType(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner object. + * + * @return the inner object. + */ + PlatformConsoleAuthResultInner innerModel(); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthType.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthType.java new file mode 100644 index 000000000000..94fbe042aea4 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Discriminator values for platform console authentication types. Extensible to support new auth mechanisms without API + * changes. + */ +public final class PlatformConsoleAuthType extends ExpandableStringEnum { + /** + * SSH public key authentication. + */ + public static final PlatformConsoleAuthType SSH = fromString("ssh"); + + /** + * Creates a new instance of PlatformConsoleAuthType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PlatformConsoleAuthType() { + } + + /** + * Creates or finds a PlatformConsoleAuthType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PlatformConsoleAuthType. + */ + public static PlatformConsoleAuthType fromString(String name) { + return fromString(name, PlatformConsoleAuthType.class); + } + + /** + * Gets known PlatformConsoleAuthType values. + * + * @return known PlatformConsoleAuthType values. + */ + public static Collection values() { + return values(PlatformConsoleAuthType.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleRole.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleRole.java new file mode 100644 index 000000000000..19e925c71a6c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleRole.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Role assigned to a user on the platform console. + */ +public final class PlatformConsoleRole extends ExpandableStringEnum { + /** + * Full administrative access to the array. + */ + public static final PlatformConsoleRole ARRAY_ADMIN = fromString("array_admin"); + + /** + * Administrative access to storage resources. + */ + public static final PlatformConsoleRole STORAGE_ADMIN = fromString("storage_admin"); + + /** + * Read-only access to the platform console. + */ + public static final PlatformConsoleRole READ_ONLY = fromString("read_only"); + + /** + * Creates a new instance of PlatformConsoleRole value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PlatformConsoleRole() { + } + + /** + * Creates or finds a PlatformConsoleRole from its string representation. + * + * @param name a name to look for. + * @return the corresponding PlatformConsoleRole. + */ + public static PlatformConsoleRole fromString(String name) { + return fromString(name, PlatformConsoleRole.class); + } + + /** + * Gets known PlatformConsoleRole values. + * + * @return known PlatformConsoleRole values. + */ + public static Collection values() { + return values(PlatformConsoleRole.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleSettings.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleSettings.java new file mode 100644 index 000000000000..401783fd91aa --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleSettings.java @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Settings for platform console access to the storage pool. + */ +@Fluent +public final class PlatformConsoleSettings implements JsonSerializable { + /* + * Whether platform console access is enabled for the storage pool or not.When enabled is false, all console access + * is disabled regardless of individual interface settings. + */ + private Boolean enabled; + + /* + * GUI access settings + */ + private PlatformConsoleAccessSettings gui; + + /* + * API access settings + */ + private PlatformConsoleAccessSettings api; + + /* + * CLI access settings + */ + private PlatformConsoleAccessSettings cli; + + /* + * Subnets configured for platform console access + */ + private List subnets; + + /* + * Default username for console access (system-populated) + */ + private String defaultUsername; + + /** + * Creates an instance of PlatformConsoleSettings class. + */ + public PlatformConsoleSettings() { + } + + /** + * Get the enabled property: Whether platform console access is enabled for the storage pool or not.When enabled is + * false, all console access is disabled regardless of individual interface settings. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether platform console access is enabled for the storage pool or not.When enabled is + * false, all console access is disabled regardless of individual interface settings. + * + * @param enabled the enabled value to set. + * @return the PlatformConsoleSettings object itself. + */ + public PlatformConsoleSettings withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the gui property: GUI access settings. + * + * @return the gui value. + */ + public PlatformConsoleAccessSettings gui() { + return this.gui; + } + + /** + * Set the gui property: GUI access settings. + * + * @param gui the gui value to set. + * @return the PlatformConsoleSettings object itself. + */ + public PlatformConsoleSettings withGui(PlatformConsoleAccessSettings gui) { + this.gui = gui; + return this; + } + + /** + * Get the api property: API access settings. + * + * @return the api value. + */ + public PlatformConsoleAccessSettings api() { + return this.api; + } + + /** + * Set the api property: API access settings. + * + * @param api the api value to set. + * @return the PlatformConsoleSettings object itself. + */ + public PlatformConsoleSettings withApi(PlatformConsoleAccessSettings api) { + this.api = api; + return this; + } + + /** + * Get the cli property: CLI access settings. + * + * @return the cli value. + */ + public PlatformConsoleAccessSettings cli() { + return this.cli; + } + + /** + * Set the cli property: CLI access settings. + * + * @param cli the cli value to set. + * @return the PlatformConsoleSettings object itself. + */ + public PlatformConsoleSettings withCli(PlatformConsoleAccessSettings cli) { + this.cli = cli; + return this; + } + + /** + * Get the subnets property: Subnets configured for platform console access. + * + * @return the subnets value. + */ + public List subnets() { + return this.subnets; + } + + /** + * Set the subnets property: Subnets configured for platform console access. + * + * @param subnets the subnets value to set. + * @return the PlatformConsoleSettings object itself. + */ + public PlatformConsoleSettings withSubnets(List subnets) { + this.subnets = subnets; + return this; + } + + /** + * Get the defaultUsername property: Default username for console access (system-populated). + * + * @return the defaultUsername value. + */ + public String defaultUsername() { + return this.defaultUsername; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeJsonField("gui", this.gui); + jsonWriter.writeJsonField("api", this.api); + jsonWriter.writeJsonField("cli", this.cli); + jsonWriter.writeArrayField("subnets", this.subnets, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformConsoleSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformConsoleSettings if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PlatformConsoleSettings. + */ + public static PlatformConsoleSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformConsoleSettings deserializedPlatformConsoleSettings = new PlatformConsoleSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedPlatformConsoleSettings.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("gui".equals(fieldName)) { + deserializedPlatformConsoleSettings.gui = PlatformConsoleAccessSettings.fromJson(reader); + } else if ("api".equals(fieldName)) { + deserializedPlatformConsoleSettings.api = PlatformConsoleAccessSettings.fromJson(reader); + } else if ("cli".equals(fieldName)) { + deserializedPlatformConsoleSettings.cli = PlatformConsoleAccessSettings.fromJson(reader); + } else if ("subnets".equals(fieldName)) { + List subnets + = reader.readArray(reader1 -> PlatformConsoleSubnet.fromJson(reader1)); + deserializedPlatformConsoleSettings.subnets = subnets; + } else if ("defaultUsername".equals(fieldName)) { + deserializedPlatformConsoleSettings.defaultUsername = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformConsoleSettings; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleSubnet.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleSubnet.java new file mode 100644 index 000000000000..b0132fc1c3b1 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleSubnet.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Subnet configuration for platform console access. + */ +@Fluent +public final class PlatformConsoleSubnet implements JsonSerializable { + /* + * Azure resource ID of the subnet + */ + private String id; + + /* + * Management IP address assigned to the subnet (system-populated) + */ + private String managementIpAddress; + + /* + * Service backend IP addresses assigned to the subnet (system-populated) + */ + private List serviceBackendIps; + + /** + * Creates an instance of PlatformConsoleSubnet class. + */ + public PlatformConsoleSubnet() { + } + + /** + * Get the id property: Azure resource ID of the subnet. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Azure resource ID of the subnet. + * + * @param id the id value to set. + * @return the PlatformConsoleSubnet object itself. + */ + public PlatformConsoleSubnet withId(String id) { + this.id = id; + return this; + } + + /** + * Get the managementIpAddress property: Management IP address assigned to the subnet (system-populated). + * + * @return the managementIpAddress value. + */ + public String managementIpAddress() { + return this.managementIpAddress; + } + + /** + * Get the serviceBackendIps property: Service backend IP addresses assigned to the subnet (system-populated). + * + * @return the serviceBackendIps value. + */ + public List serviceBackendIps() { + return this.serviceBackendIps; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlatformConsoleSubnet from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlatformConsoleSubnet if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PlatformConsoleSubnet. + */ + public static PlatformConsoleSubnet fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlatformConsoleSubnet deserializedPlatformConsoleSubnet = new PlatformConsoleSubnet(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPlatformConsoleSubnet.id = reader.getString(); + } else if ("managementIpAddress".equals(fieldName)) { + deserializedPlatformConsoleSubnet.managementIpAddress = reader.getString(); + } else if ("serviceBackendIps".equals(fieldName)) { + List serviceBackendIps = reader.readArray(reader1 -> reader1.getString()); + deserializedPlatformConsoleSubnet.serviceBackendIps = serviceBackendIps; + } else { + reader.skipChildren(); + } + } + + return deserializedPlatformConsoleSubnet; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ProtectionParameters.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ProtectionParameters.java new file mode 100644 index 000000000000..e7548f5d98d3 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ProtectionParameters.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.Duration; + +/** + * Protection parameters for volume group. + */ +@Fluent +public final class ProtectionParameters implements JsonSerializable { + /* + * Retention period for snapshots in ISO 8601 duration format + */ + private Duration retention; + + /* + * Snapshot frequency in ISO 8601 duration format + */ + private Duration frequency; + + /** + * Creates an instance of ProtectionParameters class. + */ + public ProtectionParameters() { + } + + /** + * Get the retention property: Retention period for snapshots in ISO 8601 duration format. + * + * @return the retention value. + */ + public Duration retention() { + return this.retention; + } + + /** + * Set the retention property: Retention period for snapshots in ISO 8601 duration format. + * + * @param retention the retention value to set. + * @return the ProtectionParameters object itself. + */ + public ProtectionParameters withRetention(Duration retention) { + this.retention = retention; + return this; + } + + /** + * Get the frequency property: Snapshot frequency in ISO 8601 duration format. + * + * @return the frequency value. + */ + public Duration frequency() { + return this.frequency; + } + + /** + * Set the frequency property: Snapshot frequency in ISO 8601 duration format. + * + * @param frequency the frequency value to set. + * @return the ProtectionParameters object itself. + */ + public ProtectionParameters withFrequency(Duration frequency) { + this.frequency = frequency; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("retention", CoreUtils.durationToStringWithDays(this.retention)); + jsonWriter.writeStringField("frequency", CoreUtils.durationToStringWithDays(this.frequency)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProtectionParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProtectionParameters if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ProtectionParameters. + */ + public static ProtectionParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProtectionParameters deserializedProtectionParameters = new ProtectionParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("retention".equals(fieldName)) { + deserializedProtectionParameters.retention + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("frequency".equals(fieldName)) { + deserializedProtectionParameters.frequency + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedProtectionParameters; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroup.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroup.java new file mode 100644 index 000000000000..10571d63d6ae --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroup.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.purestorageblock.fluent.models.RecoverableVolumeGroupInner; + +/** + * An immutable client-side representation of RecoverableVolumeGroup. + */ +public interface RecoverableVolumeGroup { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + RecoverableVolumeGroupProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.RecoverableVolumeGroupInner object. + * + * @return the inner object. + */ + RecoverableVolumeGroupInner innerModel(); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroupProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroupProperties.java new file mode 100644 index 000000000000..c11ada38e4b2 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroupProperties.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Properties of a recoverable volume group. + */ +@Immutable +public final class RecoverableVolumeGroupProperties implements JsonSerializable { + /* + * Date and time at which the volume group was created, as an RFC 3339 timestamp + */ + private OffsetDateTime createdAt; + + /* + * Soft-deletion state of the recoverable volume group + */ + private DestroyedStateProperties softDeletion; + + /* + * Performance parameters of the volume group + */ + private PerformanceParameters performanceParameters; + + /* + * Protection parameters of the volume group + */ + private ProtectionParameters protectionParameters; + + /* + * Storage space usage of the volume group + */ + private Space space; + + /* + * Provisioning state of the resource + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of RecoverableVolumeGroupProperties class. + */ + private RecoverableVolumeGroupProperties() { + } + + /** + * Get the createdAt property: Date and time at which the volume group was created, as an RFC 3339 timestamp. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the softDeletion property: Soft-deletion state of the recoverable volume group. + * + * @return the softDeletion value. + */ + public DestroyedStateProperties softDeletion() { + return this.softDeletion; + } + + /** + * Get the performanceParameters property: Performance parameters of the volume group. + * + * @return the performanceParameters value. + */ + public PerformanceParameters performanceParameters() { + return this.performanceParameters; + } + + /** + * Get the protectionParameters property: Protection parameters of the volume group. + * + * @return the protectionParameters value. + */ + public ProtectionParameters protectionParameters() { + return this.protectionParameters; + } + + /** + * Get the space property: Storage space usage of the volume group. + * + * @return the space value. + */ + public Space space() { + return this.space; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecoverableVolumeGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecoverableVolumeGroupProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RecoverableVolumeGroupProperties. + */ + public static RecoverableVolumeGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecoverableVolumeGroupProperties deserializedRecoverableVolumeGroupProperties + = new RecoverableVolumeGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("createdAt".equals(fieldName)) { + deserializedRecoverableVolumeGroupProperties.createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("softDeletion".equals(fieldName)) { + deserializedRecoverableVolumeGroupProperties.softDeletion + = DestroyedStateProperties.fromJson(reader); + } else if ("performanceParameters".equals(fieldName)) { + deserializedRecoverableVolumeGroupProperties.performanceParameters + = PerformanceParameters.fromJson(reader); + } else if ("protectionParameters".equals(fieldName)) { + deserializedRecoverableVolumeGroupProperties.protectionParameters + = ProtectionParameters.fromJson(reader); + } else if ("space".equals(fieldName)) { + deserializedRecoverableVolumeGroupProperties.space = Space.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedRecoverableVolumeGroupProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRecoverableVolumeGroupProperties; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroups.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroups.java new file mode 100644 index 000000000000..d390dc2c6f1b --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroups.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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 RecoverableVolumeGroups. + */ +public interface RecoverableVolumeGroups { + /** + * Get a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @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 recoverable volume group along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String storagePoolName, + String recoverableVolumeGroupName, Context context); + + /** + * Get a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 recoverable volume group. + */ + RecoverableVolumeGroup get(String resourceGroupName, String storagePoolName, String recoverableVolumeGroupName); + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 RecoverableVolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName); + + /** + * List all recoverable volume groups in a storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @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 RecoverableVolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName, + Context context); + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, String recoverableVolumeGroupName); + + /** + * Eradicate a recoverable volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param recoverableVolumeGroupName Name of the recoverable volume group. + * @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 storagePoolName, String recoverableVolumeGroupName, Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservation.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservation.java index 531ad5be3fce..f53097553ff4 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservation.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservation.java @@ -324,4 +324,51 @@ interface WithProperties { * @return represents a billing usage report, including overall status and detailed properties. */ ReservationBillingUsageReport getBillingReport(); + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param body 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 response. + */ + Reservation linkSaaS(LinkSaaSRequest body); + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param body 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 response. + */ + Reservation linkSaaS(LinkSaaSRequest body, Context context); + + /** + * Returns the latest SaaS linked to the reservation. + * + * @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 response of get latest linked SaaS resource operation along with {@link Response}. + */ + Response latestLinkedSaaSWithResponse(Context context); + + /** + * Returns the latest SaaS linked to the reservation. + * + * @throws com.azure.core.management.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 response of get latest linked SaaS resource operation. + */ + LatestLinkedSaaSResponse latestLinkedSaaS(); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationPropertiesBaseResourceProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationPropertiesBaseResourceProperties.java index 76315f5bf3d0..aa6e85f0493c 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationPropertiesBaseResourceProperties.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationPropertiesBaseResourceProperties.java @@ -132,10 +132,10 @@ public static ReservationPropertiesBaseResourceProperties fromJson(JsonReader js if ("marketplace".equals(fieldName)) { deserializedReservationPropertiesBaseResourceProperties.marketplace = MarketplaceDetails.fromJson(reader); - } else if ("user".equals(fieldName)) { - deserializedReservationPropertiesBaseResourceProperties.user = UserDetails.fromJson(reader); } else if ("reservationInternalId".equals(fieldName)) { deserializedReservationPropertiesBaseResourceProperties.reservationInternalId = reader.getString(); + } else if ("user".equals(fieldName)) { + deserializedReservationPropertiesBaseResourceProperties.user = UserDetails.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedReservationPropertiesBaseResourceProperties.provisioningState = ProvisioningState.fromString(reader.getString()); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservations.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservations.java index 3eafee8f9f8d..a7218e00f349 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservations.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservations.java @@ -183,6 +183,63 @@ Response getBillingReportWithResponse(String reso */ ReservationBillingUsageReport getBillingReport(String resourceGroupName, String reservationName); + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response. + */ + Reservation linkSaaS(String resourceGroupName, String reservationName, LinkSaaSRequest body); + + /** + * Links a new SaaS to the reservation. + * + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @param body 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 response. + */ + Reservation linkSaaS(String resourceGroupName, String reservationName, LinkSaaSRequest body, Context context); + + /** + * Returns the latest SaaS linked to the reservation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @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 response of get latest linked SaaS resource operation along with {@link Response}. + */ + Response latestLinkedSaaSWithResponse(String resourceGroupName, String reservationName, + Context context); + + /** + * Returns the latest SaaS linked to the reservation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param reservationName Name of the reservation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 response of get latest linked SaaS resource operation. + */ + LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String reservationName); + /** * Get a reservation. * diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SaaSOperationGroups.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SaaSOperationGroups.java new file mode 100644 index 000000000000..e91b3ad8c2ad --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SaaSOperationGroups.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.util.Context; + +/** + * Resource collection API of SaaSOperationGroups. + */ +public interface SaaSOperationGroups { + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + SaaSResourceDetailsResponse activateResource(ActivateSaaSRequest body); + + /** + * Activate the SaaS resource. + * + * @param body The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details. + */ + SaaSResourceDetailsResponse activateResource(ActivateSaaSRequest body, Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SaaSResourceDetailsResponse.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SaaSResourceDetailsResponse.java new file mode 100644 index 000000000000..087afcbbd60d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SaaSResourceDetailsResponse.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.purestorageblock.fluent.models.SaaSResourceDetailsResponseInner; + +/** + * An immutable client-side representation of SaaSResourceDetailsResponse. + */ +public interface SaaSResourceDetailsResponse { + /** + * 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 saasId property: Id of the Marketplace SaaS Resource. + * + * @return the saasId value. + */ + String saasId(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.SaaSResourceDetailsResponseInner object. + * + * @return the inner object. + */ + SaaSResourceDetailsResponseInner innerModel(); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SshPlatformConsoleAuthConfig.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SshPlatformConsoleAuthConfig.java new file mode 100644 index 000000000000..2f7165207ad1 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SshPlatformConsoleAuthConfig.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SSH-based platform console authentication configuration. + */ +@Fluent +public final class SshPlatformConsoleAuthConfig extends PlatformConsoleAuthConfig { + /* + * Authentication type discriminator + */ + private PlatformConsoleAuthType authType = PlatformConsoleAuthType.SSH; + + /* + * Username to associate with the SSH public key + */ + private String username; + + /* + * SSH public key in OpenSSH authorized_keys format + */ + private String publicKey; + + /* + * Role to assign to the user on the platform console + */ + private PlatformConsoleRole role; + + /** + * Creates an instance of SshPlatformConsoleAuthConfig class. + */ + public SshPlatformConsoleAuthConfig() { + } + + /** + * Get the authType property: Authentication type discriminator. + * + * @return the authType value. + */ + @Override + public PlatformConsoleAuthType authType() { + return this.authType; + } + + /** + * Get the username property: Username to associate with the SSH public key. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Username to associate with the SSH public key. + * + * @param username the username value to set. + * @return the SshPlatformConsoleAuthConfig object itself. + */ + public SshPlatformConsoleAuthConfig withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the publicKey property: SSH public key in OpenSSH authorized_keys format. + * + * @return the publicKey value. + */ + public String publicKey() { + return this.publicKey; + } + + /** + * Set the publicKey property: SSH public key in OpenSSH authorized_keys format. + * + * @param publicKey the publicKey value to set. + * @return the SshPlatformConsoleAuthConfig object itself. + */ + public SshPlatformConsoleAuthConfig withPublicKey(String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * Get the role property: Role to assign to the user on the platform console. + * + * @return the role value. + */ + public PlatformConsoleRole role() { + return this.role; + } + + /** + * Set the role property: Role to assign to the user on the platform console. + * + * @param role the role value to set. + * @return the SshPlatformConsoleAuthConfig object itself. + */ + public SshPlatformConsoleAuthConfig withRole(PlatformConsoleRole role) { + this.role = role; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("publicKey", this.publicKey); + jsonWriter.writeStringField("role", this.role == null ? null : this.role.toString()); + jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SshPlatformConsoleAuthConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SshPlatformConsoleAuthConfig if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SshPlatformConsoleAuthConfig. + */ + public static SshPlatformConsoleAuthConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SshPlatformConsoleAuthConfig deserializedSshPlatformConsoleAuthConfig = new SshPlatformConsoleAuthConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedSshPlatformConsoleAuthConfig.username = reader.getString(); + } else if ("publicKey".equals(fieldName)) { + deserializedSshPlatformConsoleAuthConfig.publicKey = reader.getString(); + } else if ("role".equals(fieldName)) { + deserializedSshPlatformConsoleAuthConfig.role = PlatformConsoleRole.fromString(reader.getString()); + } else if ("authType".equals(fieldName)) { + deserializedSshPlatformConsoleAuthConfig.authType + = PlatformConsoleAuthType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSshPlatformConsoleAuthConfig; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SshPlatformConsoleAuthResult.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SshPlatformConsoleAuthResult.java new file mode 100644 index 000000000000..a880e85daf1e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/SshPlatformConsoleAuthResult.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner; +import java.io.IOException; + +/** + * SSH-based platform console authentication result. + */ +@Immutable +public final class SshPlatformConsoleAuthResult extends PlatformConsoleAuthResultInner { + /* + * Authentication type discriminator + */ + private PlatformConsoleAuthType authType = PlatformConsoleAuthType.SSH; + + /* + * Username that was configured for the console session + */ + private String username; + + /* + * Role assigned to the user on the platform console + */ + private PlatformConsoleRole role; + + /** + * Creates an instance of SshPlatformConsoleAuthResult class. + */ + private SshPlatformConsoleAuthResult() { + } + + /** + * Get the authType property: Authentication type discriminator. + * + * @return the authType value. + */ + @Override + public PlatformConsoleAuthType authType() { + return this.authType; + } + + /** + * Get the username property: Username that was configured for the console session. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Get the role property: Role assigned to the user on the platform console. + * + * @return the role value. + */ + public PlatformConsoleRole role() { + return this.role; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("role", this.role == null ? null : this.role.toString()); + jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SshPlatformConsoleAuthResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SshPlatformConsoleAuthResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SshPlatformConsoleAuthResult. + */ + public static SshPlatformConsoleAuthResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SshPlatformConsoleAuthResult deserializedSshPlatformConsoleAuthResult = new SshPlatformConsoleAuthResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedSshPlatformConsoleAuthResult.username = reader.getString(); + } else if ("role".equals(fieldName)) { + deserializedSshPlatformConsoleAuthResult.role = PlatformConsoleRole.fromString(reader.getString()); + } else if ("authType".equals(fieldName)) { + deserializedSshPlatformConsoleAuthResult.authType + = PlatformConsoleAuthType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSshPlatformConsoleAuthResult; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePool.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePool.java index 6532a46ddbab..5b48e37191d0 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePool.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePool.java @@ -435,4 +435,48 @@ interface WithProperties { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void repairAvsConnection(Context context); + + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @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 one-time activation code for platform console access along with {@link Response}. + */ + Response listPlatformConsoleActivationCodeWithResponse(Context context); + + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @throws com.azure.core.management.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 one-time activation code for platform console access. + */ + PlatformConsoleActivationCode listPlatformConsoleActivationCode(); + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param config Platform console authentication configuration. + * @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 base model for platform console authentication result along with {@link Response}. + */ + Response configurePlatformConsoleAuthWithResponse(PlatformConsoleAuthConfig config, + Context context); + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param config Platform console authentication configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 base model for platform console authentication result. + */ + PlatformConsoleAuthResult configurePlatformConsoleAuth(PlatformConsoleAuthConfig config); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolProperties.java index 7e5c6c4aef24..156248a9a262 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolProperties.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolProperties.java @@ -61,6 +61,11 @@ public final class StoragePoolProperties implements JsonSerializable listPlatformConsoleActivationCodeWithResponse(String resourceGroupName, + String storagePoolName, Context context); + + /** + * Returns a one-time activation code for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 one-time activation code for platform console access. + */ + PlatformConsoleActivationCode listPlatformConsoleActivationCode(String resourceGroupName, String storagePoolName); + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param config Platform console authentication configuration. + * @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 base model for platform console authentication result along with {@link Response}. + */ + Response configurePlatformConsoleAuthWithResponse(String resourceGroupName, + String storagePoolName, PlatformConsoleAuthConfig config, Context context); + + /** + * Configure authentication settings for platform console access to the storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param config Platform console authentication configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 base model for platform console authentication result. + */ + PlatformConsoleAuthResult configurePlatformConsoleAuth(String resourceGroupName, String storagePoolName, + PlatformConsoleAuthConfig config); + /** * Get a storage pool. * diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volume.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volume.java new file mode 100644 index 000000000000..b6b51e765e0e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volume.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner; + +/** + * An immutable client-side representation of Volume. + */ +public interface Volume { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + AzureVolumeProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner object. + * + * @return the inner object. + */ + VolumeInner innerModel(); + + /** + * The entirety of the Volume definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Volume definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Volume definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Volume definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, storagePoolName, volumeGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @return the next definition stage. + */ + WithCreate withExistingVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName); + } + + /** + * The stage of the Volume 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + Volume create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Volume create(Context context); + } + + /** + * The stage of the Volume definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(AzureVolumeProperties properties); + } + } + + /** + * Begins update for the Volume resource. + * + * @return the stage of resource update. + */ + Volume.Update update(); + + /** + * The template for Volume update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Volume apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Volume apply(Context context); + } + + /** + * The Volume update stages. + */ + interface UpdateStages { + /** + * The stage of the Volume update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(VolumeUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Volume refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Volume refresh(Context context); + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param body 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. + */ + void overwrite(VolumeOverwriteRequest body); + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param body 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. + */ + void overwrite(VolumeOverwriteRequest body, Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroup.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroup.java new file mode 100644 index 000000000000..39f657b6c887 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroup.java @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner; +import java.util.Map; + +/** + * An immutable client-side representation of VolumeGroup. + */ +public interface VolumeGroup { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + VolumeGroupProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner object. + * + * @return the inner object. + */ + VolumeGroupInner innerModel(); + + /** + * The entirety of the VolumeGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The VolumeGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the VolumeGroup definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the VolumeGroup 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. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the VolumeGroup definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, storagePoolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @return the next definition stage. + */ + WithCreate withExistingStoragePool(String resourceGroupName, String storagePoolName); + } + + /** + * The stage of the VolumeGroup 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + VolumeGroup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VolumeGroup create(Context context); + } + + /** + * The stage of the VolumeGroup 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 VolumeGroup definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(VolumeGroupProperties properties); + } + } + + /** + * Begins update for the VolumeGroup resource. + * + * @return the stage of resource update. + */ + VolumeGroup.Update update(); + + /** + * The template for VolumeGroup update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + VolumeGroup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + VolumeGroup apply(Context context); + } + + /** + * The VolumeGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the VolumeGroup 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 VolumeGroup update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(VolumeGroupUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + VolumeGroup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + VolumeGroup refresh(Context context); + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @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 connection parameters for ISCSI connection to the volume group along with {@link Response}. + */ + Response listConnectionParametersWithResponse(Context context); + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @throws com.azure.core.management.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 connection parameters for ISCSI connection to the volume group. + */ + ConnectionParametersResponse listConnectionParameters(); + + /** + * Get current status and space information of the volume group. + * + * @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 current status and space information of the volume group along with {@link Response}. + */ + Response getStatusWithResponse(Context context); + + /** + * Get current status and space information of the volume group. + * + * @throws com.azure.core.management.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 current status and space information of the volume group. + */ + VolumeGroupStatus getStatus(); + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param body 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. + */ + void overwrite(VolumeGroupOverwriteRequest body); + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param body 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. + */ + void overwrite(VolumeGroupOverwriteRequest body, Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupOverwriteRequest.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupOverwriteRequest.java new file mode 100644 index 000000000000..8653eb87f1c5 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupOverwriteRequest.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Request to overwrite all volumes in a volume group from a snapshot. + */ +@Fluent +public final class VolumeGroupOverwriteRequest implements JsonSerializable { + /* + * Azure resource ID of the volume group snapshot to restore from + */ + private String sourceSnapshotResourceId; + + /* + * Azure resource ID of the source volume group + */ + private String sourceVolumeGroupResourceId; + + /** + * Creates an instance of VolumeGroupOverwriteRequest class. + */ + public VolumeGroupOverwriteRequest() { + } + + /** + * Get the sourceSnapshotResourceId property: Azure resource ID of the volume group snapshot to restore from. + * + * @return the sourceSnapshotResourceId value. + */ + public String sourceSnapshotResourceId() { + return this.sourceSnapshotResourceId; + } + + /** + * Set the sourceSnapshotResourceId property: Azure resource ID of the volume group snapshot to restore from. + * + * @param sourceSnapshotResourceId the sourceSnapshotResourceId value to set. + * @return the VolumeGroupOverwriteRequest object itself. + */ + public VolumeGroupOverwriteRequest withSourceSnapshotResourceId(String sourceSnapshotResourceId) { + this.sourceSnapshotResourceId = sourceSnapshotResourceId; + return this; + } + + /** + * Get the sourceVolumeGroupResourceId property: Azure resource ID of the source volume group. + * + * @return the sourceVolumeGroupResourceId value. + */ + public String sourceVolumeGroupResourceId() { + return this.sourceVolumeGroupResourceId; + } + + /** + * Set the sourceVolumeGroupResourceId property: Azure resource ID of the source volume group. + * + * @param sourceVolumeGroupResourceId the sourceVolumeGroupResourceId value to set. + * @return the VolumeGroupOverwriteRequest object itself. + */ + public VolumeGroupOverwriteRequest withSourceVolumeGroupResourceId(String sourceVolumeGroupResourceId) { + this.sourceVolumeGroupResourceId = sourceVolumeGroupResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceSnapshotResourceId", this.sourceSnapshotResourceId); + jsonWriter.writeStringField("sourceVolumeGroupResourceId", this.sourceVolumeGroupResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupOverwriteRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupOverwriteRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeGroupOverwriteRequest. + */ + public static VolumeGroupOverwriteRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupOverwriteRequest deserializedVolumeGroupOverwriteRequest = new VolumeGroupOverwriteRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceSnapshotResourceId".equals(fieldName)) { + deserializedVolumeGroupOverwriteRequest.sourceSnapshotResourceId = reader.getString(); + } else if ("sourceVolumeGroupResourceId".equals(fieldName)) { + deserializedVolumeGroupOverwriteRequest.sourceVolumeGroupResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupOverwriteRequest; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupProperties.java new file mode 100644 index 000000000000..d11f71e5f9a4 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupProperties.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of a volume group. + */ +@Fluent +public final class VolumeGroupProperties implements JsonSerializable { + /* + * Pure Storage's internal ID of the storage pool + */ + private String storagePoolInternalId; + + /* + * Pure Storage's internal ID of the volume group + */ + private String volumeGroupInternalId; + + /* + * Azure resource ID of the source volume group for cloning + */ + private String sourceVolumeGroupResourceId; + + /* + * Indicates the source type for volume group creation + */ + private VolumeGroupSourceType sourceType; + + /* + * Azure resource ID of the volume group snapshot to restore from + */ + private String sourceSnapshotResourceId; + + /* + * Azure resource ID of the soft-deleted volume group to recover + */ + private String sourceRecoverableVolumeGroupResourceId; + + /* + * Performance parameters for the volume group + */ + private PerformanceParameters performanceParameters; + + /* + * Protection parameters for the volume group + */ + private ProtectionParameters protectionParameters; + + /* + * Provisioning state of the resource + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of VolumeGroupProperties class. + */ + public VolumeGroupProperties() { + } + + /** + * Get the storagePoolInternalId property: Pure Storage's internal ID of the storage pool. + * + * @return the storagePoolInternalId value. + */ + public String storagePoolInternalId() { + return this.storagePoolInternalId; + } + + /** + * Get the volumeGroupInternalId property: Pure Storage's internal ID of the volume group. + * + * @return the volumeGroupInternalId value. + */ + public String volumeGroupInternalId() { + return this.volumeGroupInternalId; + } + + /** + * Get the sourceVolumeGroupResourceId property: Azure resource ID of the source volume group for cloning. + * + * @return the sourceVolumeGroupResourceId value. + */ + public String sourceVolumeGroupResourceId() { + return this.sourceVolumeGroupResourceId; + } + + /** + * Set the sourceVolumeGroupResourceId property: Azure resource ID of the source volume group for cloning. + * + * @param sourceVolumeGroupResourceId the sourceVolumeGroupResourceId value to set. + * @return the VolumeGroupProperties object itself. + */ + public VolumeGroupProperties withSourceVolumeGroupResourceId(String sourceVolumeGroupResourceId) { + this.sourceVolumeGroupResourceId = sourceVolumeGroupResourceId; + return this; + } + + /** + * Get the sourceType property: Indicates the source type for volume group creation. + * + * @return the sourceType value. + */ + public VolumeGroupSourceType sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: Indicates the source type for volume group creation. + * + * @param sourceType the sourceType value to set. + * @return the VolumeGroupProperties object itself. + */ + public VolumeGroupProperties withSourceType(VolumeGroupSourceType sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the sourceSnapshotResourceId property: Azure resource ID of the volume group snapshot to restore from. + * + * @return the sourceSnapshotResourceId value. + */ + public String sourceSnapshotResourceId() { + return this.sourceSnapshotResourceId; + } + + /** + * Set the sourceSnapshotResourceId property: Azure resource ID of the volume group snapshot to restore from. + * + * @param sourceSnapshotResourceId the sourceSnapshotResourceId value to set. + * @return the VolumeGroupProperties object itself. + */ + public VolumeGroupProperties withSourceSnapshotResourceId(String sourceSnapshotResourceId) { + this.sourceSnapshotResourceId = sourceSnapshotResourceId; + return this; + } + + /** + * Get the sourceRecoverableVolumeGroupResourceId property: Azure resource ID of the soft-deleted volume group to + * recover. + * + * @return the sourceRecoverableVolumeGroupResourceId value. + */ + public String sourceRecoverableVolumeGroupResourceId() { + return this.sourceRecoverableVolumeGroupResourceId; + } + + /** + * Set the sourceRecoverableVolumeGroupResourceId property: Azure resource ID of the soft-deleted volume group to + * recover. + * + * @param sourceRecoverableVolumeGroupResourceId the sourceRecoverableVolumeGroupResourceId value to set. + * @return the VolumeGroupProperties object itself. + */ + public VolumeGroupProperties + withSourceRecoverableVolumeGroupResourceId(String sourceRecoverableVolumeGroupResourceId) { + this.sourceRecoverableVolumeGroupResourceId = sourceRecoverableVolumeGroupResourceId; + return this; + } + + /** + * Get the performanceParameters property: Performance parameters for the volume group. + * + * @return the performanceParameters value. + */ + public PerformanceParameters performanceParameters() { + return this.performanceParameters; + } + + /** + * Set the performanceParameters property: Performance parameters for the volume group. + * + * @param performanceParameters the performanceParameters value to set. + * @return the VolumeGroupProperties object itself. + */ + public VolumeGroupProperties withPerformanceParameters(PerformanceParameters performanceParameters) { + this.performanceParameters = performanceParameters; + return this; + } + + /** + * Get the protectionParameters property: Protection parameters for the volume group. + * + * @return the protectionParameters value. + */ + public ProtectionParameters protectionParameters() { + return this.protectionParameters; + } + + /** + * Set the protectionParameters property: Protection parameters for the volume group. + * + * @param protectionParameters the protectionParameters value to set. + * @return the VolumeGroupProperties object itself. + */ + public VolumeGroupProperties withProtectionParameters(ProtectionParameters protectionParameters) { + this.protectionParameters = protectionParameters; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceVolumeGroupResourceId", this.sourceVolumeGroupResourceId); + jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); + jsonWriter.writeStringField("sourceSnapshotResourceId", this.sourceSnapshotResourceId); + jsonWriter.writeStringField("sourceRecoverableVolumeGroupResourceId", + this.sourceRecoverableVolumeGroupResourceId); + jsonWriter.writeJsonField("performanceParameters", this.performanceParameters); + jsonWriter.writeJsonField("protectionParameters", this.protectionParameters); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupProperties. + */ + public static VolumeGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupProperties deserializedVolumeGroupProperties = new VolumeGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storagePoolInternalId".equals(fieldName)) { + deserializedVolumeGroupProperties.storagePoolInternalId = reader.getString(); + } else if ("volumeGroupInternalId".equals(fieldName)) { + deserializedVolumeGroupProperties.volumeGroupInternalId = reader.getString(); + } else if ("sourceVolumeGroupResourceId".equals(fieldName)) { + deserializedVolumeGroupProperties.sourceVolumeGroupResourceId = reader.getString(); + } else if ("sourceType".equals(fieldName)) { + deserializedVolumeGroupProperties.sourceType = VolumeGroupSourceType.fromString(reader.getString()); + } else if ("sourceSnapshotResourceId".equals(fieldName)) { + deserializedVolumeGroupProperties.sourceSnapshotResourceId = reader.getString(); + } else if ("sourceRecoverableVolumeGroupResourceId".equals(fieldName)) { + deserializedVolumeGroupProperties.sourceRecoverableVolumeGroupResourceId = reader.getString(); + } else if ("performanceParameters".equals(fieldName)) { + deserializedVolumeGroupProperties.performanceParameters = PerformanceParameters.fromJson(reader); + } else if ("protectionParameters".equals(fieldName)) { + deserializedVolumeGroupProperties.protectionParameters = ProtectionParameters.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedVolumeGroupProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupProperties; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshot.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshot.java new file mode 100644 index 000000000000..8013226a454a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshot.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner; + +/** + * An immutable client-side representation of VolumeGroupSnapshot. + */ +public interface VolumeGroupSnapshot { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + VolumeGroupSnapshotProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner object. + * + * @return the inner object. + */ + VolumeGroupSnapshotInner innerModel(); + + /** + * The entirety of the VolumeGroupSnapshot definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The VolumeGroupSnapshot definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the VolumeGroupSnapshot definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the VolumeGroupSnapshot definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, storagePoolName, volumeGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @return the next definition stage. + */ + WithCreate withExistingVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName); + } + + /** + * The stage of the VolumeGroupSnapshot 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + VolumeGroupSnapshot create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VolumeGroupSnapshot create(Context context); + } + + /** + * The stage of the VolumeGroupSnapshot definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(VolumeGroupSnapshotProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + VolumeGroupSnapshot refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + VolumeGroupSnapshot refresh(Context context); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotListRequest.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotListRequest.java new file mode 100644 index 000000000000..cb8a4ddd1678 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotListRequest.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Request payload for listing volume group snapshots. + */ +@Fluent +public final class VolumeGroupSnapshotListRequest implements JsonSerializable { + /* + * OData filter expression (e.g. filter=substringof('sna', name) and space/unique gt 1000) + */ + private String filter; + + /* + * OData order-by expression (e.g. orderby=name asc) + */ + private String orderby; + + /* + * Maximum number of results to return per page + */ + private Integer top; + + /* + * Number of results to skip (page offset) + */ + private Integer skip; + + /** + * Creates an instance of VolumeGroupSnapshotListRequest class. + */ + public VolumeGroupSnapshotListRequest() { + } + + /** + * Get the filter property: OData filter expression (e.g. filter=substringof('sna', name) and space/unique gt 1000). + * + * @return the filter value. + */ + public String filter() { + return this.filter; + } + + /** + * Set the filter property: OData filter expression (e.g. filter=substringof('sna', name) and space/unique gt 1000). + * + * @param filter the filter value to set. + * @return the VolumeGroupSnapshotListRequest object itself. + */ + public VolumeGroupSnapshotListRequest withFilter(String filter) { + this.filter = filter; + return this; + } + + /** + * Get the orderby property: OData order-by expression (e.g. orderby=name asc). + * + * @return the orderby value. + */ + public String orderby() { + return this.orderby; + } + + /** + * Set the orderby property: OData order-by expression (e.g. orderby=name asc). + * + * @param orderby the orderby value to set. + * @return the VolumeGroupSnapshotListRequest object itself. + */ + public VolumeGroupSnapshotListRequest withOrderby(String orderby) { + this.orderby = orderby; + return this; + } + + /** + * Get the top property: Maximum number of results to return per page. + * + * @return the top value. + */ + public Integer top() { + return this.top; + } + + /** + * Set the top property: Maximum number of results to return per page. + * + * @param top the top value to set. + * @return the VolumeGroupSnapshotListRequest object itself. + */ + public VolumeGroupSnapshotListRequest withTop(Integer top) { + this.top = top; + return this; + } + + /** + * Get the skip property: Number of results to skip (page offset). + * + * @return the skip value. + */ + public Integer skip() { + return this.skip; + } + + /** + * Set the skip property: Number of results to skip (page offset). + * + * @param skip the skip value to set. + * @return the VolumeGroupSnapshotListRequest object itself. + */ + public VolumeGroupSnapshotListRequest withSkip(Integer skip) { + this.skip = skip; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filter", this.filter); + jsonWriter.writeStringField("orderby", this.orderby); + jsonWriter.writeNumberField("top", this.top); + jsonWriter.writeNumberField("skip", this.skip); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupSnapshotListRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupSnapshotListRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupSnapshotListRequest. + */ + public static VolumeGroupSnapshotListRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupSnapshotListRequest deserializedVolumeGroupSnapshotListRequest + = new VolumeGroupSnapshotListRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filter".equals(fieldName)) { + deserializedVolumeGroupSnapshotListRequest.filter = reader.getString(); + } else if ("orderby".equals(fieldName)) { + deserializedVolumeGroupSnapshotListRequest.orderby = reader.getString(); + } else if ("top".equals(fieldName)) { + deserializedVolumeGroupSnapshotListRequest.top = reader.getNullable(JsonReader::getInt); + } else if ("skip".equals(fieldName)) { + deserializedVolumeGroupSnapshotListRequest.skip = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupSnapshotListRequest; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotPostListResult.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotPostListResult.java new file mode 100644 index 000000000000..770a780a15d2 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotPostListResult.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotPostListResultInner; +import java.util.List; + +/** + * An immutable client-side representation of VolumeGroupSnapshotPostListResult. + */ +public interface VolumeGroupSnapshotPostListResult { + /** + * Gets the value property: Array of volume group snapshots. + * + * @return the value value. + */ + List value(); + + /** + * Gets the count property: Number of snapshots in this response page. + * + * @return the count value. + */ + Integer count(); + + /** + * Gets the totalCount property: Total number of snapshots. + * + * @return the totalCount value. + */ + Integer totalCount(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotPostListResultInner + * object. + * + * @return the inner object. + */ + VolumeGroupSnapshotPostListResultInner innerModel(); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotProperties.java new file mode 100644 index 000000000000..6085638ca0ac --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotProperties.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Properties of a volume group snapshot. + */ +@Fluent +public final class VolumeGroupSnapshotProperties implements JsonSerializable { + /* + * Azure resource ID of the source snapshot to recover from; omit for a new manual snapshot + */ + private String sourceSnapshotResourceId; + + /* + * Date and time at which the snapshot was created, as an RFC 3339 timestamp + */ + private OffsetDateTime createdAt; + + /* + * Whether the snapshot was created by a protection policy + */ + private Boolean createdByPolicy; + + /* + * Soft-deletion state of the snapshot + */ + private DestroyedStateProperties softDeletion; + + /* + * Storage space usage of the snapshot + */ + private Space space; + + /* + * List of individual volume snapshots included in this volume group snapshot; populated on single-get, empty or + * omitted on list for performance + */ + private List volumeSnapshots; + + /* + * Provisioning state of the resource + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of VolumeGroupSnapshotProperties class. + */ + public VolumeGroupSnapshotProperties() { + } + + /** + * Get the sourceSnapshotResourceId property: Azure resource ID of the source snapshot to recover from; omit for a + * new manual snapshot. + * + * @return the sourceSnapshotResourceId value. + */ + public String sourceSnapshotResourceId() { + return this.sourceSnapshotResourceId; + } + + /** + * Set the sourceSnapshotResourceId property: Azure resource ID of the source snapshot to recover from; omit for a + * new manual snapshot. + * + * @param sourceSnapshotResourceId the sourceSnapshotResourceId value to set. + * @return the VolumeGroupSnapshotProperties object itself. + */ + public VolumeGroupSnapshotProperties withSourceSnapshotResourceId(String sourceSnapshotResourceId) { + this.sourceSnapshotResourceId = sourceSnapshotResourceId; + return this; + } + + /** + * Get the createdAt property: Date and time at which the snapshot was created, as an RFC 3339 timestamp. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the createdByPolicy property: Whether the snapshot was created by a protection policy. + * + * @return the createdByPolicy value. + */ + public Boolean createdByPolicy() { + return this.createdByPolicy; + } + + /** + * Get the softDeletion property: Soft-deletion state of the snapshot. + * + * @return the softDeletion value. + */ + public DestroyedStateProperties softDeletion() { + return this.softDeletion; + } + + /** + * Get the space property: Storage space usage of the snapshot. + * + * @return the space value. + */ + public Space space() { + return this.space; + } + + /** + * Get the volumeSnapshots property: List of individual volume snapshots included in this volume group snapshot; + * populated on single-get, empty or omitted on list for performance. + * + * @return the volumeSnapshots value. + */ + public List volumeSnapshots() { + return this.volumeSnapshots; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceSnapshotResourceId", this.sourceSnapshotResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupSnapshotProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupSnapshotProperties. + */ + public static VolumeGroupSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupSnapshotProperties deserializedVolumeGroupSnapshotProperties + = new VolumeGroupSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceSnapshotResourceId".equals(fieldName)) { + deserializedVolumeGroupSnapshotProperties.sourceSnapshotResourceId = reader.getString(); + } else if ("createdAt".equals(fieldName)) { + deserializedVolumeGroupSnapshotProperties.createdAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("createdByPolicy".equals(fieldName)) { + deserializedVolumeGroupSnapshotProperties.createdByPolicy + = reader.getNullable(JsonReader::getBoolean); + } else if ("softDeletion".equals(fieldName)) { + deserializedVolumeGroupSnapshotProperties.softDeletion = DestroyedStateProperties.fromJson(reader); + } else if ("space".equals(fieldName)) { + deserializedVolumeGroupSnapshotProperties.space = Space.fromJson(reader); + } else if ("volumeSnapshots".equals(fieldName)) { + List volumeSnapshots + = reader.readArray(reader1 -> VolumeSnapshotInfo.fromJson(reader1)); + deserializedVolumeGroupSnapshotProperties.volumeSnapshots = volumeSnapshots; + } else if ("provisioningState".equals(fieldName)) { + deserializedVolumeGroupSnapshotProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupSnapshotProperties; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshots.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshots.java new file mode 100644 index 000000000000..806d6f09c999 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshots.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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 VolumeGroupSnapshots. + */ +public interface VolumeGroupSnapshots { + /** + * Get a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 volume group snapshot along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, String snapshotName, Context context); + + /** + * Get a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 volume group snapshot. + */ + VolumeGroupSnapshot get(String resourceGroupName, String storagePoolName, String volumeGroupName, + String snapshotName); + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, String volumeGroupName, String snapshotName); + + /** + * Delete a volume group snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param snapshotName Name of the volume group snapshot. + * @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 storagePoolName, String volumeGroupName, String snapshotName, + Context context); + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 paged list result for volume group snapshots as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName); + + /** + * List all snapshots for a given volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param filter OData filter expression (e.g. $filter=substringof('sna', name) and space/unique gt 1000). + * @param orderby OData order-by expression (e.g. $orderby=name asc). + * @param top Maximum number of results to return per page. + * @param skip Number of results to skip (page offset). + * @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 paged list result for volume group snapshots as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, + String volumeGroupName, String filter, String orderby, Integer top, Integer skip, Context context); + + /** + * List all snapshots for a given volume group using POST with the same request and response contract. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties Snapshot list 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 list result for volume group snapshots returned by the listSnapshots POST action along with + * {@link Response}. + */ + Response listSnapshotsWithResponse(String resourceGroupName, + String storagePoolName, String volumeGroupName, VolumeGroupSnapshotListRequest properties, Context context); + + /** + * List all snapshots for a given volume group using POST with the same request and response contract. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param properties Snapshot list 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 list result for volume group snapshots returned by the listSnapshots POST action. + */ + VolumeGroupSnapshotPostListResult listSnapshots(String resourceGroupName, String storagePoolName, + String volumeGroupName, VolumeGroupSnapshotListRequest properties); + + /** + * Get a volume group snapshot. + * + * @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 volume group snapshot along with {@link Response}. + */ + VolumeGroupSnapshot getById(String id); + + /** + * Get a volume group snapshot. + * + * @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 volume group snapshot along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a volume group snapshot. + * + * @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 volume group snapshot. + * + * @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 VolumeGroupSnapshot resource. + * + * @param name resource name. + * @return the first stage of the new VolumeGroupSnapshot definition. + */ + VolumeGroupSnapshot.DefinitionStages.Blank define(String name); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSourceType.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSourceType.java new file mode 100644 index 000000000000..5cc63ee70cc9 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSourceType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Source type for volume group creation. + */ +public final class VolumeGroupSourceType extends ExpandableStringEnum { + /** + * No source; create an empty volume group. + */ + public static final VolumeGroupSourceType NONE = fromString("none"); + + /** + * Clone from an existing volume group. + */ + public static final VolumeGroupSourceType VOLUME_GROUP = fromString("volumeGroup"); + + /** + * Restore from a volume group snapshot. + */ + public static final VolumeGroupSourceType SNAPSHOT = fromString("snapshot"); + + /** + * Recover a soft-deleted volume group. + */ + public static final VolumeGroupSourceType RECOVERABLE_VOLUME_GROUP = fromString("recoverableVolumeGroup"); + + /** + * Creates a new instance of VolumeGroupSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VolumeGroupSourceType() { + } + + /** + * Creates or finds a VolumeGroupSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeGroupSourceType. + */ + public static VolumeGroupSourceType fromString(String name) { + return fromString(name, VolumeGroupSourceType.class); + } + + /** + * Gets known VolumeGroupSourceType values. + * + * @return known VolumeGroupSourceType values. + */ + public static Collection values() { + return values(VolumeGroupSourceType.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupStatus.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupStatus.java new file mode 100644 index 000000000000..d3ef8bce4208 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupStatus.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupStatusInner; + +/** + * An immutable client-side representation of VolumeGroupStatus. + */ +public interface VolumeGroupStatus { + /** + * Gets the space property: Storage space usage for the volume group. + * + * @return the space value. + */ + Space space(); + + /** + * Gets the connectedHostCount property: Number of hosts currently connected to the volume group. + * + * @return the connectedHostCount value. + */ + int connectedHostCount(); + + /** + * Gets the inner com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupStatusInner object. + * + * @return the inner object. + */ + VolumeGroupStatusInner innerModel(); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupUpdate.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupUpdate.java new file mode 100644 index 000000000000..92235b627706 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupUpdate.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the VolumeGroup. + */ +@Fluent +public final class VolumeGroupUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private VolumeGroupUpdateProperties properties; + + /** + * Creates an instance of VolumeGroupUpdate class. + */ + public VolumeGroupUpdate() { + } + + /** + * 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 VolumeGroupUpdate object itself. + */ + public VolumeGroupUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public VolumeGroupUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the VolumeGroupUpdate object itself. + */ + public VolumeGroupUpdate withProperties(VolumeGroupUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupUpdate. + */ + public static VolumeGroupUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupUpdate deserializedVolumeGroupUpdate = new VolumeGroupUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVolumeGroupUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedVolumeGroupUpdate.properties = VolumeGroupUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupUpdate; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupUpdateProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupUpdateProperties.java new file mode 100644 index 000000000000..8268b5564635 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupUpdateProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the VolumeGroup. + */ +@Fluent +public final class VolumeGroupUpdateProperties implements JsonSerializable { + /* + * Performance parameters for the volume group + */ + private PerformanceParameters performanceParameters; + + /* + * Protection parameters for the volume group + */ + private ProtectionParameters protectionParameters; + + /** + * Creates an instance of VolumeGroupUpdateProperties class. + */ + public VolumeGroupUpdateProperties() { + } + + /** + * Get the performanceParameters property: Performance parameters for the volume group. + * + * @return the performanceParameters value. + */ + public PerformanceParameters performanceParameters() { + return this.performanceParameters; + } + + /** + * Set the performanceParameters property: Performance parameters for the volume group. + * + * @param performanceParameters the performanceParameters value to set. + * @return the VolumeGroupUpdateProperties object itself. + */ + public VolumeGroupUpdateProperties withPerformanceParameters(PerformanceParameters performanceParameters) { + this.performanceParameters = performanceParameters; + return this; + } + + /** + * Get the protectionParameters property: Protection parameters for the volume group. + * + * @return the protectionParameters value. + */ + public ProtectionParameters protectionParameters() { + return this.protectionParameters; + } + + /** + * Set the protectionParameters property: Protection parameters for the volume group. + * + * @param protectionParameters the protectionParameters value to set. + * @return the VolumeGroupUpdateProperties object itself. + */ + public VolumeGroupUpdateProperties withProtectionParameters(ProtectionParameters protectionParameters) { + this.protectionParameters = protectionParameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("performanceParameters", this.performanceParameters); + jsonWriter.writeJsonField("protectionParameters", this.protectionParameters); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupUpdateProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupUpdateProperties. + */ + public static VolumeGroupUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupUpdateProperties deserializedVolumeGroupUpdateProperties = new VolumeGroupUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("performanceParameters".equals(fieldName)) { + deserializedVolumeGroupUpdateProperties.performanceParameters + = PerformanceParameters.fromJson(reader); + } else if ("protectionParameters".equals(fieldName)) { + deserializedVolumeGroupUpdateProperties.protectionParameters + = ProtectionParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupUpdateProperties; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroups.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroups.java new file mode 100644 index 000000000000..e47fdfdf19d4 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroups.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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 VolumeGroups. + */ +public interface VolumeGroups { + /** + * Get a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 volume group along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String storagePoolName, String volumeGroupName, + Context context); + + /** + * Get a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 volume group. + */ + VolumeGroup get(String resourceGroupName, String storagePoolName, String volumeGroupName); + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, String volumeGroupName); + + /** + * Delete a volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 storagePoolName, String volumeGroupName, Context context); + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 VolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName); + + /** + * List volume groups by storage pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @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 VolumeGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByStoragePool(String resourceGroupName, String storagePoolName, Context context); + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 connection parameters for ISCSI connection to the volume group along with {@link Response}. + */ + Response listConnectionParametersWithResponse(String resourceGroupName, + String storagePoolName, String volumeGroupName, Context context); + + /** + * Get connection parameters for ISCSI connection to the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 connection parameters for ISCSI connection to the volume group. + */ + ConnectionParametersResponse listConnectionParameters(String resourceGroupName, String storagePoolName, + String volumeGroupName); + + /** + * Get current status and space information of the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 current status and space information of the volume group along with {@link Response}. + */ + Response getStatusWithResponse(String resourceGroupName, String storagePoolName, + String volumeGroupName, Context context); + + /** + * Get current status and space information of the volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 current status and space information of the volume group. + */ + VolumeGroupStatus getStatus(String resourceGroupName, String storagePoolName, String volumeGroupName); + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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. + */ + void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body); + + /** + * Restores a volume group to a specific snapshot state, including volume structure and data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param body 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. + */ + void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, + VolumeGroupOverwriteRequest body, Context context); + + /** + * Get a volume group. + * + * @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 volume group along with {@link Response}. + */ + VolumeGroup getById(String id); + + /** + * Get a volume group. + * + * @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 volume group along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a volume group. + * + * @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 volume group. + * + * @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 VolumeGroup resource. + * + * @param name resource name. + * @return the first stage of the new VolumeGroup definition. + */ + VolumeGroup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeOverwriteRequest.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeOverwriteRequest.java new file mode 100644 index 000000000000..2d46a02c1968 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeOverwriteRequest.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Request to overwrite a volume's content from another volume or a snapshot. + */ +@Fluent +public final class VolumeOverwriteRequest implements JsonSerializable { + /* + * Source type for the overwrite operation + */ + private VolumeSourceType sourceType; + + /* + * Azure resource ID of the source volume group. Required when sourceType is 'snapshot' or when the source volume + * belongs to a different volume group than the target. + */ + private String sourceVolumeGroupResourceId; + + /* + * Source volume group snapshot and volume snapshot name to restore from. Used when sourceType is 'snapshot'. + */ + private VolumeSnapshotSource sourceVolumeSnapshot; + + /* + * Serial number of the source volume to overwrite from. Used when sourceType is 'serialNumber'. + */ + private String sourceSerialNumber; + + /* + * Azure resource ID of the source volume to clone from. Used when sourceType is 'volume'. + */ + private String sourceVolumeResourceId; + + /** + * Creates an instance of VolumeOverwriteRequest class. + */ + public VolumeOverwriteRequest() { + } + + /** + * Get the sourceType property: Source type for the overwrite operation. + * + * @return the sourceType value. + */ + public VolumeSourceType sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: Source type for the overwrite operation. + * + * @param sourceType the sourceType value to set. + * @return the VolumeOverwriteRequest object itself. + */ + public VolumeOverwriteRequest withSourceType(VolumeSourceType sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the sourceVolumeGroupResourceId property: Azure resource ID of the source volume group. Required when + * sourceType is 'snapshot' or when the source volume belongs to a different volume group than the target. + * + * @return the sourceVolumeGroupResourceId value. + */ + public String sourceVolumeGroupResourceId() { + return this.sourceVolumeGroupResourceId; + } + + /** + * Set the sourceVolumeGroupResourceId property: Azure resource ID of the source volume group. Required when + * sourceType is 'snapshot' or when the source volume belongs to a different volume group than the target. + * + * @param sourceVolumeGroupResourceId the sourceVolumeGroupResourceId value to set. + * @return the VolumeOverwriteRequest object itself. + */ + public VolumeOverwriteRequest withSourceVolumeGroupResourceId(String sourceVolumeGroupResourceId) { + this.sourceVolumeGroupResourceId = sourceVolumeGroupResourceId; + return this; + } + + /** + * Get the sourceVolumeSnapshot property: Source volume group snapshot and volume snapshot name to restore from. + * Used when sourceType is 'snapshot'. + * + * @return the sourceVolumeSnapshot value. + */ + public VolumeSnapshotSource sourceVolumeSnapshot() { + return this.sourceVolumeSnapshot; + } + + /** + * Set the sourceVolumeSnapshot property: Source volume group snapshot and volume snapshot name to restore from. + * Used when sourceType is 'snapshot'. + * + * @param sourceVolumeSnapshot the sourceVolumeSnapshot value to set. + * @return the VolumeOverwriteRequest object itself. + */ + public VolumeOverwriteRequest withSourceVolumeSnapshot(VolumeSnapshotSource sourceVolumeSnapshot) { + this.sourceVolumeSnapshot = sourceVolumeSnapshot; + return this; + } + + /** + * Get the sourceSerialNumber property: Serial number of the source volume to overwrite from. Used when sourceType + * is 'serialNumber'. + * + * @return the sourceSerialNumber value. + */ + public String sourceSerialNumber() { + return this.sourceSerialNumber; + } + + /** + * Set the sourceSerialNumber property: Serial number of the source volume to overwrite from. Used when sourceType + * is 'serialNumber'. + * + * @param sourceSerialNumber the sourceSerialNumber value to set. + * @return the VolumeOverwriteRequest object itself. + */ + public VolumeOverwriteRequest withSourceSerialNumber(String sourceSerialNumber) { + this.sourceSerialNumber = sourceSerialNumber; + return this; + } + + /** + * Get the sourceVolumeResourceId property: Azure resource ID of the source volume to clone from. Used when + * sourceType is 'volume'. + * + * @return the sourceVolumeResourceId value. + */ + public String sourceVolumeResourceId() { + return this.sourceVolumeResourceId; + } + + /** + * Set the sourceVolumeResourceId property: Azure resource ID of the source volume to clone from. Used when + * sourceType is 'volume'. + * + * @param sourceVolumeResourceId the sourceVolumeResourceId value to set. + * @return the VolumeOverwriteRequest object itself. + */ + public VolumeOverwriteRequest withSourceVolumeResourceId(String sourceVolumeResourceId) { + this.sourceVolumeResourceId = sourceVolumeResourceId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString()); + jsonWriter.writeStringField("sourceVolumeGroupResourceId", this.sourceVolumeGroupResourceId); + jsonWriter.writeJsonField("sourceVolumeSnapshot", this.sourceVolumeSnapshot); + jsonWriter.writeStringField("sourceSerialNumber", this.sourceSerialNumber); + jsonWriter.writeStringField("sourceVolumeResourceId", this.sourceVolumeResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeOverwriteRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeOverwriteRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeOverwriteRequest. + */ + public static VolumeOverwriteRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeOverwriteRequest deserializedVolumeOverwriteRequest = new VolumeOverwriteRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceType".equals(fieldName)) { + deserializedVolumeOverwriteRequest.sourceType = VolumeSourceType.fromString(reader.getString()); + } else if ("sourceVolumeGroupResourceId".equals(fieldName)) { + deserializedVolumeOverwriteRequest.sourceVolumeGroupResourceId = reader.getString(); + } else if ("sourceVolumeSnapshot".equals(fieldName)) { + deserializedVolumeOverwriteRequest.sourceVolumeSnapshot = VolumeSnapshotSource.fromJson(reader); + } else if ("sourceSerialNumber".equals(fieldName)) { + deserializedVolumeOverwriteRequest.sourceSerialNumber = reader.getString(); + } else if ("sourceVolumeResourceId".equals(fieldName)) { + deserializedVolumeOverwriteRequest.sourceVolumeResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeOverwriteRequest; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSnapshotInfo.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSnapshotInfo.java new file mode 100644 index 000000000000..602ce7427972 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSnapshotInfo.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Information about an individual volume snapshot within a volume group snapshot. + */ +@Immutable +public final class VolumeSnapshotInfo implements JsonSerializable { + /* + * Name of the volume snapshot + */ + private String name; + + /* + * Storage space usage of the volume snapshot + */ + private Space space; + + /* + * Provisioned size of the volume, in bytes + */ + private Long provisionedSize; + + /* + * Serial number of the volume + */ + private String serialNumber; + + /** + * Creates an instance of VolumeSnapshotInfo class. + */ + private VolumeSnapshotInfo() { + } + + /** + * Get the name property: Name of the volume snapshot. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the space property: Storage space usage of the volume snapshot. + * + * @return the space value. + */ + public Space space() { + return this.space; + } + + /** + * Get the provisionedSize property: Provisioned size of the volume, in bytes. + * + * @return the provisionedSize value. + */ + public Long provisionedSize() { + return this.provisionedSize; + } + + /** + * Get the serialNumber property: Serial number of the volume. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeSnapshotInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeSnapshotInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeSnapshotInfo. + */ + public static VolumeSnapshotInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeSnapshotInfo deserializedVolumeSnapshotInfo = new VolumeSnapshotInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedVolumeSnapshotInfo.name = reader.getString(); + } else if ("space".equals(fieldName)) { + deserializedVolumeSnapshotInfo.space = Space.fromJson(reader); + } else if ("provisionedSize".equals(fieldName)) { + deserializedVolumeSnapshotInfo.provisionedSize = reader.getNullable(JsonReader::getLong); + } else if ("serialNumber".equals(fieldName)) { + deserializedVolumeSnapshotInfo.serialNumber = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeSnapshotInfo; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSnapshotSource.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSnapshotSource.java new file mode 100644 index 000000000000..197864d22451 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSnapshotSource.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Identifies the specific volume snapshot within a volume group snapshot to restore from. + */ +@Fluent +public final class VolumeSnapshotSource implements JsonSerializable { + /* + * Azure resource ID of the volume group snapshot containing the desired volume snapshot + */ + private String volumeGroupSnapshotResourceId; + + /* + * Name of the volume snapshot within the volume group snapshot + */ + private String volumeSnapshotName; + + /** + * Creates an instance of VolumeSnapshotSource class. + */ + public VolumeSnapshotSource() { + } + + /** + * Get the volumeGroupSnapshotResourceId property: Azure resource ID of the volume group snapshot containing the + * desired volume snapshot. + * + * @return the volumeGroupSnapshotResourceId value. + */ + public String volumeGroupSnapshotResourceId() { + return this.volumeGroupSnapshotResourceId; + } + + /** + * Set the volumeGroupSnapshotResourceId property: Azure resource ID of the volume group snapshot containing the + * desired volume snapshot. + * + * @param volumeGroupSnapshotResourceId the volumeGroupSnapshotResourceId value to set. + * @return the VolumeSnapshotSource object itself. + */ + public VolumeSnapshotSource withVolumeGroupSnapshotResourceId(String volumeGroupSnapshotResourceId) { + this.volumeGroupSnapshotResourceId = volumeGroupSnapshotResourceId; + return this; + } + + /** + * Get the volumeSnapshotName property: Name of the volume snapshot within the volume group snapshot. + * + * @return the volumeSnapshotName value. + */ + public String volumeSnapshotName() { + return this.volumeSnapshotName; + } + + /** + * Set the volumeSnapshotName property: Name of the volume snapshot within the volume group snapshot. + * + * @param volumeSnapshotName the volumeSnapshotName value to set. + * @return the VolumeSnapshotSource object itself. + */ + public VolumeSnapshotSource withVolumeSnapshotName(String volumeSnapshotName) { + this.volumeSnapshotName = volumeSnapshotName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("volumeGroupSnapshotResourceId", this.volumeGroupSnapshotResourceId); + jsonWriter.writeStringField("volumeSnapshotName", this.volumeSnapshotName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeSnapshotSource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeSnapshotSource if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeSnapshotSource. + */ + public static VolumeSnapshotSource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeSnapshotSource deserializedVolumeSnapshotSource = new VolumeSnapshotSource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("volumeGroupSnapshotResourceId".equals(fieldName)) { + deserializedVolumeSnapshotSource.volumeGroupSnapshotResourceId = reader.getString(); + } else if ("volumeSnapshotName".equals(fieldName)) { + deserializedVolumeSnapshotSource.volumeSnapshotName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeSnapshotSource; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSourceType.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSourceType.java new file mode 100644 index 000000000000..f94f4938af2f --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSourceType.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Source type for volume creation. + */ +public final class VolumeSourceType extends ExpandableStringEnum { + /** + * No source; create an empty volume with the specified provisioned size. + */ + public static final VolumeSourceType NONE = fromString("none"); + + /** + * Clone from an existing volume. + */ + public static final VolumeSourceType VOLUME = fromString("volume"); + + /** + * Import a volume by its serial number. + */ + public static final VolumeSourceType SERIAL_NUMBER = fromString("serialNumber"); + + /** + * Restore from a volume group snapshot. + */ + public static final VolumeSourceType SNAPSHOT = fromString("snapshot"); + + /** + * Recover a soft-deleted volume within the same volume group. + */ + public static final VolumeSourceType RECOVERABLE_VOLUME = fromString("recoverableVolume"); + + /** + * Creates a new instance of VolumeSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VolumeSourceType() { + } + + /** + * Creates or finds a VolumeSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeSourceType. + */ + public static VolumeSourceType fromString(String name) { + return fromString(name, VolumeSourceType.class); + } + + /** + * Gets known VolumeSourceType values. + * + * @return known VolumeSourceType values. + */ + public static Collection values() { + return values(VolumeSourceType.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeUpdate.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeUpdate.java new file mode 100644 index 000000000000..dacc00f5ed3f --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeUpdate.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The type used for update operations of the Volume. + */ +@Fluent +public final class VolumeUpdate implements JsonSerializable { + /* + * The resource-specific properties for this resource. + */ + private VolumeUpdateProperties properties; + + /** + * Creates an instance of VolumeUpdate class. + */ + public VolumeUpdate() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public VolumeUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the VolumeUpdate object itself. + */ + public VolumeUpdate withProperties(VolumeUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeUpdate. + */ + public static VolumeUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeUpdate deserializedVolumeUpdate = new VolumeUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedVolumeUpdate.properties = VolumeUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeUpdate; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeUpdateProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeUpdateProperties.java new file mode 100644 index 000000000000..2821673c31b0 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeUpdateProperties.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the Volume. + */ +@Fluent +public final class VolumeUpdateProperties implements JsonSerializable { + /* + * Currently provisioned size of the volume, in bytes + */ + private Long provisionedSize; + + /** + * Creates an instance of VolumeUpdateProperties class. + */ + public VolumeUpdateProperties() { + } + + /** + * Get the provisionedSize property: Currently provisioned size of the volume, in bytes. + * + * @return the provisionedSize value. + */ + public Long provisionedSize() { + return this.provisionedSize; + } + + /** + * Set the provisionedSize property: Currently provisioned size of the volume, in bytes. + * + * @param provisionedSize the provisionedSize value to set. + * @return the VolumeUpdateProperties object itself. + */ + public VolumeUpdateProperties withProvisionedSize(Long provisionedSize) { + this.provisionedSize = provisionedSize; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("provisionedSize", this.provisionedSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeUpdateProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeUpdateProperties. + */ + public static VolumeUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeUpdateProperties deserializedVolumeUpdateProperties = new VolumeUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisionedSize".equals(fieldName)) { + deserializedVolumeUpdateProperties.provisionedSize = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeUpdateProperties; + }); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volumes.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volumes.java new file mode 100644 index 000000000000..327315fae51e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volumes.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.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 Volumes. + */ +public interface Volumes { + /** + * Get a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 volume along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String storagePoolName, String volumeGroupName, + String volumeName, Context context); + + /** + * Get a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 volume. + */ + Volume get(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName); + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 storagePoolName, String volumeGroupName, String volumeName); + + /** + * Delete a volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @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 storagePoolName, String volumeGroupName, String volumeName, + Context context); + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 Volume list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, String volumeGroupName); + + /** + * List volumes by volume group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @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 Volume list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVolumeGroup(String resourceGroupName, String storagePoolName, String volumeGroupName, + Context context); + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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. + */ + void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeOverwriteRequest body); + + /** + * Overwrites the content of a volume from another volume or a snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storagePoolName Name of the storage pool. + * @param volumeGroupName Name of the volume group. + * @param volumeName Name of the volume. Maximum length is 40 characters during creation; names up to 64 characters + * may appear in list and get responses for system-generated volumes. + * @param body 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. + */ + void overwrite(String resourceGroupName, String storagePoolName, String volumeGroupName, String volumeName, + VolumeOverwriteRequest body, Context context); + + /** + * Get a volume. + * + * @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 volume along with {@link Response}. + */ + Volume getById(String id); + + /** + * Get a volume. + * + * @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 volume along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a volume. + * + * @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 volume. + * + * @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 Volume resource. + * + * @param name resource name. + * @return the first stage of the new Volume definition. + */ + Volume.DefinitionStages.Blank define(String name); +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/resources/META-INF/azure-resourcemanager-purestorageblock_metadata.json b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/resources/META-INF/azure-resourcemanager-purestorageblock_metadata.json index 3e64c262e2ce..78a94b5365b8 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/resources/META-INF/azure-resourcemanager-purestorageblock_metadata.json +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/resources/META-INF/azure-resourcemanager-purestorageblock_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"PureStorage.Block":"2024-11-01"},"crossLanguageDefinitions":{"com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient":"PureStorage.Block.AvsStorageContainerVolumes","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.beginDelete":"PureStorage.Block.AvsStorageContainerVolumes.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.beginUpdate":"PureStorage.Block.AvsStorageContainerVolumes.update","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.delete":"PureStorage.Block.AvsStorageContainerVolumes.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.get":"PureStorage.Block.AvsStorageContainerVolumes.get","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.getWithResponse":"PureStorage.Block.AvsStorageContainerVolumes.get","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.listByAvsStorageContainer":"PureStorage.Block.AvsStorageContainerVolumes.listByAvsStorageContainer","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.update":"PureStorage.Block.AvsStorageContainerVolumes.update","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient":"PureStorage.Block.AvsStorageContainers","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.beginDelete":"PureStorage.Block.AvsStorageContainers.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.delete":"PureStorage.Block.AvsStorageContainers.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.get":"PureStorage.Block.AvsStorageContainers.get","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.getWithResponse":"PureStorage.Block.AvsStorageContainers.get","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.listByStoragePool":"PureStorage.Block.AvsStorageContainers.listByStoragePool","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient":"PureStorage.Block.AvsVmVolumes","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.beginDelete":"PureStorage.Block.AvsVmVolumes.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.beginUpdate":"PureStorage.Block.AvsVmVolumes.update","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.delete":"PureStorage.Block.AvsVmVolumes.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.get":"PureStorage.Block.AvsVmVolumes.get","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.getWithResponse":"PureStorage.Block.AvsVmVolumes.get","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.listByAvsVm":"PureStorage.Block.AvsVmVolumes.listByAvsVm","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.update":"PureStorage.Block.AvsVmVolumes.update","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient":"PureStorage.Block.AvsVms","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.beginDelete":"PureStorage.Block.AvsVms.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.beginUpdate":"PureStorage.Block.AvsVms.update","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.delete":"PureStorage.Block.AvsVms.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.get":"PureStorage.Block.AvsVms.get","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.getWithResponse":"PureStorage.Block.AvsVms.get","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.listByStoragePool":"PureStorage.Block.AvsVms.listByStoragePool","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.update":"PureStorage.Block.AvsVms.update","com.azure.resourcemanager.purestorageblock.fluent.OperationsClient":"PureStorage.Block.Operations","com.azure.resourcemanager.purestorageblock.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.purestorageblock.fluent.PureStorageBlockMgmtClient":"PureStorage.Block","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient":"PureStorage.Block.Reservations","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.beginCreate":"LiftrBase.Storage.Reservations.create","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.beginDelete":"LiftrBase.Storage.Reservations.delete","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.beginUpdate":"LiftrBase.Storage.Reservations.update","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.create":"LiftrBase.Storage.Reservations.create","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.delete":"LiftrBase.Storage.Reservations.delete","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getBillingReport":"PureStorage.Block.Reservations.getBillingReport","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getBillingReportWithResponse":"PureStorage.Block.Reservations.getBillingReport","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getBillingStatus":"PureStorage.Block.Reservations.getBillingStatus","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getBillingStatusWithResponse":"PureStorage.Block.Reservations.getBillingStatus","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getByResourceGroup":"LiftrBase.Storage.Reservations.get","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getByResourceGroupWithResponse":"LiftrBase.Storage.Reservations.get","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getResourceLimits":"PureStorage.Block.Reservations.getResourceLimits","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getResourceLimitsWithResponse":"PureStorage.Block.Reservations.getResourceLimits","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.list":"LiftrBase.Storage.Reservations.listBySubscription","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.listByResourceGroup":"LiftrBase.Storage.Reservations.listByResourceGroup","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.update":"LiftrBase.Storage.Reservations.update","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient":"PureStorage.Block.StoragePools","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginCreate":"PureStorage.Block.StoragePools.create","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginDelete":"PureStorage.Block.StoragePools.delete","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginDisableAvsConnection":"PureStorage.Block.StoragePools.disableAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginEnableAvsConnection":"PureStorage.Block.StoragePools.enableAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginFinalizeAvsConnection":"PureStorage.Block.StoragePools.finalizeAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginRepairAvsConnection":"PureStorage.Block.StoragePools.repairAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginUpdate":"PureStorage.Block.StoragePools.update","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.create":"PureStorage.Block.StoragePools.create","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.delete":"PureStorage.Block.StoragePools.delete","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.disableAvsConnection":"PureStorage.Block.StoragePools.disableAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.enableAvsConnection":"PureStorage.Block.StoragePools.enableAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.finalizeAvsConnection":"PureStorage.Block.StoragePools.finalizeAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getAvsConnection":"PureStorage.Block.StoragePools.getAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getAvsConnectionWithResponse":"PureStorage.Block.StoragePools.getAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getAvsStatus":"PureStorage.Block.StoragePools.getAvsStatus","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getAvsStatusWithResponse":"PureStorage.Block.StoragePools.getAvsStatus","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getByResourceGroup":"PureStorage.Block.StoragePools.get","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getByResourceGroupWithResponse":"PureStorage.Block.StoragePools.get","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getHealthStatus":"PureStorage.Block.StoragePools.getHealthStatus","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getHealthStatusWithResponse":"PureStorage.Block.StoragePools.getHealthStatus","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.list":"PureStorage.Block.StoragePools.listBySubscription","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.listByResourceGroup":"PureStorage.Block.StoragePools.listByResourceGroup","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.repairAvsConnection":"PureStorage.Block.StoragePools.repairAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.update":"PureStorage.Block.StoragePools.update","com.azure.resourcemanager.purestorageblock.fluent.models.AvsConnectionInner":"PureStorage.Block.AvsConnection","com.azure.resourcemanager.purestorageblock.fluent.models.AvsStatusInner":"PureStorage.Block.AvsStatus","com.azure.resourcemanager.purestorageblock.fluent.models.AvsStorageContainerInner":"PureStorage.Block.AvsStorageContainer","com.azure.resourcemanager.purestorageblock.fluent.models.AvsStorageContainerVolumeInner":"PureStorage.Block.AvsStorageContainerVolume","com.azure.resourcemanager.purestorageblock.fluent.models.AvsVmInner":"PureStorage.Block.AvsVm","com.azure.resourcemanager.purestorageblock.fluent.models.AvsVmVolumeInner":"PureStorage.Block.AvsVmVolume","com.azure.resourcemanager.purestorageblock.fluent.models.LimitDetailsInner":"PureStorage.Block.LimitDetails","com.azure.resourcemanager.purestorageblock.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingStatusInner":"PureStorage.Block.ReservationBillingStatus","com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingUsageReportInner":"PureStorage.Block.ReservationBillingUsageReport","com.azure.resourcemanager.purestorageblock.fluent.models.ReservationInner":"LiftrBase.Storage.Reservation","com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolHealthInfoInner":"PureStorage.Block.HealthResponse","com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolInner":"PureStorage.Block.StoragePool","com.azure.resourcemanager.purestorageblock.implementation.PureStorageBlockMgmtClientBuilder":"PureStorage.Block","com.azure.resourcemanager.purestorageblock.implementation.models.AvsStorageContainerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.AvsStorageContainerVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.AvsVmListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.AvsVmVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.purestorageblock.implementation.models.ReservationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.StoragePoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.purestorageblock.models.Address":"LiftrBase.Address","com.azure.resourcemanager.purestorageblock.models.Alert":"PureStorage.Block.Alert","com.azure.resourcemanager.purestorageblock.models.AlertLevel":"PureStorage.Block.AlertLevel","com.azure.resourcemanager.purestorageblock.models.AvsDiskDetails":"PureStorage.Block.AvsDiskDetails","com.azure.resourcemanager.purestorageblock.models.AvsStorageContainerProperties":"PureStorage.Block.AvsStorageContainerProperties","com.azure.resourcemanager.purestorageblock.models.AvsStorageContainerVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.AvsStorageContainerVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.AvsVmDetails":"PureStorage.Block.AvsVmDetails","com.azure.resourcemanager.purestorageblock.models.AvsVmProperties":"PureStorage.Block.AvsVmProperties","com.azure.resourcemanager.purestorageblock.models.AvsVmUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.AvsVmUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.AvsVmVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.AvsVmVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.AzureVmwareService":"PureStorage.Block.AzureVmwareService","com.azure.resourcemanager.purestorageblock.models.BandwidthUsage":"PureStorage.Block.BandwidthUsage","com.azure.resourcemanager.purestorageblock.models.BillingUsageProperty":"PureStorage.Block.BillingUsageProperty","com.azure.resourcemanager.purestorageblock.models.CompanyDetails":"LiftrBase.CompanyDetails","com.azure.resourcemanager.purestorageblock.models.HealthDetails":"PureStorage.Block.HealthDetails","com.azure.resourcemanager.purestorageblock.models.IopsUsage":"PureStorage.Block.IopsUsage","com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.purestorageblock.models.MarketplaceDetails":"LiftrBase.MarketplaceDetails","com.azure.resourcemanager.purestorageblock.models.MarketplaceSubscriptionStatus":"LiftrBase.MarketplaceSubscriptionStatus","com.azure.resourcemanager.purestorageblock.models.OfferDetails":"LiftrBase.OfferDetails","com.azure.resourcemanager.purestorageblock.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.purestorageblock.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.purestorageblock.models.PerformancePolicyLimits":"PureStorage.Block.PerformancePolicyLimits","com.azure.resourcemanager.purestorageblock.models.ProtectionPolicyLimits":"PureStorage.Block.ProtectionPolicyLimits","com.azure.resourcemanager.purestorageblock.models.ProvisioningState":"LiftrBase.ProvisioningState","com.azure.resourcemanager.purestorageblock.models.RangeLimits":"PureStorage.Block.RangeLimits","com.azure.resourcemanager.purestorageblock.models.ReservationPropertiesBaseResourceProperties":"LiftrBase.Storage.ReservationProperties","com.azure.resourcemanager.purestorageblock.models.ReservationUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.ReservationUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.purestorageblock.models.ServiceInitializationHandle":"PureStorage.Block.ServiceInitializationHandle","com.azure.resourcemanager.purestorageblock.models.ServiceInitializationInfo":"PureStorage.Block.ServiceInitializationData","com.azure.resourcemanager.purestorageblock.models.SoftDeletion":"PureStorage.Block.SoftDeletion","com.azure.resourcemanager.purestorageblock.models.Space":"PureStorage.Block.Space","com.azure.resourcemanager.purestorageblock.models.StoragePoolEnableAvsConnectionPost":"PureStorage.Block.StoragePoolEnableAvsConnectionPost","com.azure.resourcemanager.purestorageblock.models.StoragePoolFinalizeAvsConnectionPost":"PureStorage.Block.StoragePoolFinalizeAvsConnectionPost","com.azure.resourcemanager.purestorageblock.models.StoragePoolLimits":"PureStorage.Block.StoragePoolLimits","com.azure.resourcemanager.purestorageblock.models.StoragePoolProperties":"PureStorage.Block.StoragePoolProperties","com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.UsageSeverity":"PureStorage.Block.UsageSeverity","com.azure.resourcemanager.purestorageblock.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.purestorageblock.models.UserDetails":"LiftrBase.UserDetails","com.azure.resourcemanager.purestorageblock.models.VmType":"PureStorage.Block.VmType","com.azure.resourcemanager.purestorageblock.models.VnetInjection":"PureStorage.Block.VnetInjection","com.azure.resourcemanager.purestorageblock.models.VolumeContainerType":"PureStorage.Block.VolumeContainerType","com.azure.resourcemanager.purestorageblock.models.VolumeLimits":"PureStorage.Block.VolumeLimits","com.azure.resourcemanager.purestorageblock.models.VolumeProperties":"PureStorage.Block.VolumeProperties","com.azure.resourcemanager.purestorageblock.models.VolumeType":"PureStorage.Block.VolumeType"},"generatedFiles":["src/main/java/com/azure/resourcemanager/purestorageblock/PureStorageBlockManager.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/AvsStorageContainerVolumesClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/AvsStorageContainersClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/AvsVmVolumesClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/AvsVmsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/PureStorageBlockMgmtClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/ReservationsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/StoragePoolsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsConnectionInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsStatusInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsStorageContainerInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsStorageContainerVolumeInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsVmInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsVmVolumeInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/LimitDetailsInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ReservationBillingStatusInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ReservationBillingUsageReportInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ReservationInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/StoragePoolHealthInfoInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/StoragePoolInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/package-info.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsConnectionImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStatusImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainerImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainerVolumeImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainerVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainerVolumesImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainersClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainersImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmVolumeImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmVolumesImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/LimitDetailsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationBillingStatusImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationBillingUsageReportImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolHealthInfoImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/AvsStorageContainerListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/AvsStorageContainerVolumeListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/AvsVmListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/AvsVmVolumeListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/ReservationListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/StoragePoolListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/package-info.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ActionType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Address.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Alert.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AlertLevel.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsConnection.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsDiskDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStatus.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainer.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerVolume.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerVolumeUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerVolumes.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainers.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVm.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmVolume.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmVolumeUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmVolumes.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVms.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AzureVmwareService.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/BandwidthUsage.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/BillingUsageProperty.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/CompanyDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/HealthDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/IopsUsage.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/LimitDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/MarketplaceDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/MarketplaceSubscriptionStatus.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/OfferDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Operation.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Operations.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Origin.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PerformancePolicyLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ProtectionPolicyLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/RangeLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservation.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationBillingStatus.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationBillingUsageReport.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationPropertiesBaseResourceProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservations.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ServiceInitializationHandle.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ServiceInitializationInfo.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/SoftDeletion.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Space.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePool.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolEnableAvsConnectionPost.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolFinalizeAvsConnectionPost.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolHealthInfo.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePools.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/UsageSeverity.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/UserDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VmType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VnetInjection.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeContainerType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/package-info.java","src/main/java/com/azure/resourcemanager/purestorageblock/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"PureStorage.Block":"2026-05-01-preview"},"crossLanguagePackageId":"PureStorage.Block","crossLanguageVersion":"9e4cb37a0c70","crossLanguageDefinitions":{"com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient":"PureStorage.Block.AvsStorageContainerVolumes","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.beginDelete":"PureStorage.Block.AvsStorageContainerVolumes.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.beginUpdate":"PureStorage.Block.AvsStorageContainerVolumes.update","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.delete":"PureStorage.Block.AvsStorageContainerVolumes.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.get":"PureStorage.Block.AvsStorageContainerVolumes.get","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.getWithResponse":"PureStorage.Block.AvsStorageContainerVolumes.get","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.listByAvsStorageContainer":"PureStorage.Block.AvsStorageContainerVolumes.listByAvsStorageContainer","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainerVolumesClient.update":"PureStorage.Block.AvsStorageContainerVolumes.update","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient":"PureStorage.Block.AvsStorageContainers","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.beginDelete":"PureStorage.Block.AvsStorageContainers.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.delete":"PureStorage.Block.AvsStorageContainers.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.get":"PureStorage.Block.AvsStorageContainers.get","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.getWithResponse":"PureStorage.Block.AvsStorageContainers.get","com.azure.resourcemanager.purestorageblock.fluent.AvsStorageContainersClient.listByStoragePool":"PureStorage.Block.AvsStorageContainers.listByStoragePool","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient":"PureStorage.Block.AvsVmVolumes","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.beginDelete":"PureStorage.Block.AvsVmVolumes.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.beginUpdate":"PureStorage.Block.AvsVmVolumes.update","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.delete":"PureStorage.Block.AvsVmVolumes.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.get":"PureStorage.Block.AvsVmVolumes.get","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.getWithResponse":"PureStorage.Block.AvsVmVolumes.get","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.listByAvsVm":"PureStorage.Block.AvsVmVolumes.listByAvsVm","com.azure.resourcemanager.purestorageblock.fluent.AvsVmVolumesClient.update":"PureStorage.Block.AvsVmVolumes.update","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient":"PureStorage.Block.AvsVms","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.beginDelete":"PureStorage.Block.AvsVms.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.beginUpdate":"PureStorage.Block.AvsVms.update","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.delete":"PureStorage.Block.AvsVms.delete","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.get":"PureStorage.Block.AvsVms.get","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.getWithResponse":"PureStorage.Block.AvsVms.get","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.listByStoragePool":"PureStorage.Block.AvsVms.listByStoragePool","com.azure.resourcemanager.purestorageblock.fluent.AvsVmsClient.update":"PureStorage.Block.AvsVms.update","com.azure.resourcemanager.purestorageblock.fluent.OperationsClient":"PureStorage.Block.Operations","com.azure.resourcemanager.purestorageblock.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.purestorageblock.fluent.PureStorageBlockMgmtClient":"PureStorage.Block","com.azure.resourcemanager.purestorageblock.fluent.RecoverableVolumeGroupsClient":"PureStorage.Block.RecoverableVolumeGroups","com.azure.resourcemanager.purestorageblock.fluent.RecoverableVolumeGroupsClient.beginDelete":"PureStorage.Block.RecoverableVolumeGroups.delete","com.azure.resourcemanager.purestorageblock.fluent.RecoverableVolumeGroupsClient.delete":"PureStorage.Block.RecoverableVolumeGroups.delete","com.azure.resourcemanager.purestorageblock.fluent.RecoverableVolumeGroupsClient.get":"PureStorage.Block.RecoverableVolumeGroups.get","com.azure.resourcemanager.purestorageblock.fluent.RecoverableVolumeGroupsClient.getWithResponse":"PureStorage.Block.RecoverableVolumeGroups.get","com.azure.resourcemanager.purestorageblock.fluent.RecoverableVolumeGroupsClient.listByStoragePool":"PureStorage.Block.RecoverableVolumeGroups.listByStoragePool","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient":"PureStorage.Block.Reservations","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.beginCreate":"LiftrBase.Storage.Reservations.create","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.beginDelete":"LiftrBase.Storage.Reservations.delete","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.beginLinkSaaS":"PureStorage.Block.Reservations.linkSaaS","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.beginUpdate":"LiftrBase.Storage.Reservations.update","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.create":"LiftrBase.Storage.Reservations.create","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.delete":"LiftrBase.Storage.Reservations.delete","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getBillingReport":"PureStorage.Block.Reservations.getBillingReport","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getBillingReportWithResponse":"PureStorage.Block.Reservations.getBillingReport","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getBillingStatus":"PureStorage.Block.Reservations.getBillingStatus","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getBillingStatusWithResponse":"PureStorage.Block.Reservations.getBillingStatus","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getByResourceGroup":"LiftrBase.Storage.Reservations.get","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getByResourceGroupWithResponse":"LiftrBase.Storage.Reservations.get","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getResourceLimits":"PureStorage.Block.Reservations.getResourceLimits","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.getResourceLimitsWithResponse":"PureStorage.Block.Reservations.getResourceLimits","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.latestLinkedSaaS":"PureStorage.Block.Reservations.latestLinkedSaaS","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.latestLinkedSaaSWithResponse":"PureStorage.Block.Reservations.latestLinkedSaaS","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.linkSaaS":"PureStorage.Block.Reservations.linkSaaS","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.list":"LiftrBase.Storage.Reservations.listBySubscription","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.listByResourceGroup":"LiftrBase.Storage.Reservations.listByResourceGroup","com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient.update":"LiftrBase.Storage.Reservations.update","com.azure.resourcemanager.purestorageblock.fluent.SaaSOperationGroupsClient":"PureStorage.Block.SaaSOperationGroup","com.azure.resourcemanager.purestorageblock.fluent.SaaSOperationGroupsClient.activateResource":"PureStorage.Block.SaaSOperationGroup.activateResource","com.azure.resourcemanager.purestorageblock.fluent.SaaSOperationGroupsClient.beginActivateResource":"PureStorage.Block.SaaSOperationGroup.activateResource","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient":"PureStorage.Block.StoragePools","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginCreate":"PureStorage.Block.StoragePools.create","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginDelete":"PureStorage.Block.StoragePools.delete","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginDisableAvsConnection":"PureStorage.Block.StoragePools.disableAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginEnableAvsConnection":"PureStorage.Block.StoragePools.enableAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginFinalizeAvsConnection":"PureStorage.Block.StoragePools.finalizeAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginRepairAvsConnection":"PureStorage.Block.StoragePools.repairAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.beginUpdate":"PureStorage.Block.StoragePools.update","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.configurePlatformConsoleAuth":"PureStorage.Block.StoragePools.configurePlatformConsoleAuth","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.configurePlatformConsoleAuthWithResponse":"PureStorage.Block.StoragePools.configurePlatformConsoleAuth","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.create":"PureStorage.Block.StoragePools.create","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.delete":"PureStorage.Block.StoragePools.delete","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.disableAvsConnection":"PureStorage.Block.StoragePools.disableAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.enableAvsConnection":"PureStorage.Block.StoragePools.enableAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.finalizeAvsConnection":"PureStorage.Block.StoragePools.finalizeAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getAvsConnection":"PureStorage.Block.StoragePools.getAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getAvsConnectionWithResponse":"PureStorage.Block.StoragePools.getAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getAvsStatus":"PureStorage.Block.StoragePools.getAvsStatus","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getAvsStatusWithResponse":"PureStorage.Block.StoragePools.getAvsStatus","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getByResourceGroup":"PureStorage.Block.StoragePools.get","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getByResourceGroupWithResponse":"PureStorage.Block.StoragePools.get","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getHealthStatus":"PureStorage.Block.StoragePools.getHealthStatus","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.getHealthStatusWithResponse":"PureStorage.Block.StoragePools.getHealthStatus","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.list":"PureStorage.Block.StoragePools.listBySubscription","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.listByResourceGroup":"PureStorage.Block.StoragePools.listByResourceGroup","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.listPlatformConsoleActivationCode":"PureStorage.Block.StoragePools.listPlatformConsoleActivationCode","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.listPlatformConsoleActivationCodeWithResponse":"PureStorage.Block.StoragePools.listPlatformConsoleActivationCode","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.repairAvsConnection":"PureStorage.Block.StoragePools.repairAvsConnection","com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient.update":"PureStorage.Block.StoragePools.update","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient":"PureStorage.Block.VolumeGroupSnapshots","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.beginCreate":"PureStorage.Block.VolumeGroupSnapshots.create","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.beginDelete":"PureStorage.Block.VolumeGroupSnapshots.delete","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.create":"PureStorage.Block.VolumeGroupSnapshots.create","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.delete":"PureStorage.Block.VolumeGroupSnapshots.delete","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.get":"PureStorage.Block.VolumeGroupSnapshots.get","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.getWithResponse":"PureStorage.Block.VolumeGroupSnapshots.get","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.listByVolumeGroup":"PureStorage.Block.VolumeGroupSnapshots.listByVolumeGroup","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.listSnapshots":"PureStorage.Block.VolumeGroupSnapshots.listSnapshots","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupSnapshotsClient.listSnapshotsWithResponse":"PureStorage.Block.VolumeGroupSnapshots.listSnapshots","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient":"PureStorage.Block.VolumeGroups","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.beginCreate":"PureStorage.Block.VolumeGroups.create","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.beginDelete":"PureStorage.Block.VolumeGroups.delete","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.beginOverwrite":"PureStorage.Block.VolumeGroups.overwrite","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.beginUpdate":"PureStorage.Block.VolumeGroups.update","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.create":"PureStorage.Block.VolumeGroups.create","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.delete":"PureStorage.Block.VolumeGroups.delete","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.get":"PureStorage.Block.VolumeGroups.get","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.getStatus":"PureStorage.Block.VolumeGroups.getStatus","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.getStatusWithResponse":"PureStorage.Block.VolumeGroups.getStatus","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.getWithResponse":"PureStorage.Block.VolumeGroups.get","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.listByStoragePool":"PureStorage.Block.VolumeGroups.listByStoragePool","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.listConnectionParameters":"PureStorage.Block.VolumeGroups.listConnectionParameters","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.listConnectionParametersWithResponse":"PureStorage.Block.VolumeGroups.listConnectionParameters","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.overwrite":"PureStorage.Block.VolumeGroups.overwrite","com.azure.resourcemanager.purestorageblock.fluent.VolumeGroupsClient.update":"PureStorage.Block.VolumeGroups.update","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient":"PureStorage.Block.Volumes","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.beginCreate":"PureStorage.Block.Volumes.create","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.beginDelete":"PureStorage.Block.Volumes.delete","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.beginOverwrite":"PureStorage.Block.Volumes.overwrite","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.beginUpdate":"PureStorage.Block.Volumes.update","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.create":"PureStorage.Block.Volumes.create","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.delete":"PureStorage.Block.Volumes.delete","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.get":"PureStorage.Block.Volumes.get","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.getWithResponse":"PureStorage.Block.Volumes.get","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.listByVolumeGroup":"PureStorage.Block.Volumes.listByVolumeGroup","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.overwrite":"PureStorage.Block.Volumes.overwrite","com.azure.resourcemanager.purestorageblock.fluent.VolumesClient.update":"PureStorage.Block.Volumes.update","com.azure.resourcemanager.purestorageblock.fluent.models.AvsConnectionInner":"PureStorage.Block.AvsConnection","com.azure.resourcemanager.purestorageblock.fluent.models.AvsStatusInner":"PureStorage.Block.AvsStatus","com.azure.resourcemanager.purestorageblock.fluent.models.AvsStorageContainerInner":"PureStorage.Block.AvsStorageContainer","com.azure.resourcemanager.purestorageblock.fluent.models.AvsStorageContainerVolumeInner":"PureStorage.Block.AvsStorageContainerVolume","com.azure.resourcemanager.purestorageblock.fluent.models.AvsVmInner":"PureStorage.Block.AvsVm","com.azure.resourcemanager.purestorageblock.fluent.models.AvsVmVolumeInner":"PureStorage.Block.AvsVmVolume","com.azure.resourcemanager.purestorageblock.fluent.models.ConnectionParametersResponseInner":"PureStorage.Block.ConnectionParametersResponse","com.azure.resourcemanager.purestorageblock.fluent.models.LatestLinkedSaaSResponseInner":"PureStorage.Block.LatestLinkedSaaSResponse","com.azure.resourcemanager.purestorageblock.fluent.models.LimitDetailsInner":"PureStorage.Block.LimitDetails","com.azure.resourcemanager.purestorageblock.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleActivationCodeInner":"PureStorage.Block.PlatformConsoleActivationCode","com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner":"PureStorage.Block.PlatformConsoleAuthResult","com.azure.resourcemanager.purestorageblock.fluent.models.RecoverableVolumeGroupInner":"PureStorage.Block.RecoverableVolumeGroup","com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingStatusInner":"PureStorage.Block.ReservationBillingStatus","com.azure.resourcemanager.purestorageblock.fluent.models.ReservationBillingUsageReportInner":"PureStorage.Block.ReservationBillingUsageReport","com.azure.resourcemanager.purestorageblock.fluent.models.ReservationInner":"LiftrBase.Storage.Reservation","com.azure.resourcemanager.purestorageblock.fluent.models.SaaSResourceDetailsResponseInner":"PureStorage.Block.SaaSResourceDetailsResponse","com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolHealthInfoInner":"PureStorage.Block.HealthResponse","com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolInner":"PureStorage.Block.StoragePool","com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner":"PureStorage.Block.VolumeGroup","com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner":"PureStorage.Block.VolumeGroupSnapshot","com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotPostListResultInner":"PureStorage.Block.VolumeGroupSnapshotPostListResult","com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupStatusInner":"PureStorage.Block.VolumeGroupStatus","com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner":"PureStorage.Block.Volume","com.azure.resourcemanager.purestorageblock.implementation.PureStorageBlockMgmtClientBuilder":"PureStorage.Block","com.azure.resourcemanager.purestorageblock.implementation.models.AvsStorageContainerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.AvsStorageContainerVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.AvsVmListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.AvsVmVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.purestorageblock.implementation.models.RecoverableVolumeGroupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.ReservationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.StoragePoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.VolumeGroupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.implementation.models.VolumeGroupSnapshotListResult":"PureStorage.Block.VolumeGroupSnapshotListResult","com.azure.resourcemanager.purestorageblock.implementation.models.VolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.purestorageblock.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.purestorageblock.models.ActivateSaaSRequest":"PureStorage.Block.ActivateSaaSRequest","com.azure.resourcemanager.purestorageblock.models.Address":"LiftrBase.Address","com.azure.resourcemanager.purestorageblock.models.Alert":"PureStorage.Block.Alert","com.azure.resourcemanager.purestorageblock.models.AlertLevel":"PureStorage.Block.AlertLevel","com.azure.resourcemanager.purestorageblock.models.AvsDiskDetails":"PureStorage.Block.AvsDiskDetails","com.azure.resourcemanager.purestorageblock.models.AvsStorageContainerProperties":"PureStorage.Block.AvsStorageContainerProperties","com.azure.resourcemanager.purestorageblock.models.AvsStorageContainerVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.AvsStorageContainerVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.AvsVmDetails":"PureStorage.Block.AvsVmDetails","com.azure.resourcemanager.purestorageblock.models.AvsVmProperties":"PureStorage.Block.AvsVmProperties","com.azure.resourcemanager.purestorageblock.models.AvsVmUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.AvsVmUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.AvsVmVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.AvsVmVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.AzureVmwareService":"PureStorage.Block.AzureVmwareService","com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties":"PureStorage.Block.AzureVolumeProperties","com.azure.resourcemanager.purestorageblock.models.BandwidthUsage":"PureStorage.Block.BandwidthUsage","com.azure.resourcemanager.purestorageblock.models.BillingUsageProperty":"PureStorage.Block.BillingUsageProperty","com.azure.resourcemanager.purestorageblock.models.CompanyDetails":"LiftrBase.CompanyDetails","com.azure.resourcemanager.purestorageblock.models.DestroyedStateProperties":"PureStorage.Block.DestroyedStateProperties","com.azure.resourcemanager.purestorageblock.models.HealthDetails":"PureStorage.Block.HealthDetails","com.azure.resourcemanager.purestorageblock.models.IopsUsage":"PureStorage.Block.IopsUsage","com.azure.resourcemanager.purestorageblock.models.IscsiConnectionParameters":"PureStorage.Block.IscsiConnectionParameters","com.azure.resourcemanager.purestorageblock.models.IscsiEndpoint":"PureStorage.Block.IscsiEndpoint","com.azure.resourcemanager.purestorageblock.models.LinkSaaSRequest":"PureStorage.Block.LinkSaaSRequest","com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.purestorageblock.models.MarketplaceDetails":"LiftrBase.MarketplaceDetails","com.azure.resourcemanager.purestorageblock.models.MarketplaceSubscriptionStatus":"LiftrBase.MarketplaceSubscriptionStatus","com.azure.resourcemanager.purestorageblock.models.OfferDetails":"LiftrBase.OfferDetails","com.azure.resourcemanager.purestorageblock.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.purestorageblock.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.purestorageblock.models.PerformanceParameters":"PureStorage.Block.PerformanceParameters","com.azure.resourcemanager.purestorageblock.models.PerformancePolicyLimits":"PureStorage.Block.PerformancePolicyLimits","com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAccessSettings":"PureStorage.Block.PlatformConsoleAccessSettings","com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthConfig":"PureStorage.Block.PlatformConsoleAuthConfig","com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthType":"PureStorage.Block.PlatformConsoleAuthType","com.azure.resourcemanager.purestorageblock.models.PlatformConsoleRole":"PureStorage.Block.PlatformConsoleRole","com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSettings":"PureStorage.Block.PlatformConsoleSettings","com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSubnet":"PureStorage.Block.PlatformConsoleSubnet","com.azure.resourcemanager.purestorageblock.models.ProtectionParameters":"PureStorage.Block.ProtectionParameters","com.azure.resourcemanager.purestorageblock.models.ProtectionPolicyLimits":"PureStorage.Block.ProtectionPolicyLimits","com.azure.resourcemanager.purestorageblock.models.ProvisioningState":"LiftrBase.ProvisioningState","com.azure.resourcemanager.purestorageblock.models.RangeLimits":"PureStorage.Block.RangeLimits","com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroupProperties":"PureStorage.Block.RecoverableVolumeGroupProperties","com.azure.resourcemanager.purestorageblock.models.ReservationPropertiesBaseResourceProperties":"LiftrBase.Storage.ReservationProperties","com.azure.resourcemanager.purestorageblock.models.ReservationUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.ReservationUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.purestorageblock.models.ServiceInitializationHandle":"PureStorage.Block.ServiceInitializationHandle","com.azure.resourcemanager.purestorageblock.models.ServiceInitializationInfo":"PureStorage.Block.ServiceInitializationData","com.azure.resourcemanager.purestorageblock.models.SoftDeletion":"PureStorage.Block.SoftDeletion","com.azure.resourcemanager.purestorageblock.models.Space":"PureStorage.Block.Space","com.azure.resourcemanager.purestorageblock.models.SshPlatformConsoleAuthConfig":"PureStorage.Block.SshPlatformConsoleAuthConfig","com.azure.resourcemanager.purestorageblock.models.SshPlatformConsoleAuthResult":"PureStorage.Block.SshPlatformConsoleAuthResult","com.azure.resourcemanager.purestorageblock.models.StoragePoolEnableAvsConnectionPost":"PureStorage.Block.StoragePoolEnableAvsConnectionPost","com.azure.resourcemanager.purestorageblock.models.StoragePoolFinalizeAvsConnectionPost":"PureStorage.Block.StoragePoolFinalizeAvsConnectionPost","com.azure.resourcemanager.purestorageblock.models.StoragePoolLimits":"PureStorage.Block.StoragePoolLimits","com.azure.resourcemanager.purestorageblock.models.StoragePoolProperties":"PureStorage.Block.StoragePoolProperties","com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.UsageSeverity":"PureStorage.Block.UsageSeverity","com.azure.resourcemanager.purestorageblock.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.purestorageblock.models.UserDetails":"LiftrBase.UserDetails","com.azure.resourcemanager.purestorageblock.models.VmType":"PureStorage.Block.VmType","com.azure.resourcemanager.purestorageblock.models.VnetInjection":"PureStorage.Block.VnetInjection","com.azure.resourcemanager.purestorageblock.models.VolumeContainerType":"PureStorage.Block.VolumeContainerType","com.azure.resourcemanager.purestorageblock.models.VolumeGroupOverwriteRequest":"PureStorage.Block.VolumeGroupOverwriteRequest","com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties":"PureStorage.Block.VolumeGroupProperties","com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotListRequest":"PureStorage.Block.VolumeGroupSnapshotListRequest","com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotProperties":"PureStorage.Block.VolumeGroupSnapshotProperties","com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType":"PureStorage.Block.VolumeGroupSourceType","com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.purestorageblock.models.VolumeLimits":"PureStorage.Block.VolumeLimits","com.azure.resourcemanager.purestorageblock.models.VolumeOverwriteRequest":"PureStorage.Block.VolumeOverwriteRequest","com.azure.resourcemanager.purestorageblock.models.VolumeProperties":"PureStorage.Block.VolumeProperties","com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotInfo":"PureStorage.Block.VolumeSnapshotInfo","com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotSource":"PureStorage.Block.VolumeSnapshotSource","com.azure.resourcemanager.purestorageblock.models.VolumeSourceType":"PureStorage.Block.VolumeSourceType","com.azure.resourcemanager.purestorageblock.models.VolumeType":"PureStorage.Block.VolumeType","com.azure.resourcemanager.purestorageblock.models.VolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.purestorageblock.models.VolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties"},"generatedFiles":["src/main/java/com/azure/resourcemanager/purestorageblock/PureStorageBlockManager.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/AvsStorageContainerVolumesClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/AvsStorageContainersClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/AvsVmVolumesClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/AvsVmsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/PureStorageBlockMgmtClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/RecoverableVolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/ReservationsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/SaaSOperationGroupsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/StoragePoolsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupSnapshotsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsConnectionInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsStatusInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsStorageContainerInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsStorageContainerVolumeInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsVmInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/AvsVmVolumeInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ConnectionParametersResponseInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/LatestLinkedSaaSResponseInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/LimitDetailsInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/PlatformConsoleActivationCodeInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/PlatformConsoleAuthResultInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/RecoverableVolumeGroupInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ReservationBillingStatusInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ReservationBillingUsageReportInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/ReservationInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/SaaSResourceDetailsResponseInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/StoragePoolHealthInfoInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/StoragePoolInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupSnapshotInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupSnapshotPostListResultInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeGroupStatusInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/package-info.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsConnectionImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStatusImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainerImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainerVolumeImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainerVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainerVolumesImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainersClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsStorageContainersImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmVolumeImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmVolumesImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/AvsVmsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ConnectionParametersResponseImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/LatestLinkedSaaSResponseImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/LimitDetailsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PlatformConsoleActivationCodeImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PlatformConsoleAuthResultImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientBuilder.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/RecoverableVolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationBillingStatusImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationBillingUsageReportImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ReservationsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSOperationGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSOperationGroupsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/SaaSResourceDetailsResponseImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolHealthInfoImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/StoragePoolsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotPostListResultImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupSnapshotsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupStatusImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/AvsStorageContainerListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/AvsStorageContainerVolumeListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/AvsVmListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/AvsVmVolumeListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/RecoverableVolumeGroupListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/ReservationListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/StoragePoolListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeGroupListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeGroupSnapshotListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/models/VolumeListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/implementation/package-info.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ActionType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ActivateSaaSRequest.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Address.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Alert.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AlertLevel.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsConnection.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsDiskDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStatus.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainer.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerVolume.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerVolumeUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainerVolumes.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsStorageContainers.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVm.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmVolume.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmVolumeUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVmVolumes.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AvsVms.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AzureVmwareService.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/AzureVolumeProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/BandwidthUsage.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/BillingUsageProperty.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/CompanyDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ConnectionParametersResponse.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/DestroyedStateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/HealthDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/IopsUsage.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/IscsiConnectionParameters.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/IscsiEndpoint.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/LatestLinkedSaaSResponse.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/LimitDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/LinkSaaSRequest.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/MarketplaceDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/MarketplaceSubscriptionStatus.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/OfferDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Operation.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Operations.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Origin.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PerformanceParameters.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PerformancePolicyLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAccessSettings.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleActivationCode.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthConfig.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleAuthType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleRole.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleSettings.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PlatformConsoleSubnet.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ProtectionParameters.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ProtectionPolicyLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/RangeLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroup.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/RecoverableVolumeGroups.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservation.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationBillingStatus.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationBillingUsageReport.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationPropertiesBaseResourceProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ReservationUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Reservations.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/SaaSOperationGroups.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/SaaSResourceDetailsResponse.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ServiceInitializationHandle.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/ServiceInitializationInfo.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/SoftDeletion.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Space.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/SshPlatformConsoleAuthConfig.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/SshPlatformConsoleAuthResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePool.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolEnableAvsConnectionPost.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolFinalizeAvsConnectionPost.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolHealthInfo.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePoolUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/StoragePools.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/UsageSeverity.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/UserDetails.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VmType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VnetInjection.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Volume.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeContainerType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroup.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupOverwriteRequest.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshot.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotListRequest.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotPostListResult.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshotProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSnapshots.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupSourceType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupStatus.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroups.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeLimits.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeOverwriteRequest.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSnapshotInfo.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSnapshotSource.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeSourceType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeType.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeUpdate.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/Volumes.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/package-info.java","src/main/java/com/azure/resourcemanager/purestorageblock/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-purestorageblock/proxy-config.json b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-purestorageblock/proxy-config.json index 6393f0dded0e..24514015799b 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-purestorageblock/proxy-config.json +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-purestorageblock/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.purestorageblock.implementation.AvsStorageContainerVolumesClientImpl$AvsStorageContainerVolumesService"],["com.azure.resourcemanager.purestorageblock.implementation.AvsStorageContainersClientImpl$AvsStorageContainersService"],["com.azure.resourcemanager.purestorageblock.implementation.AvsVmVolumesClientImpl$AvsVmVolumesService"],["com.azure.resourcemanager.purestorageblock.implementation.AvsVmsClientImpl$AvsVmsService"],["com.azure.resourcemanager.purestorageblock.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.purestorageblock.implementation.ReservationsClientImpl$ReservationsService"],["com.azure.resourcemanager.purestorageblock.implementation.StoragePoolsClientImpl$StoragePoolsService"]] \ No newline at end of file +[["com.azure.resourcemanager.purestorageblock.implementation.AvsStorageContainerVolumesClientImpl$AvsStorageContainerVolumesService"],["com.azure.resourcemanager.purestorageblock.implementation.AvsStorageContainersClientImpl$AvsStorageContainersService"],["com.azure.resourcemanager.purestorageblock.implementation.AvsVmVolumesClientImpl$AvsVmVolumesService"],["com.azure.resourcemanager.purestorageblock.implementation.AvsVmsClientImpl$AvsVmsService"],["com.azure.resourcemanager.purestorageblock.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.purestorageblock.implementation.RecoverableVolumeGroupsClientImpl$RecoverableVolumeGroupsService"],["com.azure.resourcemanager.purestorageblock.implementation.ReservationsClientImpl$ReservationsService"],["com.azure.resourcemanager.purestorageblock.implementation.SaaSOperationGroupsClientImpl$SaaSOperationGroupsService"],["com.azure.resourcemanager.purestorageblock.implementation.StoragePoolsClientImpl$StoragePoolsService"],["com.azure.resourcemanager.purestorageblock.implementation.VolumeGroupSnapshotsClientImpl$VolumeGroupSnapshotsService"],["com.azure.resourcemanager.purestorageblock.implementation.VolumeGroupsClientImpl$VolumeGroupsService"],["com.azure.resourcemanager.purestorageblock.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesDeleteSamples.java index 3087398fcabc..2adac768194e 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesDeleteSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AvsStorageContainerVolumesDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainerVolumes_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Delete. @@ -19,6 +19,7 @@ public final class AvsStorageContainerVolumesDeleteSamples { public static void avsStorageContainerVolumesDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainerVolumes() - .delete("rgpurestorage", "storagePoolname", "name", "cbdec-ddbb", com.azure.core.util.Context.NONE); + .delete("rgpurestorage", "storagepool-01", "container-01", "a1b2c3d4-e5f6", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetSamples.java index 9a70896c34ca..af48c9e98460 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetSamples.java @@ -9,7 +9,7 @@ */ public final class AvsStorageContainerVolumesGetSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Get. @@ -19,7 +19,7 @@ public final class AvsStorageContainerVolumesGetSamples { public static void avsStorageContainerVolumesGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainerVolumes() - .getWithResponse("rgpurestorage", "storagePoolname", "name", "cbdec-ddbb", + .getWithResponse("rgpurestorage", "storagepool-01", "container-01", "a1b2c3d4-e5f6", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesListByAvsStorageContainerSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesListByAvsStorageContainerSamples.java index f88ea3dbb504..e9780da0544b 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesListByAvsStorageContainerSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesListByAvsStorageContainerSamples.java @@ -9,7 +9,7 @@ */ public final class AvsStorageContainerVolumesListByAvsStorageContainerSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_ListByAvsStorageContainer_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainerVolumes_ListByAvsStorageContainer_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_ListByAvsStorageContainer. @@ -19,6 +19,7 @@ public final class AvsStorageContainerVolumesListByAvsStorageContainerSamples { public static void avsStorageContainerVolumesListByAvsStorageContainer( com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainerVolumes() - .listByAvsStorageContainer("rgpurestorage", "storagePoolname", "name", com.azure.core.util.Context.NONE); + .listByAvsStorageContainer("rgpurestorage", "storagepool-01", "container-01", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesUpdateSamples.java index 9de3a748b084..e00c9480a791 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesUpdateSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class AvsStorageContainerVolumesUpdateSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainerVolumes_Update_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Update. @@ -23,7 +23,7 @@ public final class AvsStorageContainerVolumesUpdateSamples { public static void avsStorageContainerVolumesUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainerVolumes() - .update("rgpurestorage", "storagePoolname", "name", "cbdec-ddbb", + .update("rgpurestorage", "storagepool-01", "container-01", "a1b2c3d4-e5f6", new AvsStorageContainerVolumeUpdate().withProperties(new AvsStorageContainerVolumeUpdateProperties() .withSoftDeletion(new SoftDeletion().withDestroyed(true))), com.azure.core.util.Context.NONE); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersDeleteSamples.java index 236d9f8df252..b8e6df13563a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersDeleteSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AvsStorageContainersDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainers_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainers_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_Delete. @@ -19,6 +19,6 @@ public final class AvsStorageContainersDeleteSamples { public static void avsStorageContainersDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainers() - .delete("rgpurestorage", "storagePoolName", "storageContainerName", com.azure.core.util.Context.NONE); + .delete("rgpurestorage", "storagepool-01", "container-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersGetSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersGetSamples.java index d3170fb10224..1fa949cb8be2 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersGetSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersGetSamples.java @@ -9,7 +9,7 @@ */ public final class AvsStorageContainersGetSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainers_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_Get. @@ -19,7 +19,6 @@ public final class AvsStorageContainersGetSamples { public static void avsStorageContainersGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsStorageContainers() - .getWithResponse("rgpurestorage", "storagePoolName", "storageContainerName", - com.azure.core.util.Context.NONE); + .getWithResponse("rgpurestorage", "storagepool-01", "container-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersListByStoragePoolSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersListByStoragePoolSamples.java index 82e6ebf57c12..1c2b12194976 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersListByStoragePoolSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersListByStoragePoolSamples.java @@ -9,7 +9,7 @@ */ public final class AvsStorageContainersListByStoragePoolSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainers_ListByStoragePool_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsStorageContainers_ListByStoragePool_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_ListByStoragePool. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesDeleteSamples.java index 6ac88277e43d..3e0afdc4eadd 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesDeleteSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AvsVmVolumesDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsVmVolumes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVmVolumes_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Delete. @@ -18,6 +18,7 @@ public final class AvsVmVolumesDeleteSamples { */ public static void avsVmVolumesDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVmVolumes() - .delete("rgpurestorage", "storagePoolname", "cbdec-ddbb", "cbdec-ddbb", com.azure.core.util.Context.NONE); + .delete("rgpurestorage", "storagepool-01", "abc123def456", "a1b2c3d4-e5f6", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesGetSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesGetSamples.java index acd49224d3ec..7770c1340471 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesGetSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesGetSamples.java @@ -9,7 +9,7 @@ */ public final class AvsVmVolumesGetSamples { /* - * x-ms-original-file: 2024-11-01/AvsVmVolumes_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Get. @@ -18,7 +18,7 @@ public final class AvsVmVolumesGetSamples { */ public static void avsVmVolumesGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVmVolumes() - .getWithResponse("rgpurestorage", "storagePoolname", "cbdec-ddbb", "cbdec-ddbb", + .getWithResponse("rgpurestorage", "storagepool-01", "abc123def456", "a1b2c3d4-e5f6", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmSamples.java index fff9c2b6587b..703dc30ae761 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmSamples.java @@ -9,7 +9,7 @@ */ public final class AvsVmVolumesListByAvsVmSamples { /* - * x-ms-original-file: 2024-11-01/AvsVmVolumes_ListByAvsVm_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVmVolumes_ListByAvsVm_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_ListByAvsVm. @@ -19,6 +19,6 @@ public final class AvsVmVolumesListByAvsVmSamples { public static void avsVmVolumesListByAvsVm(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVmVolumes() - .listByAvsVm("rgpurestorage", "storagePoolname", "cbdec-ddbb", com.azure.core.util.Context.NONE); + .listByAvsVm("rgpurestorage", "storagepool-01", "abc123def456", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateSamples.java index 2b7e19e9ea37..ab22b3293c44 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class AvsVmVolumesUpdateSamples { /* - * x-ms-original-file: 2024-11-01/AvsVmVolumes_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVmVolumes_Update_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Update. @@ -22,7 +22,7 @@ public final class AvsVmVolumesUpdateSamples { */ public static void avsVmVolumesUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVmVolumes() - .update("rgpurestorage", "storagePoolname", "cbdec-ddbb", "cbdec-ddbb", + .update("rgpurestorage", "storagepool-01", "abc123def456", "a1b2c3d4-e5f6", new AvsVmVolumeUpdate().withProperties( new AvsVmVolumeUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(true))), com.azure.core.util.Context.NONE); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsDeleteSamples.java index e945c71a03e0..7926cc01974c 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsDeleteSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class AvsVmsDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsVms_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVms_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Delete. @@ -17,6 +17,6 @@ public final class AvsVmsDeleteSamples { * @param manager Entry point to PureStorageBlockManager. */ public static void avsVmsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { - manager.avsVms().delete("rgpurestorage", "storagePoolname", "cbdec-ddbb", com.azure.core.util.Context.NONE); + manager.avsVms().delete("rgpurestorage", "storagepool-01", "abc123def456", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsGetSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsGetSamples.java index cd6b3fe9155a..d3d9be2822fc 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsGetSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AvsVmsGetSamples { /* - * x-ms-original-file: 2024-11-01/AvsVms_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVms_Get_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Get. @@ -18,6 +18,6 @@ public final class AvsVmsGetSamples { */ public static void avsVmsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVms() - .getWithResponse("rgpurestorage", "storagePoolname", "cbdec-ddbb", com.azure.core.util.Context.NONE); + .getWithResponse("rgpurestorage", "storagepool-01", "abc123def456", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsListByStoragePoolSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsListByStoragePoolSamples.java index d13e49663df7..43832f91aff7 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsListByStoragePoolSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsListByStoragePoolSamples.java @@ -9,7 +9,7 @@ */ public final class AvsVmsListByStoragePoolSamples { /* - * x-ms-original-file: 2024-11-01/AvsVms_ListByStoragePool_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVms_ListByStoragePool_MaximumSet_Gen.json */ /** * Sample code: AvsVms_ListByStoragePool. @@ -18,6 +18,6 @@ public final class AvsVmsListByStoragePoolSamples { */ public static void avsVmsListByStoragePool(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { - manager.avsVms().listByStoragePool("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + manager.avsVms().listByStoragePool("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsUpdateSamples.java index 82ebfe1fd97d..93314d896ea2 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsUpdateSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class AvsVmsUpdateSamples { /* - * x-ms-original-file: 2024-11-01/AvsVms_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/AvsVms_Update_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Update. @@ -22,7 +22,7 @@ public final class AvsVmsUpdateSamples { */ public static void avsVmsUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.avsVms() - .update("rgpurestorage", "storagePoolname", "cbdec-ddbb", + .update("rgpurestorage", "storagepool-01", "abc123def456", new AvsVmUpdate().withProperties( new AvsVmUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(true))), com.azure.core.util.Context.NONE); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/OperationsListSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/OperationsListSamples.java index f6b8365e71f8..ca88201afa8d 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/OperationsListSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2024-11-01/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List. @@ -21,7 +21,7 @@ public static void operationsList(com.azure.resourcemanager.purestorageblock.Pur } /* - * x-ms-original-file: 2024-11-01/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumGen_Set. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsDeleteSamples.java new file mode 100644 index 000000000000..be81587e88b1 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for RecoverableVolumeGroups Delete. + */ +public final class RecoverableVolumeGroupsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/RecoverableVolumeGroups_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: RecoverableVolumeGroups_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + recoverableVolumeGroupsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.recoverableVolumeGroups() + .delete("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsGetSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsGetSamples.java new file mode 100644 index 000000000000..789d47104e8c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for RecoverableVolumeGroups Get. + */ +public final class RecoverableVolumeGroupsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/RecoverableVolumeGroups_Get_MaximumSet_Gen.json + */ + /** + * Sample code: RecoverableVolumeGroups_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + recoverableVolumeGroupsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.recoverableVolumeGroups() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsListByStoragePoolSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsListByStoragePoolSamples.java new file mode 100644 index 000000000000..f46c940b74e5 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsListByStoragePoolSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for RecoverableVolumeGroups ListByStoragePool. + */ +public final class RecoverableVolumeGroupsListByStoragePoolSamples { + /* + * x-ms-original-file: 2026-05-01-preview/RecoverableVolumeGroups_ListByStoragePool_MaximumSet_Gen.json + */ + /** + * Sample code: RecoverableVolumeGroups_ListByStoragePool. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void recoverableVolumeGroupsListByStoragePool( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.recoverableVolumeGroups() + .listByStoragePool("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsCreateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsCreateSamples.java index 0550c5326779..d8e02379e7cb 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsCreateSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsCreateSamples.java @@ -19,7 +19,7 @@ */ public final class ReservationsCreateSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_Create_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_Create_MaximumSet_Gen.json */ /** * Sample code: Reservations_Create. @@ -28,30 +28,30 @@ public final class ReservationsCreateSamples { */ public static void reservationsCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.reservations() - .define("storagePoolname") - .withRegion("jynnbjysbc") + .define("reservation-01") + .withRegion("eastus") .withExistingResourceGroup("rgpurestorage") - .withTags(mapOf("key1110", "fakeTokenPlaceholder")) + .withTags(mapOf("environment", "production")) .withProperties(new ReservationPropertiesBaseResourceProperties() .withMarketplace(new MarketplaceDetails() .withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START) - .withOfferDetails(new OfferDetails().withPublisherId("vejockfhoavaqjvhtwvctdnaefvw") - .withOfferId("efojrbphbimq") - .withPlanId("caj") - .withPlanName("lvvzchm") - .withTermUnit("ose") - .withTermId("ucyvzkedohfjazifxweylhnbcmeza"))) - .withUser(new UserDetails().withFirstName("bucysqbbclhwxrzig") - .withLastName("fnsvxlop") - .withEmailAddress("abc@example.com") - .withUpn("ekqbqgpdylggddusuiifrnjcwiefay") - .withPhoneNumber("jglihtgsacdxocc") - .withCompanyDetails(new CompanyDetails().withCompanyName("nrndfzmrakk") - .withAddress(new Address().withAddressLine1("f") - .withAddressLine2("gycfosmknj") - .withCity("qxzhxjoatyuajoljfkd") - .withState("dnusygshfvmebpmcjsd") - .withCountry("nuexbknolfphlfguyzq") + .withOfferDetails(new OfferDetails().withPublisherId("pure_storage") + .withOfferId("purestorage-block-offer") + .withPlanId("standard-plan") + .withPlanName("Standard Plan") + .withTermUnit("month") + .withTermId("12-month-term"))) + .withUser(new UserDetails().withFirstName("John") + .withLastName("Doe") + .withEmailAddress("john.doe@contoso.com") + .withUpn("john.doe@contoso.com") + .withPhoneNumber("+1-425-555-1234") + .withCompanyDetails(new CompanyDetails().withCompanyName("Contoso Ltd.") + .withAddress(new Address().withAddressLine1("1 Microsoft Way") + .withAddressLine2("Suite 100") + .withCity("Redmond") + .withState("Washington") + .withCountry("United States") .withPostalCode("fakeTokenPlaceholder"))))) .create(); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsDeleteSamples.java index 11da693d92b3..da65dbf36737 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsDeleteSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ReservationsDeleteSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_Delete_MaximumSet_Gen.json */ /** * Sample code: Reservations_Delete. @@ -17,6 +17,6 @@ public final class ReservationsDeleteSamples { * @param manager Entry point to PureStorageBlockManager. */ public static void reservationsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { - manager.reservations().delete("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + manager.reservations().delete("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingReportSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingReportSamples.java index 3c454a5c37eb..146606c981b7 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingReportSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingReportSamples.java @@ -9,7 +9,7 @@ */ public final class ReservationsGetBillingReportSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_GetBillingReport_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_GetBillingReport_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetBillingReport_MaximumSet. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingStatusSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingStatusSamples.java index d3849e274f74..fd0dc6341a8a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingStatusSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingStatusSamples.java @@ -9,7 +9,7 @@ */ public final class ReservationsGetBillingStatusSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_GetBillingStatus_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_GetBillingStatus_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetBillingStatus_MaximumSet. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetByResourceGroupSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetByResourceGroupSamples.java index ff22dc3bab51..3c109223bd72 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetByResourceGroupSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ReservationsGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_Get_MaximumSet_Gen.json */ /** * Sample code: Reservations_Get. @@ -18,6 +18,6 @@ public final class ReservationsGetByResourceGroupSamples { */ public static void reservationsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.reservations() - .getByResourceGroupWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetResourceLimitsSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetResourceLimitsSamples.java index 632955e9810e..7e08e7c270c3 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetResourceLimitsSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetResourceLimitsSamples.java @@ -9,7 +9,7 @@ */ public final class ReservationsGetResourceLimitsSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_GetResourceLimits_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_GetResourceLimits_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetResourceLimits. @@ -19,6 +19,6 @@ public final class ReservationsGetResourceLimitsSamples { public static void reservationsGetResourceLimits(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.reservations() - .getResourceLimitsWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getResourceLimitsWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLatestLinkedSaaSSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLatestLinkedSaaSSamples.java new file mode 100644 index 000000000000..9f4dbf35f478 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLatestLinkedSaaSSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for Reservations LatestLinkedSaaS. + */ +public final class ReservationsLatestLinkedSaaSSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_LatestLinkedSaaS_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_LatestLinkedSaaS. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + reservationsLatestLinkedSaaS(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations() + .latestLinkedSaaSWithResponse("rgpurestorage", "reservation-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLinkSaaSSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLinkSaaSSamples.java new file mode 100644 index 000000000000..384b27a22a88 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLinkSaaSSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.LinkSaaSRequest; + +/** + * Samples for Reservations LinkSaaS. + */ +public final class ReservationsLinkSaaSSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Reservations_LinkSaaS_MaximumSet_Gen.json + */ + /** + * Sample code: Reservations_LinkSaaS. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + reservationsLinkSaaS(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.reservations() + .linkSaaS("rgpurestorage", "reservation-01", new LinkSaaSRequest().withSaaSResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/Microsoft.SaaS/resources/saas-resource-01"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListByResourceGroupSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListByResourceGroupSamples.java index 3d6842cebcba..5a8789deca4a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListByResourceGroupSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ReservationsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Reservations_ListByResourceGroup. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListSamples.java index 73220a3ec9c6..7328554f4a20 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListSamples.java @@ -9,7 +9,7 @@ */ public final class ReservationsListSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: Reservations_ListBySubscription. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsUpdateSamples.java index ce7f1bd90ae8..0f55d5171a37 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsUpdateSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class ReservationsUpdateSamples { /* - * x-ms-original-file: 2024-11-01/Reservations_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/Reservations_Update_MaximumSet_Gen.json */ /** * Sample code: Reservations_Update. @@ -26,14 +26,14 @@ public final class ReservationsUpdateSamples { */ public static void reservationsUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { Reservation resource = manager.reservations() - .getByResourceGroupWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withTags(mapOf("key8751", "fakeTokenPlaceholder")) .withProperties( new ReservationUpdateProperties().withUser(new UserDetails().withFirstName("sjzquetrvxcrajxdfwfeuro") .withLastName("qimvqxnlbclfouwzfk") - .withEmailAddress("abc@example.com") + .withEmailAddress("john.doe@contoso.com") .withUpn("pvafwnbigmhuigxfu") .withPhoneNumber("jfljnoxsfsplwczwgvmlurfnorimvl") .withCompanyDetails(new CompanyDetails().withCompanyName("uleytbkckdhaiykwjjcjqmnlik") diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/SaaSOperationGroupActivateResourceSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/SaaSOperationGroupActivateResourceSamples.java new file mode 100644 index 000000000000..941cd66e11af --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/SaaSOperationGroupActivateResourceSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.ActivateSaaSRequest; + +/** + * Samples for SaaSOperationGroup ActivateResource. + */ +public final class SaaSOperationGroupActivateResourceSamples { + /* + * x-ms-original-file: 2026-05-01-preview/SaaSOperationGroup_ActivateSaaS_MaximumSet.json + */ + /** + * Sample code: SaaSOperationGroup_ActivateResource. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + saaSOperationGroupActivateResource(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.saaSOperationGroups() + .activateResource(new ActivateSaaSRequest().withSaasGuid("12345678-1234-5678-1234-567812345678") + .withPublisherId("purestorage1234567890"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsConfigurePlatformConsoleAuthSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsConfigurePlatformConsoleAuthSamples.java new file mode 100644 index 000000000000..4290ad93b280 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsConfigurePlatformConsoleAuthSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleRole; +import com.azure.resourcemanager.purestorageblock.models.SshPlatformConsoleAuthConfig; + +/** + * Samples for StoragePools ConfigurePlatformConsoleAuth. + */ +public final class StoragePoolsConfigurePlatformConsoleAuthSamples { + /* + * x-ms-original-file: 2026-05-01-preview/StoragePools_ConfigurePlatformConsoleAuth_MaximumSet_Gen.json + */ + /** + * Sample code: StoragePools_ConfigurePlatformConsoleAuth. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void storagePoolsConfigurePlatformConsoleAuth( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.storagePools() + .configurePlatformConsoleAuthWithResponse("rgpurestorage", "storagepool-01", + new SshPlatformConsoleAuthConfig().withUsername("alice") + .withPublicKey("fakeTokenPlaceholder") + .withRole(PlatformConsoleRole.STORAGE_ADMIN), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateSamples.java index 7f03004e45f0..afc0e6c4318f 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateSamples.java @@ -17,7 +17,7 @@ */ public final class StoragePoolsCreateSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_Create_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_Create_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Create. @@ -26,17 +26,20 @@ public final class StoragePoolsCreateSamples { */ public static void storagePoolsCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .define("storagePoolname") - .withRegion("lonlc") + .define("storagepool-01") + .withRegion("eastus") .withExistingResourceGroup("rgpurestorage") - .withTags(mapOf("key7593", "fakeTokenPlaceholder")) - .withProperties(new StoragePoolProperties().withAvailabilityZone("vknyl") - .withVnetInjection(new VnetInjection().withSubnetId("tnlctolrxdvnkjiphlrdxq") - .withVnetId("zbumtytyqwewjcyckwqchiypshv")) + .withTags(mapOf("environment", "production")) + .withProperties(new StoragePoolProperties().withAvailabilityZone("1") + .withVnetInjection(new VnetInjection().withSubnetId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/Microsoft.Network/virtualNetworks/vnet-01/subnets/subnet-01") + .withVnetId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/Microsoft.Network/virtualNetworks/vnet-01")) .withProvisionedBandwidthMbPerSec(17L) - .withReservationResourceId("xiowoxnbtcotutcmmrofvgdi")) + .withReservationResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/reservations/reservation-01")) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("key4211", new UserAssignedIdentity()))) + .withUserAssignedIdentities(mapOf("identity-01", new UserAssignedIdentity()))) .create(); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsDeleteSamples.java index cc76e4840c47..26add2aea026 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsDeleteSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsDeleteSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_Delete_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Delete. @@ -17,6 +17,6 @@ public final class StoragePoolsDeleteSamples { * @param manager Entry point to PureStorageBlockManager. */ public static void storagePoolsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { - manager.storagePools().delete("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + manager.storagePools().delete("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsDisableAvsConnectionSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsDisableAvsConnectionSamples.java index 36cbb32adb21..a1bc9842eb16 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsDisableAvsConnectionSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsDisableAvsConnectionSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsDisableAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_DisableAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_DisableAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_DisableAvsConnection. @@ -19,6 +19,6 @@ public final class StoragePoolsDisableAvsConnectionSamples { public static void storagePoolsDisableAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .disableAvsConnection("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .disableAvsConnection("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsEnableAvsConnectionSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsEnableAvsConnectionSamples.java index ea772e59630c..cf5dfc3a387a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsEnableAvsConnectionSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsEnableAvsConnectionSamples.java @@ -11,7 +11,7 @@ */ public final class StoragePoolsEnableAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_EnableAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_EnableAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_EnableAvsConnection. @@ -21,7 +21,7 @@ public final class StoragePoolsEnableAvsConnectionSamples { public static void storagePoolsEnableAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .enableAvsConnection("rgpurestorage", "storagePoolname", + .enableAvsConnection("rgpurestorage", "storagepool-01", new StoragePoolEnableAvsConnectionPost().withClusterResourceId("tghkgktlddwlszbeh"), com.azure.core.util.Context.NONE); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsFinalizeAvsConnectionSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsFinalizeAvsConnectionSamples.java index c86c6e103e63..06400a6f6b0c 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsFinalizeAvsConnectionSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsFinalizeAvsConnectionSamples.java @@ -12,7 +12,7 @@ */ public final class StoragePoolsFinalizeAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_FinalizeAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_FinalizeAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_FinalizeAvsConnection. @@ -22,7 +22,7 @@ public final class StoragePoolsFinalizeAvsConnectionSamples { public static void storagePoolsFinalizeAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .finalizeAvsConnection("rgpurestorage", "storagePoolname", + .finalizeAvsConnection("rgpurestorage", "storagepool-01", new StoragePoolFinalizeAvsConnectionPost().withServiceInitializationDataEnc("hlgzaxrohv") .withServiceInitializationData(new ServiceInitializationInfo().withServiceAccountUsername("axchgm") .withServiceAccountPassword("fakeTokenPlaceholder") diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsConnectionSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsConnectionSamples.java index 90e171c6e10c..5f242c06ca1f 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsConnectionSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsConnectionSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsGetAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_GetAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_GetAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetAvsConnection. @@ -19,6 +19,6 @@ public final class StoragePoolsGetAvsConnectionSamples { public static void storagePoolsGetAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .getAvsConnectionWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getAvsConnectionWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsStatusSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsStatusSamples.java index d9c1d01fa11b..0a0c597622d3 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsStatusSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsStatusSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsGetAvsStatusSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_GetAvsStatus_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_GetAvsStatus_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetAvsStatus. @@ -19,6 +19,6 @@ public final class StoragePoolsGetAvsStatusSamples { public static void storagePoolsGetAvsStatus(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .getAvsStatusWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getAvsStatusWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetByResourceGroupSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetByResourceGroupSamples.java index 0f35ea086ad1..c4da819a1d0e 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetByResourceGroupSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_Get_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_Get_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Get. @@ -18,6 +18,6 @@ public final class StoragePoolsGetByResourceGroupSamples { */ public static void storagePoolsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .getByResourceGroupWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetHealthStatusSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetHealthStatusSamples.java index 46bc9f397c87..33df60b59a18 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetHealthStatusSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetHealthStatusSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsGetHealthStatusSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_GetHealthStatus_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_GetHealthStatus_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetHealthStatus. @@ -19,6 +19,6 @@ public final class StoragePoolsGetHealthStatusSamples { public static void storagePoolsGetHealthStatus(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { manager.storagePools() - .getHealthStatusWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + .getHealthStatusWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListByResourceGroupSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListByResourceGroupSamples.java index 1f9bbab8965d..40fd502f56b7 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListByResourceGroupSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: StoragePools_ListByResourceGroup. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListPlatformConsoleActivationCodeSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListPlatformConsoleActivationCodeSamples.java new file mode 100644 index 000000000000..76a3b21bfd22 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListPlatformConsoleActivationCodeSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for StoragePools ListPlatformConsoleActivationCode. + */ +public final class StoragePoolsListPlatformConsoleActivationCodeSamples { + /* + * x-ms-original-file: 2026-05-01-preview/StoragePools_ListPlatformConsoleActivationCode_MaximumSet_Gen.json + */ + /** + * Sample code: StoragePools_ListPlatformConsoleActivationCode. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void storagePoolsListPlatformConsoleActivationCode( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.storagePools() + .listPlatformConsoleActivationCodeWithResponse("rgpurestorage", "storagepool-01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListSamples.java index 8209e4a39c36..6b431ea54d57 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsListSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_ListBySubscription_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: StoragePools_ListBySubscription. diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsRepairAvsConnectionSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsRepairAvsConnectionSamples.java index a2d668146886..96e93c8f1edb 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsRepairAvsConnectionSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsRepairAvsConnectionSamples.java @@ -9,7 +9,7 @@ */ public final class StoragePoolsRepairAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_RepairAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_RepairAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_RepairAvsConnection. @@ -18,7 +18,6 @@ public final class StoragePoolsRepairAvsConnectionSamples { */ public static void storagePoolsRepairAvsConnection(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { - manager.storagePools() - .repairAvsConnection("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE); + manager.storagePools().repairAvsConnection("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsUpdateSamples.java index 53f695967d6e..a1af21db6318 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsUpdateSamples.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class StoragePoolsUpdateSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_Update_MaximumSet_Gen.json + * x-ms-original-file: 2026-05-01-preview/StoragePools_Update_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Update. @@ -26,12 +26,12 @@ public final class StoragePoolsUpdateSamples { */ public static void storagePoolsUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { StoragePool resource = manager.storagePools() - .getByResourceGroupWithResponse("rgpurestorage", "storagePoolname", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withTags(mapOf("key9065", "fakeTokenPlaceholder")) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("key4211", new UserAssignedIdentity()))) + .withUserAssignedIdentities(mapOf("identity-01", new UserAssignedIdentity()))) .withProperties(new StoragePoolUpdateProperties().withProvisionedBandwidthMbPerSec(23L)) .apply(); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsCreateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsCreateSamples.java new file mode 100644 index 000000000000..b11ccd98f8ae --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsCreateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotProperties; + +/** + * Samples for VolumeGroupSnapshots Create. + */ +public final class VolumeGroupSnapshotsCreateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_Create_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_Create. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupSnapshotsCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .define("snapshot-01") + .withExistingVolumeGroup("rgpurestorage", "storagepool-01", "volumegroup-01") + .withProperties(new VolumeGroupSnapshotProperties().withSourceSnapshotResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01/snapshots/snapshot-01")) + .create(); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsDeleteSamples.java new file mode 100644 index 000000000000..c6da839c0195 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for VolumeGroupSnapshots Delete. + */ +public final class VolumeGroupSnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupSnapshotsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .delete("rgpurestorage", "storagepool-01", "volumegroup-01", "snapshotdd", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsGetSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsGetSamples.java new file mode 100644 index 000000000000..2d4253d4814c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for VolumeGroupSnapshots Get. + */ +public final class VolumeGroupSnapshotsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_Get_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupSnapshotsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", "01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListByVolumeGroupSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListByVolumeGroupSamples.java new file mode 100644 index 000000000000..d19f96339893 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListByVolumeGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for VolumeGroupSnapshots ListByVolumeGroup. + */ +public final class VolumeGroupSnapshotsListByVolumeGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_ListByVolumeGroup_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_ListByVolumeGroup. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupSnapshotsListByVolumeGroup( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .listByVolumeGroup("rgpurestorage", "storagepool-01", "volumegroup-01", null, null, null, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListSnapshotsSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListSnapshotsSamples.java new file mode 100644 index 000000000000..ba4afeb70e39 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListSnapshotsSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotListRequest; + +/** + * Samples for VolumeGroupSnapshots ListSnapshots. + */ +public final class VolumeGroupSnapshotsListSnapshotsSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroupSnapshots_ListSnapshots_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroupSnapshots_ListSnapshots. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupSnapshotsListSnapshots(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroupSnapshots() + .listSnapshotsWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", + new VolumeGroupSnapshotListRequest().withFilter("substringof('snapshot', name)") + .withOrderby("name asc") + .withTop(10) + .withSkip(0), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateSamples.java new file mode 100644 index 000000000000..4fb870339d97 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for VolumeGroups Create. + */ +public final class VolumeGroupsCreateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Create_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Create. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .define("volumegroup-01") + .withRegion("eastus") + .withExistingStoragePool("rgpurestorage", "storagepool-01") + .withTags(mapOf("environment", "production")) + .withProperties(new VolumeGroupProperties().withSourceType(VolumeGroupSourceType.SNAPSHOT) + .withSourceSnapshotResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-src/snapshots/snapshot-01") + .withPerformanceParameters( + new PerformanceParameters().withBandwidthLimitMbPerSec(500L).withIopsLimit(10000L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("P7D")) + .withFrequency(Duration.parse("PT1H")))) + .create(); + } + + // 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/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsDeleteSamples.java new file mode 100644 index 000000000000..6002c5f76554 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for VolumeGroups Delete. + */ +public final class VolumeGroupsDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .delete("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetSamples.java new file mode 100644 index 000000000000..756e258f8268 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for VolumeGroups Get. + */ +public final class VolumeGroupsGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Get_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetStatusSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetStatusSamples.java new file mode 100644 index 000000000000..df8408c5df17 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetStatusSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for VolumeGroups GetStatus. + */ +public final class VolumeGroupsGetStatusSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_GetStatus_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_GetStatus. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupsGetStatus(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .getStatusWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListByStoragePoolSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListByStoragePoolSamples.java new file mode 100644 index 000000000000..a4a72d0e4c66 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListByStoragePoolSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for VolumeGroups ListByStoragePool. + */ +public final class VolumeGroupsListByStoragePoolSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_ListByStoragePool_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_ListByStoragePool. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupsListByStoragePool(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups().listByStoragePool("rgpurestorage", "storagepool-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListConnectionParametersSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListConnectionParametersSamples.java new file mode 100644 index 000000000000..225b01e4eb2c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListConnectionParametersSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for VolumeGroups ListConnectionParameters. + */ +public final class VolumeGroupsListConnectionParametersSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_ListConnectionParameters_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_ListConnectionParameters. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsListConnectionParameters( + com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .listConnectionParametersWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsOverwriteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsOverwriteSamples.java new file mode 100644 index 000000000000..b6d1ab58e21d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsOverwriteSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupOverwriteRequest; + +/** + * Samples for VolumeGroups Overwrite. + */ +public final class VolumeGroupsOverwriteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Overwrite_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Overwrite. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumeGroupsOverwrite(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumeGroups() + .overwrite("rgpurestorage", "storagepool-01", "volumegroup-01", new VolumeGroupOverwriteRequest() + .withSourceSnapshotResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01/snapshots/snapshot-01") + .withSourceVolumeGroupResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsUpdateSamples.java new file mode 100644 index 000000000000..dd56ab382156 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsUpdateSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdateProperties; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for VolumeGroups Update. + */ +public final class VolumeGroupsUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/VolumeGroups_Update_MaximumSet_Gen.json + */ + /** + * Sample code: VolumeGroups_Update. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumeGroupsUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + VolumeGroup resource = manager.volumeGroups() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("environment", "production")) + .withProperties(new VolumeGroupUpdateProperties() + .withPerformanceParameters( + new PerformanceParameters().withBandwidthLimitMbPerSec(750L).withIopsLimit(15000L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("P14D")) + .withFrequency(Duration.parse("PT2H")))) + .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/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesCreateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesCreateSamples.java new file mode 100644 index 000000000000..2eff92cc97a5 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesCreateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; + +/** + * Samples for Volumes Create. + */ +public final class VolumesCreateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Create_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Create. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesCreate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .define("volume-01") + .withExistingVolumeGroup("rgpurestorage", "storagepool-01", "volumegroup-01") + .withProperties(new AzureVolumeProperties().withProvisionedSize(10737418240L) + .withSourceVolumeResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01/volumes/source-volume") + .withSourceType(VolumeSourceType.VOLUME)) + .create(); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesDeleteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesDeleteSamples.java new file mode 100644 index 000000000000..900e70107928 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for Volumes Delete. + */ +public final class VolumesDeleteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Delete. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesDelete(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .delete("rgpurestorage", "storagepool-01", "volumegroup-01", "volume-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesGetSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesGetSamples.java new file mode 100644 index 000000000000..7db0a43f4553 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for Volumes Get. + */ +public final class VolumesGetSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Get. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesGet(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", "volume-01", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesListByVolumeGroupSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesListByVolumeGroupSamples.java new file mode 100644 index 000000000000..13d7bc802caa --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesListByVolumeGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +/** + * Samples for Volumes ListByVolumeGroup. + */ +public final class VolumesListByVolumeGroupSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_ListByVolumeGroup_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_ListByVolumeGroup. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void + volumesListByVolumeGroup(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .listByVolumeGroup("rgpurestorage", "storagepool-01", "volumegroup-01", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesOverwriteSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesOverwriteSamples.java new file mode 100644 index 000000000000..ab24495cdc5a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesOverwriteSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.VolumeOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotSource; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; + +/** + * Samples for Volumes Overwrite. + */ +public final class VolumesOverwriteSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Overwrite_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Overwrite. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesOverwrite(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + manager.volumes() + .overwrite("rgpurestorage", "storagepool-01", "volumegroup-01", "volume-01", new VolumeOverwriteRequest() + .withSourceType(VolumeSourceType.SNAPSHOT) + .withSourceVolumeGroupResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01") + .withSourceVolumeSnapshot(new VolumeSnapshotSource().withVolumeGroupSnapshotResourceId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgpurestorage/providers/PureStorage.Block/storagePools/storagepool-01/volumeGroups/volumegroup-01/snapshots/snapshot-01") + .withVolumeSnapshotName("volume-01")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesUpdateSamples.java new file mode 100644 index 000000000000..f755e88fee99 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.resourcemanager.purestorageblock.models.Volume; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdateProperties; + +/** + * Samples for Volumes Update. + */ +public final class VolumesUpdateSamples { + /* + * x-ms-original-file: 2026-05-01-preview/Volumes_Update_MaximumSet_Gen.json + */ + /** + * Sample code: Volumes_Update. + * + * @param manager Entry point to PureStorageBlockManager. + */ + public static void volumesUpdate(com.azure.resourcemanager.purestorageblock.PureStorageBlockManager manager) { + Volume resource = manager.volumes() + .getWithResponse("rgpurestorage", "storagepool-01", "volumegroup-01", "volume-01", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new VolumeUpdateProperties().withProvisionedSize(21474836480L)).apply(); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ActivateSaaSRequestTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ActivateSaaSRequestTests.java new file mode 100644 index 000000000000..b478c111b36e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ActivateSaaSRequestTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.ActivateSaaSRequest; +import org.junit.jupiter.api.Assertions; + +public final class ActivateSaaSRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActivateSaaSRequest model + = BinaryData.fromString("{\"saasGuid\":\"z\",\"publisherId\":\"cse\"}").toObject(ActivateSaaSRequest.class); + Assertions.assertEquals("z", model.saasGuid()); + Assertions.assertEquals("cse", model.publisherId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ActivateSaaSRequest model = new ActivateSaaSRequest().withSaasGuid("z").withPublisherId("cse"); + model = BinaryData.fromObject(model).toObject(ActivateSaaSRequest.class); + Assertions.assertEquals("z", model.saasGuid()); + Assertions.assertEquals("cse", model.publisherId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AlertTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AlertTests.java index faae44ff2892..04464ee29485 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AlertTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AlertTests.java @@ -12,8 +12,8 @@ public final class AlertTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Alert model = BinaryData.fromString("{\"level\":\"warning\",\"message\":\"q\"}").toObject(Alert.class); + Alert model = BinaryData.fromString("{\"level\":\"warning\",\"message\":\"mzqa\"}").toObject(Alert.class); Assertions.assertEquals(AlertLevel.WARNING, model.level()); - Assertions.assertEquals("q", model.message()); + Assertions.assertEquals("mzqa", model.message()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsConnectionInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsConnectionInnerTests.java index d78b7ed04f1a..58bc8c695b58 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsConnectionInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsConnectionInnerTests.java @@ -12,11 +12,11 @@ public final class AvsConnectionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsConnectionInner model = BinaryData.fromString( - "{\"serviceInitializationCompleted\":false,\"serviceInitializationHandleEnc\":\"oaxoruzfgsqu\",\"serviceInitializationHandle\":{\"sddcResourceId\":\"rxxle\",\"serviceAccountUsername\":\"ramxjezwlwnw\"}}") + "{\"serviceInitializationCompleted\":true,\"serviceInitializationHandleEnc\":\"mnjijpxacqqudf\",\"serviceInitializationHandle\":{\"sddcResourceId\":\"xbaaabjyv\",\"serviceAccountUsername\":\"ffimrzrtuzqogsex\"}}") .toObject(AvsConnectionInner.class); - Assertions.assertFalse(model.serviceInitializationCompleted()); - Assertions.assertEquals("oaxoruzfgsqu", model.serviceInitializationHandleEnc()); - Assertions.assertEquals("rxxle", model.serviceInitializationHandle().clusterResourceId()); - Assertions.assertEquals("ramxjezwlwnw", model.serviceInitializationHandle().serviceAccountUsername()); + Assertions.assertTrue(model.serviceInitializationCompleted()); + Assertions.assertEquals("mnjijpxacqqudf", model.serviceInitializationHandleEnc()); + Assertions.assertEquals("xbaaabjyv", model.serviceInitializationHandle().clusterResourceId()); + Assertions.assertEquals("ffimrzrtuzqogsex", model.serviceInitializationHandle().serviceAccountUsername()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsDiskDetailsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsDiskDetailsTests.java index c150c53f7e66..5b923da5dc69 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsDiskDetailsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsDiskDetailsTests.java @@ -12,14 +12,14 @@ public final class AvsDiskDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsDiskDetails model = BinaryData.fromString( - "{\"diskId\":\"shfwpracstwity\",\"diskName\":\"hevxcced\",\"folder\":\"pnmdyodnwzxltjcv\",\"avsVmInternalId\":\"hlt\",\"avsVmResourceId\":\"ugcxnavvwxq\",\"avsVmName\":\"byqunyow\",\"avsStorageContainerResourceId\":\"wlmdjrkv\"}") + "{\"diskId\":\"fgytguslfeadcyg\",\"diskName\":\"ukyhejhzis\",\"folder\":\"gfpelolppvksrpqv\",\"avsVmInternalId\":\"jzraehtwdwrf\",\"avsVmResourceId\":\"swibyr\",\"avsVmName\":\"dl\",\"avsStorageContainerResourceId\":\"h\"}") .toObject(AvsDiskDetails.class); - Assertions.assertEquals("shfwpracstwity", model.diskId()); - Assertions.assertEquals("hevxcced", model.diskName()); - Assertions.assertEquals("pnmdyodnwzxltjcv", model.folder()); - Assertions.assertEquals("hlt", model.avsVmInternalId()); - Assertions.assertEquals("ugcxnavvwxq", model.avsVmResourceId()); - Assertions.assertEquals("byqunyow", model.avsVmName()); - Assertions.assertEquals("wlmdjrkv", model.avsStorageContainerResourceId()); + Assertions.assertEquals("fgytguslfeadcyg", model.diskId()); + Assertions.assertEquals("ukyhejhzis", model.diskName()); + Assertions.assertEquals("gfpelolppvksrpqv", model.folder()); + Assertions.assertEquals("jzraehtwdwrf", model.avsVmInternalId()); + Assertions.assertEquals("swibyr", model.avsVmResourceId()); + Assertions.assertEquals("dl", model.avsVmName()); + Assertions.assertEquals("h", model.avsStorageContainerResourceId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStatusInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStatusInnerTests.java index a351aafb6d63..b813812a41a0 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStatusInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStatusInnerTests.java @@ -12,10 +12,10 @@ public final class AvsStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsStatusInner model = BinaryData.fromString( - "{\"avsEnabled\":true,\"currentConnectionStatus\":\"iodkooebwnujhem\",\"sddcResourceId\":\"bvdkcrodtjin\"}") + "{\"avsEnabled\":true,\"currentConnectionStatus\":\"thzvaytdwkqbrqu\",\"sddcResourceId\":\"axhexiilivp\"}") .toObject(AvsStatusInner.class); Assertions.assertTrue(model.avsEnabled()); - Assertions.assertEquals("iodkooebwnujhem", model.currentConnectionStatus()); - Assertions.assertEquals("bvdkcrodtjin", model.clusterResourceId()); + Assertions.assertEquals("thzvaytdwkqbrqu", model.currentConnectionStatus()); + Assertions.assertEquals("axhexiilivp", model.clusterResourceId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerInnerTests.java index a31f8e7c9551..fbf5136f1225 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerInnerTests.java @@ -12,8 +12,8 @@ public final class AvsStorageContainerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsStorageContainerInner model = BinaryData.fromString( - "{\"properties\":{\"space\":{\"totalUsed\":2409105112621306837,\"unique\":4265939002650578384,\"snapshots\":5312783206880341268,\"shared\":9069605309387778371},\"resourceName\":\"f\",\"provisionedLimit\":5968893286810655392,\"datastore\":\"pnqi\",\"mounted\":true},\"id\":\"v\",\"name\":\"jjxd\",\"type\":\"rbuukzclewyhmlwp\"}") + "{\"properties\":{\"space\":{\"totalUsed\":7470928565678818829,\"unique\":7663132797462319571,\"snapshots\":5057262440850695627,\"shared\":4232750321730206909},\"resourceName\":\"s\",\"provisionedLimit\":725270106150414756,\"datastore\":\"nsj\",\"mounted\":false},\"id\":\"iagxsdszuempsbz\",\"name\":\"f\",\"type\":\"beyvpnqicvinvkjj\"}") .toObject(AvsStorageContainerInner.class); - Assertions.assertEquals(5968893286810655392L, model.properties().provisionedLimit()); + Assertions.assertEquals(725270106150414756L, model.properties().provisionedLimit()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerListResultTests.java index be8cdde8dc76..38fc1ebf21c8 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerListResultTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerListResultTests.java @@ -12,9 +12,9 @@ public final class AvsStorageContainerListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsStorageContainerListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"space\":{\"totalUsed\":2667813298876663155,\"unique\":5456462715266408644,\"snapshots\":3994245345885997379,\"shared\":5677331381576332522},\"resourceName\":\"ncwsob\",\"provisionedLimit\":4217034770382613848,\"datastore\":\"bnwdcfh\",\"mounted\":true},\"id\":\"pfuvglsbjjca\",\"name\":\"vxb\",\"type\":\"t\"},{\"properties\":{\"space\":{\"totalUsed\":7478235525824554052,\"unique\":5788917619070236735,\"snapshots\":8336182785798469740,\"shared\":1171285354715728812},\"resourceName\":\"lxqtvcofudfl\",\"provisionedLimit\":1549760853957132785,\"datastore\":\"bgdknnqv\",\"mounted\":false},\"id\":\"qntorudsgsahmkyc\",\"name\":\"rauwjuetaebu\",\"type\":\"u\"},{\"properties\":{\"space\":{\"totalUsed\":4182504228113583516,\"unique\":588408385246434864,\"snapshots\":7384719064569096010,\"shared\":8458645615950890939},\"resourceName\":\"ab\",\"provisionedLimit\":5156980415023593365,\"datastore\":\"kif\",\"mounted\":false},\"id\":\"u\",\"name\":\"ujmqlgkfbtndoa\",\"type\":\"n\"},{\"properties\":{\"space\":{\"totalUsed\":1271439560574404501,\"unique\":2689638360669448219,\"snapshots\":5913508679242564666,\"shared\":4564203424204648247},\"resourceName\":\"jed\",\"provisionedLimit\":2832454646775459728,\"datastore\":\"ezkojvdcp\",\"mounted\":true},\"id\":\"ouicybxarzgszu\",\"name\":\"oxciqopidoamcio\",\"type\":\"hkh\"}],\"nextLink\":\"xkhnzbonlwnto\"}") + "{\"value\":[{\"properties\":{\"space\":{\"totalUsed\":6769205915108777806,\"unique\":3103220879835924511,\"snapshots\":1576468622567723241,\"shared\":117359505525093908},\"resourceName\":\"zfeqztppri\",\"provisionedLimit\":8994416895608983174,\"datastore\":\"jaltolmnc\",\"mounted\":true},\"id\":\"qwcsdbnwdcfhuc\",\"name\":\"dpfuvg\",\"type\":\"sbjjc\"},{\"properties\":{\"space\":{\"totalUsed\":8572095075412575290,\"unique\":4618089428354513151,\"snapshots\":652867049720214090,\"shared\":2563596213274806167},\"resourceName\":\"tncormrlxqtvco\",\"provisionedLimit\":5992330679359585286,\"datastore\":\"vkg\",\"mounted\":false},\"id\":\"dknnqvsazn\",\"name\":\"n\",\"type\":\"orudsgsa\"},{\"properties\":{\"space\":{\"totalUsed\":1429681672482087928,\"unique\":6438368271325429857,\"snapshots\":3000179800184836429,\"shared\":4570540521722771068},\"resourceName\":\"uetae\",\"provisionedLimit\":7703605229469261298,\"datastore\":\"dmovsm\",\"mounted\":false},\"id\":\"ab\",\"name\":\"q\",\"type\":\"efkifr\"},{\"properties\":{\"space\":{\"totalUsed\":137695562924143561,\"unique\":6882751528428278733,\"snapshots\":4648799515670858133,\"shared\":5941269250406348563},\"resourceName\":\"kfbtndoaongbjc\",\"provisionedLimit\":3888691267660480720,\"datastore\":\"tcje\",\"mounted\":true},\"id\":\"waezkojvd\",\"name\":\"pzfoqoui\",\"type\":\"ybxarzgszu\"}],\"nextLink\":\"x\"}") .toObject(AvsStorageContainerListResult.class); - Assertions.assertEquals(4217034770382613848L, model.value().get(0).properties().provisionedLimit()); - Assertions.assertEquals("xkhnzbonlwnto", model.nextLink()); + Assertions.assertEquals(8994416895608983174L, model.value().get(0).properties().provisionedLimit()); + Assertions.assertEquals("x", model.nextLink()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerPropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerPropertiesTests.java index 00729b35ca64..d20db729f792 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerPropertiesTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerPropertiesTests.java @@ -12,8 +12,8 @@ public final class AvsStorageContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsStorageContainerProperties model = BinaryData.fromString( - "{\"space\":{\"totalUsed\":5857746514092669802,\"unique\":7583753681353365970,\"snapshots\":1880030215956318451,\"shared\":6124178728244060008},\"resourceName\":\"kwyfzqwhxxbuyqax\",\"provisionedLimit\":3336688530797945721,\"datastore\":\"tpp\",\"mounted\":false}") + "{\"space\":{\"totalUsed\":2589593210312984687,\"unique\":5101958694614146939,\"snapshots\":7028872436182293033,\"shared\":1601146204745815323},\"resourceName\":\"lewyhmlwpaz\",\"provisionedLimit\":7583753681353365970,\"datastore\":\"ncckw\",\"mounted\":true}") .toObject(AvsStorageContainerProperties.class); - Assertions.assertEquals(3336688530797945721L, model.provisionedLimit()); + Assertions.assertEquals(7583753681353365970L, model.provisionedLimit()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeInnerTests.java index 486cc9e18a59..ecc9c43e5cf0 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeInnerTests.java @@ -12,8 +12,8 @@ public final class AvsStorageContainerVolumeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsStorageContainerVolumeInner model = BinaryData.fromString( - "{\"properties\":{\"storagePoolInternalId\":\"lmnguxaw\",\"storagePoolResourceId\":\"ldsyuuximerqfob\",\"volumeInternalId\":\"znkbykutwpfhpagm\",\"displayName\":\"skdsnfdsdoakg\",\"space\":{\"totalUsed\":4201139945493891870,\"unique\":3650059027972430244,\"snapshots\":2370373214827423487,\"shared\":7189695523322242946},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"ewpusdsttwvogvb\"},\"createdTimestamp\":\"jdcngqqm\",\"provisionedSize\":6280653773540023560,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"jzrwrdgrtw\",\"diskName\":\"enuuzkopbm\",\"folder\":\"nrfdw\",\"avsVmInternalId\":\"yuhhziu\",\"avsVmResourceId\":\"efozbhdms\",\"avsVmName\":\"l\",\"avsStorageContainerResourceId\":\"zqhof\"},\"provisioningState\":\"Succeeded\"},\"id\":\"equi\",\"name\":\"hxicslfaoqz\",\"type\":\"iyylhalnswhccsp\"}") + "{\"properties\":{\"storagePoolInternalId\":\"bwh\",\"storagePoolResourceId\":\"z\",\"volumeInternalId\":\"mrv\",\"displayName\":\"ztvbtqgsfr\",\"space\":{\"totalUsed\":3999543626969444509,\"unique\":6759250092072398108,\"snapshots\":6934781293491405600,\"shared\":5941634021066560611},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"guxawqaldsyuuxi\"},\"createdTimestamp\":\"rqf\",\"provisionedSize\":267070525369036093,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"bykutw\",\"diskName\":\"fhpagmhrskdsnf\",\"folder\":\"sd\",\"avsVmInternalId\":\"akgtdlmkkzevdlh\",\"avsVmResourceId\":\"wpusdsttwvogv\",\"avsVmName\":\"bejdcn\",\"avsStorageContainerResourceId\":\"qqmoaku\"},\"provisioningState\":\"Failed\"},\"id\":\"zr\",\"name\":\"rdgrtw\",\"type\":\"enuuzkopbm\"}") .toObject(AvsStorageContainerVolumeInner.class); - Assertions.assertFalse(model.properties().softDeletion().destroyed()); + Assertions.assertTrue(model.properties().softDeletion().destroyed()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeListResultTests.java index 45292ddafbdf..fce633378395 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeListResultTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeListResultTests.java @@ -12,9 +12,9 @@ public final class AvsStorageContainerVolumeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsStorageContainerVolumeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"fvpdbo\",\"storagePoolResourceId\":\"cizsjqlhkrribdei\",\"volumeInternalId\":\"ipqkghvxndzwm\",\"displayName\":\"efajpj\",\"space\":{\"totalUsed\":7684407938021924628,\"unique\":5857662952663907121,\"snapshots\":3620842042564429421,\"shared\":2209487539876489237},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"tjivfxzsjabib\"},\"createdTimestamp\":\"stawfsdjpvkv\",\"provisionedSize\":3282500270232319295,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"bzkdvn\",\"diskName\":\"jabudurgkakmo\",\"folder\":\"zhjjklffhmouwq\",\"avsVmInternalId\":\"gzrf\",\"avsVmResourceId\":\"eeyebi\",\"avsVmName\":\"ikayuhqlbjbsybb\",\"avsStorageContainerResourceId\":\"wrv\"},\"provisioningState\":\"Failed\"},\"id\":\"mfpgv\",\"name\":\"pip\",\"type\":\"slthaq\"}],\"nextLink\":\"ss\"}") + "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"p\",\"storagePoolResourceId\":\"cstwity\",\"volumeInternalId\":\"evxccedcp\",\"displayName\":\"dyodnwzxltj\",\"space\":{\"totalUsed\":1825004305554964459,\"unique\":3430332403838532675,\"snapshots\":3536077608844217285,\"shared\":3612428382061476540},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"avvwxqi\"},\"createdTimestamp\":\"qunyowxwlmdjr\",\"provisionedSize\":1828246953948060971,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"vpdbodaciz\",\"diskName\":\"j\",\"folder\":\"lhkrribdeibqipqk\",\"avsVmInternalId\":\"hvxndzwmkrefajpj\",\"avsVmResourceId\":\"rwkq\",\"avsVmName\":\"yhgbijtjivfx\",\"avsStorageContainerResourceId\":\"sjabibs\"},\"provisioningState\":\"Canceled\"},\"id\":\"wfsdjpvkvpbj\",\"name\":\"bkzbzkd\",\"type\":\"ncj\"},{\"properties\":{\"storagePoolInternalId\":\"durgkakmokz\",\"storagePoolResourceId\":\"jk\",\"volumeInternalId\":\"fhmouwq\",\"displayName\":\"zrfze\",\"space\":{\"totalUsed\":2216106318758150745,\"unique\":140112309049657981,\"snapshots\":7551956675766407600,\"shared\":3361403308892839308},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"qlbjbsybbqwrvt\"},\"createdTimestamp\":\"gmfpgvmp\",\"provisionedSize\":1285644147378063549,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"aqfxss\",\"diskName\":\"wutwbdsre\",\"folder\":\"pdrhne\",\"avsVmInternalId\":\"yowqkdwytisibir\",\"avsVmResourceId\":\"gpikpzimejza\",\"avsVmName\":\"lfzxiavrmbzonoki\",\"avsStorageContainerResourceId\":\"rjqc\"},\"provisioningState\":\"Succeeded\"},\"id\":\"pfrlazsz\",\"name\":\"nwoiind\",\"type\":\"pwp\"},{\"properties\":{\"storagePoolInternalId\":\"wbtlhflsjcdh\",\"storagePoolResourceId\":\"fjvfbgofeljagr\",\"volumeInternalId\":\"qhl\",\"displayName\":\"riiiojnalghfkv\",\"space\":{\"totalUsed\":5004833697249041105,\"unique\":5507698933851927767,\"snapshots\":8583309758705094601,\"shared\":8152478944837312344},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"qhhahhxvrhmzkwpj\"},\"createdTimestamp\":\"wspughftqsxhqx\",\"provisionedSize\":1369383349800664242,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"xdigrjg\",\"diskName\":\"ufzdmsyq\",\"folder\":\"fi\",\"avsVmInternalId\":\"whbotzingamv\",\"avsVmResourceId\":\"phoszqz\",\"avsVmName\":\"dphqamv\",\"avsStorageContainerResourceId\":\"kfwynw\"},\"provisioningState\":\"Succeeded\"},\"id\":\"vkay\",\"name\":\"mtnvyq\",\"type\":\"atkzwpcnpw\"}],\"nextLink\":\"jaesgvvsccya\"}") .toObject(AvsStorageContainerVolumeListResult.class); Assertions.assertFalse(model.value().get(0).properties().softDeletion().destroyed()); - Assertions.assertEquals("ss", model.nextLink()); + Assertions.assertEquals("jaesgvvsccya", model.nextLink()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeUpdatePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeUpdatePropertiesTests.java index 858c2ff3603b..e5e541ac5e77 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeUpdatePropertiesTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeUpdatePropertiesTests.java @@ -13,7 +13,7 @@ public final class AvsStorageContainerVolumeUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsStorageContainerVolumeUpdateProperties model - = BinaryData.fromString("{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"zcmrvexztvb\"}}") + = BinaryData.fromString("{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"nz\"}}") .toObject(AvsStorageContainerVolumeUpdateProperties.class); Assertions.assertTrue(model.softDeletion().destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeUpdateTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeUpdateTests.java index 1ab1a7048ea4..7f7ec5f9de15 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeUpdateTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumeUpdateTests.java @@ -14,7 +14,8 @@ public final class AvsStorageContainerVolumeUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsStorageContainerVolumeUpdate model = BinaryData - .fromString("{\"properties\":{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"wbw\"}}}") + .fromString( + "{\"properties\":{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"idoamciodhkha\"}}}") .toObject(AvsStorageContainerVolumeUpdate.class); Assertions.assertTrue(model.properties().softDeletion().destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetWithResponseMockTests.java index f286a2114a93..59881b882d5e 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class AvsStorageContainerVolumesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storagePoolInternalId\":\"cgcckknhxkizvyt\",\"storagePoolResourceId\":\"zvulj\",\"volumeInternalId\":\"aeranokqgukkjqnv\",\"displayName\":\"oylaxxul\",\"space\":{\"totalUsed\":5101303402831257640,\"unique\":5029433390313491179,\"snapshots\":8813063868718248905,\"shared\":1780260345090786386},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"vgjrwhr\"},\"createdTimestamp\":\"ycy\",\"provisionedSize\":434681128132082293,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"cknfnwmbtmvpd\",\"diskName\":\"jdhttzaefedxi\",\"folder\":\"ch\",\"avsVmInternalId\":\"phkmcrjdqnsdfz\",\"avsVmResourceId\":\"bg\",\"avsVmName\":\"gkylkdghr\",\"avsStorageContainerResourceId\":\"euutlwxezwzh\"},\"provisioningState\":\"Succeeded\"},\"id\":\"wnhhtqlgehgppip\",\"name\":\"fhpfeoajvgcxtx\",\"type\":\"csheafidltugsr\"}"; + = "{\"properties\":{\"storagePoolInternalId\":\"tljqobbpih\",\"storagePoolResourceId\":\"cecybmrqbrjbbmpx\",\"volumeInternalId\":\"vykfrexcrse\",\"displayName\":\"jksghudg\",\"space\":{\"totalUsed\":2719268477754035786,\"unique\":6017658527996628296,\"snapshots\":6704590262182698064,\"shared\":8654886681546899705},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"jkxibda\"},\"createdTimestamp\":\"rkmdyom\",\"provisionedSize\":8418041694716055150,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"hd\",\"diskName\":\"i\",\"folder\":\"hpwpgddeimawzovg\",\"avsVmInternalId\":\"kumuikjcjca\",\"avsVmResourceId\":\"tbw\",\"avsVmName\":\"nsq\",\"avsStorageContainerResourceId\":\"wxwcomli\"},\"provisioningState\":\"Failed\"},\"id\":\"vc\",\"name\":\"cswkacvejy\",\"type\":\"dvlvhbwrnfxtgdd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsStorageContainerVolume response = manager.avsStorageContainerVolumes() - .getWithResponse("mes", "kdlpa", "zrcxfailcfxwmdbo", "dfgsftufqobrj", com.azure.core.util.Context.NONE) + .getWithResponse("rhmpqvwwsk", "ndcbrwi", "uvqejosovyrrle", "esi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.properties().softDeletion().destroyed()); + Assertions.assertTrue(response.properties().softDeletion().destroyed()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesListByAvsStorageContainerMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesListByAvsStorageContainerMockTests.java index 60b08f4c2339..0e751e87b192 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesListByAvsStorageContainerMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesListByAvsStorageContainerMockTests.java @@ -22,7 +22,7 @@ public final class AvsStorageContainerVolumesListByAvsStorageContainerMockTests @Test public void testListByAvsStorageContainer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"prhptillu\",\"storagePoolResourceId\":\"iqtgdqoh\",\"volumeInternalId\":\"wsldrizetpwbr\",\"displayName\":\"llibphbqzmizak\",\"space\":{\"totalUsed\":2130055064209410437,\"unique\":2736442030278845624,\"snapshots\":907050390570708707,\"shared\":43816545117778318},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"ajoylhjl\"},\"createdTimestamp\":\"oyxprimr\",\"provisionedSize\":8744366569550226962,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"jme\",\"diskName\":\"slstvasy\",\"folder\":\"wxdzaumweoohgu\",\"avsVmInternalId\":\"fuzboyjathwtzolb\",\"avsVmResourceId\":\"emwmdxmebwjs\",\"avsVmName\":\"jpahlxvea\",\"avsStorageContainerResourceId\":\"f\"},\"provisioningState\":\"Canceled\"},\"id\":\"wmqtibx\",\"name\":\"ijddtvqc\",\"type\":\"tad\"}]}"; + = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"qswankltytmhdr\",\"storagePoolResourceId\":\"nnhdrl\",\"volumeInternalId\":\"gjc\",\"displayName\":\"guxhem\",\"space\":{\"totalUsed\":58293617704211157,\"unique\":1674083786148793997,\"snapshots\":5923731066969155308,\"shared\":4845732356948511994},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"ukklelss\"},\"createdTimestamp\":\"lycsxz\",\"provisionedSize\":4157233928260830193,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"mdesqp\",\"diskName\":\"pvmjcdoewbid\",\"folder\":\"vteo\",\"avsVmInternalId\":\"xvgpiude\",\"avsVmResourceId\":\"gfsxzec\",\"avsVmName\":\"axwk\",\"avsStorageContainerResourceId\":\"fykhvuhxepmru\"},\"provisioningState\":\"Canceled\"},\"id\":\"baobn\",\"name\":\"lujdjltymkmv\",\"type\":\"uihywart\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,7 +32,7 @@ public void testListByAvsStorageContainer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.avsStorageContainerVolumes() - .listByAvsStorageContainer("smkss", "h", "iftxfkf", com.azure.core.util.Context.NONE); + .listByAvsStorageContainer("qthe", "n", "naoyank", com.azure.core.util.Context.NONE); Assertions.assertTrue(response.iterator().next().properties().softDeletion().destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesUpdateMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesUpdateMockTests.java index 6331bfe5f35c..19240e3c9b38 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesUpdateMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesUpdateMockTests.java @@ -24,7 +24,7 @@ public final class AvsStorageContainerVolumesUpdateMockTests { @Test public void testUpdate() throws Exception { String responseStr - = "{\"properties\":{\"storagePoolInternalId\":\"euaulxu\",\"storagePoolResourceId\":\"mjbnk\",\"volumeInternalId\":\"xynenl\",\"displayName\":\"xeizzg\",\"space\":{\"totalUsed\":8412972694845165147,\"unique\":8962463680320101041,\"snapshots\":4209661666295596661,\"shared\":457249377795932450},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"xcktpiymerteeamm\"},\"createdTimestamp\":\"iekkkzddrtkgdojb\",\"provisionedSize\":2124241015903648306,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"fdeesvecuijpxtx\",\"diskName\":\"uwprtujwsawd\",\"folder\":\"jibabxvititvtze\",\"avsVmInternalId\":\"xavo\",\"avsVmResourceId\":\"tfgle\",\"avsVmName\":\"dmdqb\",\"avsStorageContainerResourceId\":\"pypqtgsfj\"},\"provisioningState\":\"Succeeded\"},\"id\":\"lhhxudbxvodhtnsi\",\"name\":\"ud\",\"type\":\"z\"}"; + = "{\"properties\":{\"storagePoolInternalId\":\"lajv\",\"storagePoolResourceId\":\"jchcsrlzknmzla\",\"volumeInternalId\":\"updwv\",\"displayName\":\"hcnzqt\",\"space\":{\"totalUsed\":6867207346099661430,\"unique\":8542101456055579496,\"snapshots\":5508989168713615858,\"shared\":1587608643555622655},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"iwdcxsmlzzhzd\"},\"createdTimestamp\":\"etlgydlhqvlnnpx\",\"provisionedSize\":6995606256621656629,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"eaarbgjekglklbyu\",\"diskName\":\"idwcwvmzegjon\",\"folder\":\"hj\",\"avsVmInternalId\":\"rwgdnqzbrfks\",\"avsVmResourceId\":\"zhzmtksjci\",\"avsVmName\":\"digsxcdgl\",\"avsStorageContainerResourceId\":\"plkeuachtomflryt\"},\"provisioningState\":\"Succeeded\"},\"id\":\"fmdgycxnms\",\"name\":\"whqjjyslurlpshhk\",\"type\":\"pedwqsl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,7 +34,7 @@ public void testUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsStorageContainerVolume response = manager.avsStorageContainerVolumes() - .update("jhhn", "kzyb", "jjidjk", "yxkyxvx", + .update("mltx", "whmozusgzvlnsnnj", "fpafolpymwamxq", "rag", new AvsStorageContainerVolumeUpdate().withProperties(new AvsStorageContainerVolumeUpdateProperties() .withSoftDeletion(new SoftDeletion().withDestroyed(false))), com.azure.core.util.Context.NONE); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersGetWithResponseMockTests.java index 8573f239c2d0..163c2dbac531 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersGetWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class AvsStorageContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"space\":{\"totalUsed\":6631490194181258927,\"unique\":4155504015372281665,\"snapshots\":7780463518072084931,\"shared\":6008082652066611938},\"resourceName\":\"yyefrpmpdnqqs\",\"provisionedLimit\":9156957823967073009,\"datastore\":\"qvmmbn\",\"mounted\":false},\"id\":\"tqlkz\",\"name\":\"egnitg\",\"type\":\"kxlzyqdrfeg\"}"; + = "{\"properties\":{\"space\":{\"totalUsed\":1099741693613147816,\"unique\":3829114562556917542,\"snapshots\":2419765316744627790,\"shared\":3739546864567345770},\"resourceName\":\"koveof\",\"provisionedLimit\":3281782888284806655,\"datastore\":\"f\",\"mounted\":false},\"id\":\"vlwyzg\",\"name\":\"blkujrllfojuidjp\",\"type\":\"uyjucejikzo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsStorageContainer response = manager.avsStorageContainers() - .getWithResponse("ijouwivkxoyzunb", "xxrtikvc", "wpgclrcivt", com.azure.core.util.Context.NONE) + .getWithResponse("mjvlgfgg", "vkyylizrzbjpsf", "sfuztlvtmv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(9156957823967073009L, response.properties().provisionedLimit()); + Assertions.assertEquals(3281782888284806655L, response.properties().provisionedLimit()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersListByStoragePoolMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersListByStoragePoolMockTests.java index 292b533b2a0a..a31a40612d61 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersListByStoragePoolMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainersListByStoragePoolMockTests.java @@ -22,7 +22,7 @@ public final class AvsStorageContainersListByStoragePoolMockTests { @Test public void testListByStoragePool() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"space\":{\"totalUsed\":7508002576192467250,\"unique\":8940030353238765514,\"snapshots\":3204420245532219409,\"shared\":2757366705767259016},\"resourceName\":\"vdaeyyguxakjsq\",\"provisionedLimit\":8392675363801599974,\"datastore\":\"zkgimsid\",\"mounted\":false},\"id\":\"cddyvvjsk\",\"name\":\"fmocwahpq\",\"type\":\"atjeaahh\"}]}"; + = "{\"value\":[{\"properties\":{\"space\":{\"totalUsed\":7370744360813533838,\"unique\":5024373642058291939,\"snapshots\":3276001010985311867,\"shared\":3808051534328354831},\"resourceName\":\"vhqjwtrhtgvg\",\"provisionedLimit\":225714080432044297,\"datastore\":\"kolawjmjsmwrokc\",\"mounted\":true},\"id\":\"zz\",\"name\":\"yjaf\",\"type\":\"tlhguynuchl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByStoragePool() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.avsStorageContainers() - .listByStoragePool("ealzxwhcansymoyq", "lwigdivbkbx", com.azure.core.util.Context.NONE); + .listByStoragePool("ovvtzejetjkln", "ikyju", com.azure.core.util.Context.NONE); - Assertions.assertEquals(8392675363801599974L, response.iterator().next().properties().provisionedLimit()); + Assertions.assertEquals(225714080432044297L, response.iterator().next().properties().provisionedLimit()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmDetailsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmDetailsTests.java index e6b1c21646be..e1f918e8d70a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmDetailsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmDetailsTests.java @@ -13,11 +13,12 @@ public final class AvsVmDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmDetails model = BinaryData - .fromString("{\"vmId\":\"vppho\",\"vmName\":\"zqzudph\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"mvdk\"}") + .fromString( + "{\"vmId\":\"lmctlpd\",\"vmName\":\"gitvg\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"hrixkwmy\"}") .toObject(AvsVmDetails.class); - Assertions.assertEquals("vppho", model.vmId()); - Assertions.assertEquals("zqzudph", model.vmName()); + Assertions.assertEquals("lmctlpd", model.vmId()); + Assertions.assertEquals("gitvg", model.vmName()); Assertions.assertEquals(VmType.V_VOL, model.vmType()); - Assertions.assertEquals("mvdk", model.avsVmInternalId()); + Assertions.assertEquals("hrixkwmy", model.avsVmInternalId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmInnerTests.java index 105efbef9d9e..012ce0f6a5d9 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmInnerTests.java @@ -12,7 +12,7 @@ public final class AvsVmInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmInner model = BinaryData.fromString( - "{\"properties\":{\"storagePoolInternalId\":\"wyt\",\"storagePoolResourceId\":\"ib\",\"displayName\":\"cgpik\",\"createdTimestamp\":\"imejzanl\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"av\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"onok\",\"vmName\":\"xrjqcirgzpfrlazs\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"nwoiind\"},\"space\":{\"totalUsed\":1586932653363724705,\"unique\":4045601352916026430,\"snapshots\":6976850827030545123,\"shared\":1464641146056052310},\"provisioningState\":\"Failed\"},\"id\":\"lsj\",\"name\":\"dhszfjv\",\"type\":\"bgofeljag\"}") + "{\"properties\":{\"storagePoolInternalId\":\"semdwzrmu\",\"storagePoolResourceId\":\"pfcqdp\",\"displayName\":\"xqv\",\"createdTimestamp\":\"vuoy\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"elvezrypq\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"okerqwkyhkobop\",\"vmName\":\"xedk\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"epbqpcrfkbw\"},\"space\":{\"totalUsed\":8172148400531908792,\"unique\":4047365707392656751,\"snapshots\":7634037595777671249,\"shared\":3963552217315921956},\"provisioningState\":\"Failed\"},\"id\":\"ekftnkhtj\",\"name\":\"y\",\"type\":\"ngwfqatm\"}") .toObject(AvsVmInner.class); Assertions.assertFalse(model.properties().softDeletion().destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmListResultTests.java index c1ce876f08ba..4678e97952d4 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmListResultTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmListResultTests.java @@ -12,9 +12,9 @@ public final class AvsVmListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"wcvtbvkayhmtnvyq\",\"storagePoolResourceId\":\"tkzwpcnpwzc\",\"displayName\":\"esgvvsccyaj\",\"createdTimestamp\":\"qfhwyg\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"nk\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"emdwzrmuhapfc\",\"vmName\":\"dpsqx\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"psvuoymgc\"},\"space\":{\"totalUsed\":3613891103592609366,\"unique\":7407196234438308565,\"snapshots\":267471399859592223,\"shared\":6907592721792123710},\"provisioningState\":\"Canceled\"},\"id\":\"eokerqwkyhkobopg\",\"name\":\"edkowepbqpcrfk\",\"type\":\"wccsnjvcdwxlpqek\"},{\"properties\":{\"storagePoolInternalId\":\"khtj\",\"storagePoolResourceId\":\"i\",\"displayName\":\"wfqatmtd\",\"createdTimestamp\":\"mdvy\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"dgszywkbirryuzh\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"oqrvqqaatjin\",\"vmName\":\"vgoup\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"iibfggj\"},\"space\":{\"totalUsed\":5365283778719311432,\"unique\":5899377869910758590,\"snapshots\":1420778694976157248,\"shared\":6372304417284094836},\"provisioningState\":\"Failed\"},\"id\":\"gllqwjy\",\"name\":\"vjayvblmhvkzu\",\"type\":\"bxvvyhg\"},{\"properties\":{\"storagePoolInternalId\":\"byrqufeg\",\"storagePoolResourceId\":\"vwz\",\"displayName\":\"nhlmctlpdng\",\"createdTimestamp\":\"vgbmhr\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"myijejvegr\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"aixexccbdreaxh\",\"vmName\":\"exdrrvqahqkg\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"pwijnhy\"},\"space\":{\"totalUsed\":6975213925943191762,\"unique\":753153192915766448,\"snapshots\":3446985016401983606,\"shared\":711571572728789342},\"provisioningState\":\"Canceled\"},\"id\":\"wvrvmtg\",\"name\":\"qp\",\"type\":\"y\"},{\"properties\":{\"storagePoolInternalId\":\"ronzmyhgfip\",\"storagePoolResourceId\":\"xkmcwaekrrjre\",\"displayName\":\"xt\",\"createdTimestamp\":\"umh\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"kkxwslol\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"uzlm\",\"vmName\":\"felfktg\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"crpw\"},\"space\":{\"totalUsed\":6589417833472886233,\"unique\":3779180060910913023,\"snapshots\":7588777355425280777,\"shared\":7742645989535300431},\"provisioningState\":\"Failed\"},\"id\":\"mw\",\"name\":\"pn\",\"type\":\"saz\"}],\"nextLink\":\"joqkagfhsxt\"}") + "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"veg\",\"storagePoolResourceId\":\"bpnaixexccbdre\",\"displayName\":\"hcexdrrvqa\",\"createdTimestamp\":\"kghtpwijnh\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"f\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"bfvoowvrv\",\"vmName\":\"t\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"qp\"},\"space\":{\"totalUsed\":7932136629726527025,\"unique\":3299325825870738139,\"snapshots\":1997162688114762581,\"shared\":1317493290230435394},\"provisioningState\":\"Succeeded\"},\"id\":\"fipns\",\"name\":\"kmcwaekrrjreafx\",\"type\":\"sgumhjglikkxwsl\"},{\"properties\":{\"storagePoolInternalId\":\"qpvuzlmvfelf\",\"storagePoolResourceId\":\"gplcrpwjxeznoigb\",\"displayName\":\"jwmwkpnbs\",\"createdTimestamp\":\"ejjoqkagfhsxtta\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"nfaazpxdtnkdmkq\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"uenvrkp\",\"vmName\":\"ou\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"bre\"},\"space\":{\"totalUsed\":3534729840474956741,\"unique\":5925123443522573300,\"snapshots\":150111183818836586,\"shared\":4730808453835982164},\"provisioningState\":\"Canceled\"},\"id\":\"qttezlwfffiakpjp\",\"name\":\"qmt\",\"type\":\"d\"}],\"nextLink\":\"mmji\"}") .toObject(AvsVmListResult.class); Assertions.assertTrue(model.value().get(0).properties().softDeletion().destroyed()); - Assertions.assertEquals("joqkagfhsxt", model.nextLink()); + Assertions.assertEquals("mmji", model.nextLink()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmPropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmPropertiesTests.java index f7993bb85d38..64f6a017fac6 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmPropertiesTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmPropertiesTests.java @@ -12,7 +12,7 @@ public final class AvsVmPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmProperties model = BinaryData.fromString( - "{\"storagePoolInternalId\":\"mqhldvrii\",\"storagePoolResourceId\":\"jnalghf\",\"displayName\":\"tvsexsowuel\",\"createdTimestamp\":\"hhahhxvrhmzkwpjg\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"ughftqsx\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"j\",\"vmName\":\"ukndxdigrjgu\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"zdmsyqtfi\"},\"space\":{\"totalUsed\":7954882621136659871,\"unique\":4169097582837090824,\"snapshots\":473030906361015447,\"shared\":2416859170129557927},\"provisioningState\":\"Canceled\"}") + "{\"storagePoolInternalId\":\"htmdvy\",\"storagePoolResourceId\":\"ikdgszywkbir\",\"displayName\":\"uzhlhkjoqrv\",\"createdTimestamp\":\"aatjinrvgoupmfi\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"gjio\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"wxkvtkkgll\",\"vmName\":\"wjygvjayvblmhvk\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"hbxvvyhgsopbyrqu\"},\"space\":{\"totalUsed\":754056912237486709,\"unique\":9141059466027402533,\"snapshots\":1956325765685570112,\"shared\":3115230018445319703},\"provisioningState\":\"Canceled\"}") .toObject(AvsVmProperties.class); Assertions.assertTrue(model.softDeletion().destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmUpdatePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmUpdatePropertiesTests.java index e5447e0c17db..59776ea2c9f8 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmUpdatePropertiesTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmUpdatePropertiesTests.java @@ -13,7 +13,7 @@ public final class AvsVmUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmUpdateProperties model - = BinaryData.fromString("{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"neuyow\"}}") + = BinaryData.fromString("{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"nk\"}}") .toObject(AvsVmUpdateProperties.class); Assertions.assertTrue(model.softDeletion().destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmUpdateTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmUpdateTests.java index f0dc67a898e6..224fb609d316 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmUpdateTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmUpdateTests.java @@ -14,16 +14,16 @@ public final class AvsVmUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmUpdate model = BinaryData - .fromString("{\"properties\":{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"bdsrez\"}}}") + .fromString("{\"properties\":{\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"hwyg\"}}}") .toObject(AvsVmUpdate.class); - Assertions.assertTrue(model.properties().softDeletion().destroyed()); + Assertions.assertFalse(model.properties().softDeletion().destroyed()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AvsVmUpdate model = new AvsVmUpdate() - .withProperties(new AvsVmUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(true))); + .withProperties(new AvsVmUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(false))); model = BinaryData.fromObject(model).toObject(AvsVmUpdate.class); - Assertions.assertTrue(model.properties().softDeletion().destroyed()); + Assertions.assertFalse(model.properties().softDeletion().destroyed()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeInnerTests.java index 6b8204f14b3f..e0431ffa40a3 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeInnerTests.java @@ -12,8 +12,8 @@ public final class AvsVmVolumeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmVolumeInner model = BinaryData.fromString( - "{\"properties\":{\"storagePoolInternalId\":\"uenvrkp\",\"storagePoolResourceId\":\"uaibrebqaaysj\",\"volumeInternalId\":\"xqtnq\",\"displayName\":\"ezl\",\"space\":{\"totalUsed\":6879851489693220346,\"unique\":3644100748262359557,\"snapshots\":3086933290402300840,\"shared\":8477209307411238262},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"m\"},\"createdTimestamp\":\"d\",\"provisionedSize\":4417313243230783512,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"yeozphvwauyqncy\",\"diskName\":\"upkvipmdsc\",\"folder\":\"xqupevzhf\",\"avsVmInternalId\":\"totxhojujb\",\"avsVmResourceId\":\"pelmcuvhixbjxyf\",\"avsVmName\":\"n\",\"avsStorageContainerResourceId\":\"lrcoolsttpki\"},\"provisioningState\":\"Failed\"},\"id\":\"nujrywvtyl\",\"name\":\"fpncurdo\",\"type\":\"wiithtywub\"}") + "{\"properties\":{\"storagePoolInternalId\":\"cwxqu\",\"storagePoolResourceId\":\"vzhfstotxhoj\",\"volumeInternalId\":\"bypel\",\"displayName\":\"uvhixbjxyfwn\",\"space\":{\"totalUsed\":671123196620591834,\"unique\":3135284928958606229,\"snapshots\":6221565179371079410,\"shared\":8274971032821131751},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"iwkkbn\"},\"createdTimestamp\":\"rywvtylbfpn\",\"provisionedSize\":1272014300253373331,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"iithtywu\",\"diskName\":\"xcbihw\",\"folder\":\"knfd\",\"avsVmInternalId\":\"twjchrdg\",\"avsVmResourceId\":\"ihxumwctondzj\",\"avsVmName\":\"uu\",\"avsStorageContainerResourceId\":\"fdlwg\"},\"provisioningState\":\"Succeeded\"},\"id\":\"bwtovvtgseinqf\",\"name\":\"ufxqknpirgnepttw\",\"type\":\"msniffc\"}") .toObject(AvsVmVolumeInner.class); - Assertions.assertTrue(model.properties().softDeletion().destroyed()); + Assertions.assertFalse(model.properties().softDeletion().destroyed()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeListResultTests.java index 761272294b3e..68db6ae2c660 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeListResultTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeListResultTests.java @@ -12,9 +12,9 @@ public final class AvsVmVolumeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmVolumeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"h\",\"storagePoolResourceId\":\"knfd\",\"volumeInternalId\":\"wjchrdg\",\"displayName\":\"hxumwctondzj\",\"space\":{\"totalUsed\":9060833640632099285,\"unique\":5498945404155028999,\"snapshots\":2404210463735215567,\"shared\":1258223844510951808},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"sb\"},\"createdTimestamp\":\"ovvtgseinqfiu\",\"provisionedSize\":3636581995811123220,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"rgnepttwqmsniffc\",\"diskName\":\"mqnrojlpijnkr\",\"folder\":\"frddhcrati\",\"avsVmInternalId\":\"zronasxift\",\"avsVmResourceId\":\"zq\",\"avsVmName\":\"zh\",\"avsStorageContainerResourceId\":\"tw\"},\"provisioningState\":\"Canceled\"},\"id\":\"gc\",\"name\":\"honnxkrlgnyhmos\",\"type\":\"xkk\"},{\"properties\":{\"storagePoolInternalId\":\"rrghxjbdhqxvcxgf\",\"storagePoolResourceId\":\"dsofbshrns\",\"volumeInternalId\":\"uswdv\",\"displayName\":\"ybycnunvj\",\"space\":{\"totalUsed\":4457519931759813782,\"unique\":329841943305270850,\"snapshots\":5827336550153628888,\"shared\":8400151885530005764},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"ikyzirtxdy\"},\"createdTimestamp\":\"zejntps\",\"provisionedSize\":7195330831374946824,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"qukrydxt\",\"diskName\":\"mieoxorgguf\",\"folder\":\"yaomtb\",\"avsVmInternalId\":\"hhavgrvkffovjz\",\"avsVmResourceId\":\"pjbi\",\"avsVmName\":\"gjmfxumvfcl\",\"avsStorageContainerResourceId\":\"yo\"},\"provisioningState\":\"Succeeded\"},\"id\":\"bkfezzxscyhwzdgi\",\"name\":\"ujb\",\"type\":\"bomvzzbtdcqv\"}],\"nextLink\":\"iyujviylwdshfs\"}") + "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"r\",\"storagePoolResourceId\":\"lpijnkrxfrd\",\"volumeInternalId\":\"c\",\"displayName\":\"tizzronasxif\",\"space\":{\"totalUsed\":1507601090527968063,\"unique\":6673762043141372936,\"snapshots\":319144288054659459,\"shared\":1898314842016883158},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"gogczhonnxkrlgny\"},\"createdTimestamp\":\"ossxk\",\"provisionedSize\":6620916202649905195,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"hxjbdhqxvc\",\"diskName\":\"gf\",\"folder\":\"pdso\",\"avsVmInternalId\":\"bshrnsvbuswd\",\"avsVmResourceId\":\"z\",\"avsVmName\":\"ybycnunvj\",\"avsStorageContainerResourceId\":\"rtkfawnopq\"},\"provisioningState\":\"Failed\"},\"id\":\"zirtxdyuxzejntps\",\"name\":\"wgioilqukry\",\"type\":\"xtqmieoxor\"},{\"properties\":{\"storagePoolInternalId\":\"f\",\"storagePoolResourceId\":\"aomtbghhavgrvkff\",\"volumeInternalId\":\"jzhpjbibgjmfx\",\"displayName\":\"vfcluyovwxnbkfe\",\"space\":{\"totalUsed\":7655003406714567119,\"unique\":1536558276780267484,\"snapshots\":3180545189941819155,\"shared\":7185553969157552022},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"rujbzbomvzzbtdc\"},\"createdTimestamp\":\"pniyujviyl\",\"provisionedSize\":3890373759316294333,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"n\",\"diskName\":\"bgye\",\"folder\":\"rymsgaojfmw\",\"avsVmInternalId\":\"cotmr\",\"avsVmResourceId\":\"hirctymoxoftpipi\",\"avsVmName\":\"yczuhxacpq\",\"avsStorageContainerResourceId\":\"lihhyuspskasdvlm\"},\"provisioningState\":\"Succeeded\"},\"id\":\"zxulucvpamrsreu\",\"name\":\"vxurisjnhnytxifq\",\"type\":\"zgxmr\"},{\"properties\":{\"storagePoolInternalId\":\"lw\",\"storagePoolResourceId\":\"esutrgjupauutpw\",\"volumeInternalId\":\"hihejqgwzpnfqn\",\"displayName\":\"ypsxjvfoim\",\"space\":{\"totalUsed\":8042667527966501304,\"unique\":159225456433786941,\"snapshots\":7739182003359751945,\"shared\":1648418859978390426},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"ydfce\"},\"createdTimestamp\":\"vlhv\",\"provisionedSize\":3388042618474963234,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"mrtwna\",\"diskName\":\"jslb\",\"folder\":\"wkojgcyztsfmzn\",\"avsVmInternalId\":\"aeqphchqnr\",\"avsVmResourceId\":\"rpxeh\",\"avsVmName\":\"wrykqgai\",\"avsStorageContainerResourceId\":\"mvikl\"},\"provisioningState\":\"Failed\"},\"id\":\"khbejdznxc\",\"name\":\"dsrhnjiv\",\"type\":\"lvtno\"},{\"properties\":{\"storagePoolInternalId\":\"zgemjdftuljlt\",\"storagePoolResourceId\":\"ceamtm\",\"volumeInternalId\":\"u\",\"displayName\":\"ejwcwwqiok\",\"space\":{\"totalUsed\":1604151608994173928,\"unique\":6715076788595047640,\"snapshots\":9165184616629712222,\"shared\":1383054014245985372},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"jpr\"},\"createdTimestamp\":\"wcfzqljyxgt\",\"provisionedSize\":4216274661930264095,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"sdshmkxmaehvb\",\"diskName\":\"xu\",\"folder\":\"iplt\",\"avsVmInternalId\":\"n\",\"avsVmResourceId\":\"tbaxk\",\"avsVmName\":\"xywr\",\"avsStorageContainerResourceId\":\"kpyklyhp\"},\"provisioningState\":\"Succeeded\"},\"id\":\"pvruudlg\",\"name\":\"ibthostgktstvd\",\"type\":\"eclze\"}],\"nextLink\":\"bcvhzlhpl\"}") .toObject(AvsVmVolumeListResult.class); - Assertions.assertTrue(model.value().get(0).properties().softDeletion().destroyed()); - Assertions.assertEquals("iyujviylwdshfs", model.nextLink()); + Assertions.assertFalse(model.value().get(0).properties().softDeletion().destroyed()); + Assertions.assertEquals("bcvhzlhpl", model.nextLink()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeUpdatePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeUpdatePropertiesTests.java index e46b03a5d326..88e1c1045ca7 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeUpdatePropertiesTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeUpdatePropertiesTests.java @@ -13,7 +13,7 @@ public final class AvsVmVolumeUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvsVmVolumeUpdateProperties model - = BinaryData.fromString("{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"j\"}}") + = BinaryData.fromString("{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"p\"}}") .toObject(AvsVmVolumeUpdateProperties.class); Assertions.assertTrue(model.softDeletion().destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeUpdateTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeUpdateTests.java index 20f40757d9b1..aa973ada8106 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeUpdateTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumeUpdateTests.java @@ -15,7 +15,7 @@ public final class AvsVmVolumeUpdateTests { public void testDeserialize() throws Exception { AvsVmVolumeUpdate model = BinaryData .fromString( - "{\"properties\":{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"xnfaazpxdtnk\"}}}") + "{\"properties\":{\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"phvwauyqncygu\"}}}") .toObject(AvsVmVolumeUpdate.class); Assertions.assertTrue(model.properties().softDeletion().destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesGetWithResponseMockTests.java index ac3d2287d4b7..bd3ea3876a8a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesGetWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class AvsVmVolumesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storagePoolInternalId\":\"cgyypro\",\"storagePoolResourceId\":\"ypundmbxhugc\",\"volumeInternalId\":\"k\",\"displayName\":\"lgorb\",\"space\":{\"totalUsed\":2304427621056901546,\"unique\":4613723734586965909,\"snapshots\":7226613213127469062,\"shared\":7430344282584886847},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"fvnz\"},\"createdTimestamp\":\"jtotpvopvpbd\",\"provisionedSize\":9002474166715105889,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"hedsvqwthmkyib\",\"diskName\":\"ysi\",\"folder\":\"sgqcwdho\",\"avsVmInternalId\":\"sdtmcdzs\",\"avsVmResourceId\":\"fcohdxbzlmcmu\",\"avsVmName\":\"pcvhdbevwqqxeys\",\"avsStorageContainerResourceId\":\"onqzinkfkbgbzbow\"},\"provisioningState\":\"Canceled\"},\"id\":\"clj\",\"name\":\"ygvkzqkjj\",\"type\":\"okbzef\"}"; + = "{\"properties\":{\"storagePoolInternalId\":\"ttzrazisgyki\",\"storagePoolResourceId\":\"mvanbwzo\",\"volumeInternalId\":\"nrxxbsojklin\",\"displayName\":\"dptysprqs\",\"space\":{\"totalUsed\":881427609491244967,\"unique\":7614590099827037124,\"snapshots\":7503585143266118723,\"shared\":303212841014979298},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"g\"},\"createdTimestamp\":\"iufiqwo\",\"provisionedSize\":4307466245131466920,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"ohhoucqpqojxcxz\",\"diskName\":\"zdcgdzbenr\",\"folder\":\"bcawetz\",\"avsVmInternalId\":\"ddtjwfljhznam\",\"avsVmResourceId\":\"uatmzwcjjncqtj\",\"avsVmName\":\"mizvgbgatzuuvbx\",\"avsStorageContainerResourceId\":\"grebwggahttzlsw\"},\"provisioningState\":\"Succeeded\"},\"id\":\"fu\",\"name\":\"lx\",\"type\":\"oqza\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,8 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsVmVolume response = manager.avsVmVolumes() - .getWithResponse("fuxtyasiibmiybnn", "stgnl", "hnmgixhcm", "vmqfoud", com.azure.core.util.Context.NONE) + .getWithResponse("ohdbvqvwzkj", "pwbeonr", "kwzdqybxcea", "xcptsoqfyiaseqc", + com.azure.core.util.Context.NONE) .getValue(); Assertions.assertFalse(response.properties().softDeletion().destroyed()); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmMockTests.java index 7f57070fc628..ed4188c9e0a3 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmMockTests.java @@ -22,7 +22,7 @@ public final class AvsVmVolumesListByAvsVmMockTests { @Test public void testListByAvsVm() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"ixz\",\"storagePoolResourceId\":\"pnodawopqhe\",\"volumeInternalId\":\"ptmcgsbostzelnd\",\"displayName\":\"tutmzl\",\"space\":{\"totalUsed\":7609604165307370108,\"unique\":8308748747055589302,\"snapshots\":4220060772224988907,\"shared\":5505717621673300435},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"neqvcwwyyurmo\"},\"createdTimestamp\":\"ppr\",\"provisionedSize\":2038521709899225408,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"ayzejnhlbkpbz\",\"diskName\":\"cpilj\",\"folder\":\"a\",\"avsVmInternalId\":\"zv\",\"avsVmResourceId\":\"chndbnwie\",\"avsVmName\":\"olewjwi\",\"avsStorageContainerResourceId\":\"ubwefqs\"},\"provisioningState\":\"Succeeded\"},\"id\":\"qtferrqwexjkmf\",\"name\":\"apjwogqqnobpudcd\",\"type\":\"btqwpwyawbzas\"}]}"; + = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"meblyd\",\"storagePoolResourceId\":\"kfkmrocxnehvsmt\",\"volumeInternalId\":\"lfpya\",\"displayName\":\"cygvoavyunssx\",\"space\":{\"totalUsed\":1482317786623412562,\"unique\":1202494788138589401,\"snapshots\":1231878605206858517,\"shared\":5213456478178897927},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"paseksgb\"},\"createdTimestamp\":\"antuygdhgaqipirp\",\"provisionedSize\":8430276283338712091,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"lopmjnlexwhcbjpi\",\"diskName\":\"k\",\"folder\":\"phuuuerctato\",\"avsVmInternalId\":\"intqpbrlcyr\",\"avsVmResourceId\":\"uczkgofxyfsruc\",\"avsVmName\":\"crrpcjttbstvje\",\"avsStorageContainerResourceId\":\"qnrmvvfko\"},\"provisioningState\":\"Canceled\"},\"id\":\"hktuidvrma\",\"name\":\"lpdwwexymzvlazi\",\"type\":\"bhpwvqsgnyy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListByAvsVm() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.avsVmVolumes().listByAvsVm("zrxcczurt", "e", "pqxbkwvzgnzvdf", com.azure.core.util.Context.NONE); + PagedIterable response = manager.avsVmVolumes() + .listByAvsVm("unwqr", "zfrgqhaohcm", "uocnjrohmbpyr", com.azure.core.util.Context.NONE); - Assertions.assertTrue(response.iterator().next().properties().softDeletion().destroyed()); + Assertions.assertFalse(response.iterator().next().properties().softDeletion().destroyed()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateMockTests.java index 5bded63c7ff4..513c741a03c7 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateMockTests.java @@ -24,7 +24,7 @@ public final class AvsVmVolumesUpdateMockTests { @Test public void testUpdate() throws Exception { String responseStr - = "{\"properties\":{\"storagePoolInternalId\":\"gfdgugeyzi\",\"storagePoolResourceId\":\"rkyui\",\"volumeInternalId\":\"bsnmfpph\",\"displayName\":\"eevy\",\"space\":{\"totalUsed\":4522527069130140282,\"unique\":3597759724277023056,\"snapshots\":7698479884404425134,\"shared\":1273035816626433679},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"mfg\"},\"createdTimestamp\":\"glqgleoh\",\"provisionedSize\":4155522088273976517,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"ankrrfxee\",\"diskName\":\"btijvacvbm\",\"folder\":\"z\",\"avsVmInternalId\":\"qqxlajr\",\"avsVmResourceId\":\"wxacevehj\",\"avsVmName\":\"uyxoaf\",\"avsStorageContainerResourceId\":\"aoqltfaey\"},\"provisioningState\":\"Succeeded\"},\"id\":\"fgvxirpghriypoqe\",\"name\":\"hlqhykprlpy\",\"type\":\"nuciqdsmexiit\"}"; + = "{\"properties\":{\"storagePoolInternalId\":\"xrxvbfi\",\"storagePoolResourceId\":\"u\",\"volumeInternalId\":\"ctafsrbxrblm\",\"displayName\":\"owxih\",\"space\":{\"totalUsed\":2446175609346016043,\"unique\":2194359409246982288,\"snapshots\":4028402750306072857,\"shared\":641532065749253198},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"waklsbsbqq\"},\"createdTimestamp\":\"gwwrxaomzis\",\"provisionedSize\":5731341152723748479,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"zkhhltnjadhqo\",\"diskName\":\"wjqo\",\"folder\":\"ueayfbpcmsplb\",\"avsVmInternalId\":\"rrueqthwmg\",\"avsVmResourceId\":\"mbscbbx\",\"avsVmName\":\"gdhxi\",\"avsStorageContainerResourceId\":\"d\"},\"provisioningState\":\"Succeeded\"},\"id\":\"dbwdpyqyybxubmdn\",\"name\":\"fcbqwremjela\",\"type\":\"acigel\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,9 +34,9 @@ public void testUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsVmVolume response = manager.avsVmVolumes() - .update("rjtloq", "fuojrngif", "rzpasccbiuimzdly", "dfqwmkyoq", + .update("dzsylollgtrczz", "dmxzjijpv", "aurkihcirlde", "xrdcoxnbkkja", new AvsVmVolumeUpdate().withProperties( - new AvsVmVolumeUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(true))), + new AvsVmVolumeUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(false))), com.azure.core.util.Context.NONE); Assertions.assertTrue(response.properties().softDeletion().destroyed()); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsGetWithResponseMockTests.java index ff54c88aee11..524e99f5f048 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsGetWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class AvsVmsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storagePoolInternalId\":\"cxjmonfdgnwncyp\",\"storagePoolResourceId\":\"w\",\"displayName\":\"tvuqjctzenkeifzz\",\"createdTimestamp\":\"kdasvflyhbxcudch\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"boldforobwj\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"bfhfovvacqp\",\"vmName\":\"tuodxeszabbelaw\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"ua\"},\"space\":{\"totalUsed\":199833503819632386,\"unique\":2859095376940736760,\"snapshots\":2589313714101269318,\"shared\":8393955549840736725},\"provisioningState\":\"Failed\"},\"id\":\"cwyhahno\",\"name\":\"drkywuhps\",\"type\":\"fuurutlwexx\"}"; + = "{\"properties\":{\"storagePoolInternalId\":\"sqyzqedikdfr\",\"storagePoolResourceId\":\"iqmrjgeihfqlggw\",\"displayName\":\"wzcxmjpbyephmgt\",\"createdTimestamp\":\"j\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"yfqi\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"npomy\",\"vmName\":\"wcabvnuileeya\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"lpaugmrm\"},\"space\":{\"totalUsed\":3960460149409264910,\"unique\":3938541474450046003,\"snapshots\":6909256255945094383,\"shared\":4138898459669509625},\"provisioningState\":\"Failed\"},\"id\":\"kvci\",\"name\":\"izmoaeds\",\"type\":\"jwuive\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsVm response = manager.avsVms() - .getWithResponse("amurvzmlovuan", "shcxlpmjerbdk", "lvidizozs", com.azure.core.util.Context.NONE) + .getWithResponse("h", "rbqgvgov", "bbttefjo", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertTrue(response.properties().softDeletion().destroyed()); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsListByStoragePoolMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsListByStoragePoolMockTests.java index bdb4bb23827a..3be29c16a856 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsListByStoragePoolMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsListByStoragePoolMockTests.java @@ -22,7 +22,7 @@ public final class AvsVmsListByStoragePoolMockTests { @Test public void testListByStoragePool() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"akchzyvlixqnrk\",\"storagePoolResourceId\":\"kjibnxmysuxswqrn\",\"displayName\":\"lwi\",\"createdTimestamp\":\"sttex\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"wcyyufmhruncu\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"pkcdqzhlct\",\"vmName\":\"dunqnd\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"pchrqbn\"},\"space\":{\"totalUsed\":7384163367118885266,\"unique\":5708023666168728932,\"snapshots\":5663417988942053637,\"shared\":19081015441774011},\"provisioningState\":\"Canceled\"},\"id\":\"xjumvq\",\"name\":\"olihrra\",\"type\":\"ouau\"}]}"; + = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"rgmsplzga\",\"storagePoolResourceId\":\"cshhv\",\"displayName\":\"wgnxkympqanxrj\",\"createdTimestamp\":\"xtwbta\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"yghs\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"lhkgmnsghp\",\"vmName\":\"ycphdrwjjkhvyo\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"c\"},\"space\":{\"totalUsed\":934396594975000130,\"unique\":5499885269692727703,\"snapshots\":7455310380420463061,\"shared\":4365329856743876459},\"provisioningState\":\"Succeeded\"},\"id\":\"df\",\"name\":\"mkoisqcssf\",\"type\":\"xuifmcsypobkdqz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByStoragePool() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.avsVms().listByStoragePool("lalniex", "srzpgepqtybbww", com.azure.core.util.Context.NONE); + = manager.avsVms().listByStoragePool("wcgyeewxeiqb", "smgomguaml", com.azure.core.util.Context.NONE); - Assertions.assertTrue(response.iterator().next().properties().softDeletion().destroyed()); + Assertions.assertFalse(response.iterator().next().properties().softDeletion().destroyed()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsUpdateMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsUpdateMockTests.java index bb4041e43c15..d6f82672605e 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsUpdateMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmsUpdateMockTests.java @@ -24,7 +24,7 @@ public final class AvsVmsUpdateMockTests { @Test public void testUpdate() throws Exception { String responseStr - = "{\"properties\":{\"storagePoolInternalId\":\"itmhhei\",\"storagePoolResourceId\":\"aqh\",\"displayName\":\"eufuqyrxpdlcgql\",\"createdTimestamp\":\"smjqfrddgam\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"os\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"ivfcdisyirnx\",\"vmName\":\"hcz\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"rxzbujr\"},\"space\":{\"totalUsed\":8450662333010351611,\"unique\":5948707880777970214,\"snapshots\":3272712647525819374,\"shared\":1671052929873472606},\"provisioningState\":\"Succeeded\"},\"id\":\"lnzonzlrpiqywn\",\"name\":\"vjtszcofize\",\"type\":\"tdhgbjkvrelj\"}"; + = "{\"properties\":{\"storagePoolInternalId\":\"sl\",\"storagePoolResourceId\":\"iiovgqcgxu\",\"displayName\":\"qkctotiowlxte\",\"createdTimestamp\":\"ptjgwdt\",\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"anblwphqlkccu\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"qwahoi\",\"vmName\":\"lwgniiprglvawu\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"d\"},\"space\":{\"totalUsed\":8701115908913428324,\"unique\":1633126950222224541,\"snapshots\":4670075267479378442,\"shared\":4020865096407527323},\"provisioningState\":\"Succeeded\"},\"id\":\"cubkmi\",\"name\":\"oxxkubvp\",\"type\":\"avp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,9 +34,9 @@ public void testUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsVm response = manager.avsVms() - .update("jaeukmrsieekpn", "zaapmudqmeqwi", "pibudqwyxebeybpm", + .update("pphkixkykxds", "j", "emmucfxh", new AvsVmUpdate().withProperties( - new AvsVmUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(true))), + new AvsVmUpdateProperties().withSoftDeletion(new SoftDeletion().withDestroyed(false))), com.azure.core.util.Context.NONE); Assertions.assertTrue(response.properties().softDeletion().destroyed()); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AzureVmwareServiceTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AzureVmwareServiceTests.java index aa67e4a1ac85..c7336b8bd541 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AzureVmwareServiceTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AzureVmwareServiceTests.java @@ -11,9 +11,9 @@ public final class AzureVmwareServiceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AzureVmwareService model = BinaryData.fromString("{\"avsEnabled\":false,\"sddcResourceId\":\"t\"}") + AzureVmwareService model = BinaryData.fromString("{\"avsEnabled\":false,\"sddcResourceId\":\"btdhxujznbm\"}") .toObject(AzureVmwareService.class); Assertions.assertFalse(model.avsEnabled()); - Assertions.assertEquals("t", model.clusterResourceId()); + Assertions.assertEquals("btdhxujznbm", model.clusterResourceId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AzureVolumePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AzureVolumePropertiesTests.java new file mode 100644 index 000000000000..d4f954aa13fa --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AzureVolumePropertiesTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotSource; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; +import org.junit.jupiter.api.Assertions; + +public final class AzureVolumePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AzureVolumeProperties model = BinaryData.fromString( + "{\"space\":{\"totalUsed\":4949174063431471889,\"unique\":6741258537626187541,\"snapshots\":3875488626419547824,\"shared\":8900193126458474601},\"provisionedSize\":4270960727614445481,\"serialNumber\":\"fuajly\",\"createdAt\":\"2021-10-23T11:41:17Z\",\"sourceVolumeResourceId\":\"of\",\"sourceVolumeGroupResourceId\":\"hvfcibyfmow\",\"sourceType\":\"recoverableVolume\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"jpvd\",\"volumeSnapshotName\":\"xfzwi\"},\"sourceSerialNumber\":\"wzjbh\",\"sourceRecoverableVolumeResourceId\":\"sxjrk\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-06-20T11:06:01Z\",\"previousName\":\"egv\",\"eradicationTimestamp\":\"2021-11-01T05:28:23Z\"},\"provisioningState\":\"Canceled\"}") + .toObject(AzureVolumeProperties.class); + Assertions.assertEquals(4270960727614445481L, model.provisionedSize()); + Assertions.assertEquals("of", model.sourceVolumeResourceId()); + Assertions.assertEquals("hvfcibyfmow", model.sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeSourceType.RECOVERABLE_VOLUME, model.sourceType()); + Assertions.assertEquals("jpvd", model.sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("xfzwi", model.sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("wzjbh", model.sourceSerialNumber()); + Assertions.assertEquals("sxjrk", model.sourceRecoverableVolumeResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AzureVolumeProperties model = new AzureVolumeProperties().withProvisionedSize(4270960727614445481L) + .withSourceVolumeResourceId("of") + .withSourceVolumeGroupResourceId("hvfcibyfmow") + .withSourceType(VolumeSourceType.RECOVERABLE_VOLUME) + .withSourceVolumeSnapshot( + new VolumeSnapshotSource().withVolumeGroupSnapshotResourceId("jpvd").withVolumeSnapshotName("xfzwi")) + .withSourceSerialNumber("wzjbh") + .withSourceRecoverableVolumeResourceId("sxjrk"); + model = BinaryData.fromObject(model).toObject(AzureVolumeProperties.class); + Assertions.assertEquals(4270960727614445481L, model.provisionedSize()); + Assertions.assertEquals("of", model.sourceVolumeResourceId()); + Assertions.assertEquals("hvfcibyfmow", model.sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeSourceType.RECOVERABLE_VOLUME, model.sourceType()); + Assertions.assertEquals("jpvd", model.sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("xfzwi", model.sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("wzjbh", model.sourceSerialNumber()); + Assertions.assertEquals("sxjrk", model.sourceRecoverableVolumeResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/BandwidthUsageTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/BandwidthUsageTests.java index 4697c58241ad..dfd937b318de 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/BandwidthUsageTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/BandwidthUsageTests.java @@ -13,10 +13,10 @@ public final class BandwidthUsageTests { public void testDeserialize() throws Exception { BandwidthUsage model = BinaryData .fromString( - "{\"current\":5679594705932183570,\"provisioned\":7427478878049317484,\"max\":4145471517526414946}") + "{\"current\":6352077335899529902,\"provisioned\":6736972913480201725,\"max\":7263870316289252450}") .toObject(BandwidthUsage.class); - Assertions.assertEquals(5679594705932183570L, model.current()); - Assertions.assertEquals(7427478878049317484L, model.provisioned()); - Assertions.assertEquals(4145471517526414946L, model.max()); + Assertions.assertEquals(6352077335899529902L, model.current()); + Assertions.assertEquals(6736972913480201725L, model.provisioned()); + Assertions.assertEquals(7263870316289252450L, model.max()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/BillingUsagePropertyTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/BillingUsagePropertyTests.java index 8aa79cc83e20..58a6b9383589 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/BillingUsagePropertyTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/BillingUsagePropertyTests.java @@ -13,33 +13,33 @@ public final class BillingUsagePropertyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BillingUsageProperty model = BinaryData.fromString( - "{\"propertyId\":\"jf\",\"propertyName\":\"ebrjcxe\",\"currentValue\":\"fuwutttxf\",\"previousValue\":\"rbirphxe\",\"severity\":\"alert\",\"statusMessage\":\"vahfn\",\"subProperties\":[{\"propertyId\":\"yq\",\"propertyName\":\"j\",\"currentValue\":\"uujqgidokgjljyo\",\"previousValue\":\"vcltbgsncgh\",\"severity\":\"none\",\"statusMessage\":\"szzhbijhtxfvgxbf\",\"subProperties\":[{\"propertyId\":\"nehmpvecx\",\"propertyName\":\"odebfqkkrbmpu\",\"currentValue\":\"gr\",\"previousValue\":\"flz\",\"severity\":\"warning\",\"statusMessage\":\"xzpuzycisp\",\"subProperties\":[{\"propertyId\":\"ahmgkbrp\",\"propertyName\":\"y\",\"currentValue\":\"hibnuqqkpika\",\"severity\":\"information\"},{\"propertyId\":\"gvtqagnbuynh\",\"propertyName\":\"jggmebfsiarbu\",\"currentValue\":\"rcvpnazzmhjrunmp\",\"severity\":\"warning\"},{\"propertyId\":\"tdbhrbnla\",\"propertyName\":\"kx\",\"currentValue\":\"yskpbhen\",\"severity\":\"none\"},{\"propertyId\":\"kcxywnyt\",\"propertyName\":\"rsyn\",\"currentValue\":\"qidybyx\",\"severity\":\"alert\"}]},{\"propertyId\":\"fclhaaxdbabphlwr\",\"propertyName\":\"lfktsths\",\"currentValue\":\"cocmnyyaztt\",\"previousValue\":\"wwrq\",\"severity\":\"information\",\"statusMessage\":\"dckzywbiexz\",\"subProperties\":[{\"propertyId\":\"ue\",\"propertyName\":\"xibxujwbhqwalm\",\"currentValue\":\"zyoxaepdkzjan\",\"severity\":\"alert\"},{\"propertyId\":\"xrhdwbavxbniwdjs\",\"propertyName\":\"zt\",\"currentValue\":\"dbpgnxytxhp\",\"severity\":\"information\"},{\"propertyId\":\"bzpfzab\",\"propertyName\":\"lcuhxwtctyqiklb\",\"currentValue\":\"ovplw\",\"severity\":\"information\"}]},{\"propertyId\":\"hvgyuguosvmk\",\"propertyName\":\"ss\",\"currentValue\":\"qukkfp\",\"previousValue\":\"mg\",\"severity\":\"warning\",\"statusMessage\":\"kjz\",\"subProperties\":[{\"propertyId\":\"slpvlop\",\"propertyName\":\"i\",\"currentValue\":\"ighxpk\",\"severity\":\"information\"}]}]},{\"propertyId\":\"zb\",\"propertyName\":\"iuebbaumny\",\"currentValue\":\"upedeojnabckhs\",\"previousValue\":\"xpsiebtfhvpes\",\"severity\":\"information\",\"statusMessage\":\"krdqmh\",\"subProperties\":[{\"propertyId\":\"htldwk\",\"propertyName\":\"zxuutkncwscwsvl\",\"currentValue\":\"otogtwrupqs\",\"previousValue\":\"nmic\",\"severity\":\"none\",\"statusMessage\":\"ceoveilovno\",\"subProperties\":[{\"propertyId\":\"jfcn\",\"propertyName\":\"bkc\",\"currentValue\":\"x\",\"severity\":\"warning\"}]},{\"propertyId\":\"bttk\",\"propertyName\":\"h\",\"currentValue\":\"wpn\",\"previousValue\":\"t\",\"severity\":\"none\",\"statusMessage\":\"ermclfplphoxuscr\",\"subProperties\":[{\"propertyId\":\"gyepsbjt\",\"propertyName\":\"zq\",\"currentValue\":\"gxywpmue\",\"severity\":\"alert\"},{\"propertyId\":\"jzwf\",\"propertyName\":\"kqujidsuyono\",\"currentValue\":\"glaocq\",\"severity\":\"alert\"}]},{\"propertyId\":\"ccm\",\"propertyName\":\"yudxytlmoy\",\"currentValue\":\"xv\",\"previousValue\":\"u\",\"severity\":\"warning\",\"statusMessage\":\"zntxhdz\",\"subProperties\":[{\"propertyId\":\"qj\",\"propertyName\":\"hckfrlhrx\",\"currentValue\":\"bkyvp\",\"severity\":\"alert\"},{\"propertyId\":\"anuzbpzkafkuw\",\"propertyName\":\"crnwbmeh\",\"currentValue\":\"seyvj\",\"severity\":\"none\"},{\"propertyId\":\"rts\",\"propertyName\":\"hspkdeemao\",\"currentValue\":\"mx\",\"severity\":\"none\"}]}]},{\"propertyId\":\"kv\",\"propertyName\":\"melmqkrha\",\"currentValue\":\"vljua\",\"previousValue\":\"quhcdhmduala\",\"severity\":\"warning\",\"statusMessage\":\"pvfadmwsrcr\",\"subProperties\":[{\"propertyId\":\"pv\",\"propertyName\":\"omzlfmi\",\"currentValue\":\"gwb\",\"previousValue\":\"beldawkzbaliourq\",\"severity\":\"information\",\"statusMessage\":\"auhashsfwx\",\"subProperties\":[{\"propertyId\":\"w\",\"propertyName\":\"xcug\",\"currentValue\":\"cjooxdjebwpucwwf\",\"severity\":\"warning\"},{\"propertyId\":\"vbvmeu\",\"propertyName\":\"civyhzceuo\",\"currentValue\":\"gjrwjueiotwmcdyt\",\"severity\":\"alert\"}]},{\"propertyId\":\"wit\",\"propertyName\":\"nrjawgqwg\",\"currentValue\":\"hniskxfbkpyc\",\"previousValue\":\"lwn\",\"severity\":\"information\",\"statusMessage\":\"jdauwhvy\",\"subProperties\":[{\"propertyId\":\"btdhxujznbm\",\"propertyName\":\"ow\",\"currentValue\":\"wpr\",\"severity\":\"none\"}]}]},{\"propertyId\":\"lve\",\"propertyName\":\"alupjm\",\"currentValue\":\"hfxobbcswsrtj\",\"previousValue\":\"plrbpbewtghf\",\"severity\":\"alert\",\"statusMessage\":\"c\",\"subProperties\":[{\"propertyId\":\"zvlvqhjkbegib\",\"propertyName\":\"nmxiebwwaloayqc\",\"currentValue\":\"wrtz\",\"previousValue\":\"zg\",\"severity\":\"alert\",\"statusMessage\":\"mhtxongmtsavjcb\",\"subProperties\":[{\"propertyId\":\"qpsrknftguvri\",\"propertyName\":\"hprwmdyv\",\"currentValue\":\"qtayri\",\"severity\":\"warning\"},{\"propertyId\":\"ro\",\"propertyName\":\"qbex\",\"currentValue\":\"mcqibycnojv\",\"severity\":\"none\"},{\"propertyId\":\"mefqsgzvahapjyzh\",\"propertyName\":\"vgqzcjrvxd\",\"currentValue\":\"zlmwlxkvugfhz\",\"severity\":\"warning\"}]},{\"propertyId\":\"awjvzunluthnnp\",\"propertyName\":\"nxipeil\",\"currentValue\":\"jzuaejxdultskzbb\",\"previousValue\":\"zumveekgpwo\",\"severity\":\"alert\",\"statusMessage\":\"kfpbs\",\"subProperties\":[{\"propertyId\":\"f\",\"propertyName\":\"xl\",\"currentValue\":\"us\",\"severity\":\"none\"}]},{\"propertyId\":\"touwaboekqv\",\"propertyName\":\"elnsmvbxw\",\"currentValue\":\"jsflhhcaalnjix\",\"previousValue\":\"xyawj\",\"severity\":\"none\",\"statusMessage\":\"qcslyjpkiid\",\"subProperties\":[{\"propertyId\":\"xznelixhnrztf\",\"propertyName\":\"lhbnxkna\",\"currentValue\":\"aulppggd\",\"severity\":\"warning\"},{\"propertyId\":\"napnyiropuhpigv\",\"propertyName\":\"gylgqgitxmedjvcs\",\"currentValue\":\"ynqwwncwzzhxgk\",\"severity\":\"information\"},{\"propertyId\":\"mgucna\",\"propertyName\":\"kteo\",\"currentValue\":\"llwptfdy\",\"severity\":\"warning\"}]},{\"propertyId\":\"fqbuaceopzf\",\"propertyName\":\"rhhuaopppcqeqx\",\"currentValue\":\"lzdahzxctobgbkdm\",\"previousValue\":\"zpostmgrcfbu\",\"severity\":\"none\",\"statusMessage\":\"fqjhhkxbpvjymj\",\"subProperties\":[{\"propertyId\":\"j\",\"propertyName\":\"n\",\"currentValue\":\"u\",\"severity\":\"information\"},{\"propertyId\":\"vkr\",\"propertyName\":\"swbxqz\",\"currentValue\":\"szjfauvjfdxxivet\",\"severity\":\"alert\"},{\"propertyId\":\"cqaqtdoqmcbx\",\"propertyName\":\"wvxysl\",\"currentValue\":\"bhsfxob\",\"severity\":\"warning\"}]}]}]}") + "{\"propertyId\":\"gz\",\"propertyName\":\"buhfmvfaxkffeiit\",\"currentValue\":\"lvmezyvshxmzsbbz\",\"previousValue\":\"gigr\",\"severity\":\"none\",\"statusMessage\":\"ur\",\"subProperties\":[{\"propertyId\":\"xjnspy\",\"propertyName\":\"ptkoenkoukn\",\"currentValue\":\"udwtiukbl\",\"previousValue\":\"gkpocipazyxoe\",\"severity\":\"none\",\"statusMessage\":\"g\",\"subProperties\":[{\"propertyId\":\"iucgygevqzn\",\"propertyName\":\"yp\",\"currentValue\":\"rbpizc\",\"previousValue\":\"qjsdpydnfyhxdeo\",\"severity\":\"warning\",\"statusMessage\":\"icwifsjtt\",\"subProperties\":[{\"propertyId\":\"bishcbkhajdeyea\",\"propertyName\":\"dphagalpbuxwgip\",\"currentValue\":\"honowkgshwank\",\"severity\":\"warning\"},{\"propertyId\":\"zbinjeputtm\",\"propertyName\":\"ywnuzoq\",\"currentValue\":\"tiyqzrnkcqv\",\"severity\":\"warning\"},{\"propertyId\":\"lwh\",\"propertyName\":\"lsicohoqqnwv\",\"currentValue\":\"ryavwhheunmmqh\",\"severity\":\"alert\"}]}]},{\"propertyId\":\"xzko\",\"propertyName\":\"ocukoklyax\",\"currentValue\":\"conuqszfkbeype\",\"previousValue\":\"mjmwvvjektcx\",\"severity\":\"information\",\"statusMessage\":\"hwlrsf\",\"subProperties\":[{\"propertyId\":\"pwvlqdq\",\"propertyName\":\"biqylihkaet\",\"currentValue\":\"kt\",\"previousValue\":\"civfsnkymuctq\",\"severity\":\"alert\",\"statusMessage\":\"bebrjcxerfuwuttt\",\"subProperties\":[{\"propertyId\":\"jrbirphxepcyv\",\"propertyName\":\"hfnljkyq\",\"currentValue\":\"j\",\"severity\":\"none\"},{\"propertyId\":\"ujqgidok\",\"propertyName\":\"jljyoxgv\",\"currentValue\":\"ltbgsncghkj\",\"severity\":\"none\"},{\"propertyId\":\"zz\",\"propertyName\":\"bijhtxfvgxbf\",\"currentValue\":\"mxnehmp\",\"severity\":\"alert\"},{\"propertyId\":\"cxgod\",\"propertyName\":\"bfqkkr\",\"currentValue\":\"mpukgriw\",\"severity\":\"warning\"}]}]},{\"propertyId\":\"zlfbxzpuzycispnq\",\"propertyName\":\"ahmgkbrp\",\"currentValue\":\"y\",\"previousValue\":\"ibnuqqkpik\",\"severity\":\"warning\",\"statusMessage\":\"gvtqagnbuynh\",\"subProperties\":[{\"propertyId\":\"gmebfsiarbutrcv\",\"propertyName\":\"na\",\"currentValue\":\"zmhjrunmp\",\"previousValue\":\"tdbhrbnla\",\"severity\":\"alert\",\"statusMessage\":\"myskpbhenbtkcxy\",\"subProperties\":[{\"propertyId\":\"tnrsyn\",\"propertyName\":\"qidybyx\",\"currentValue\":\"zfcl\",\"severity\":\"none\"}]}]}]}") .toObject(BillingUsageProperty.class); - Assertions.assertEquals("jf", model.propertyId()); - Assertions.assertEquals("ebrjcxe", model.propertyName()); - Assertions.assertEquals("fuwutttxf", model.currentValue()); - Assertions.assertEquals("rbirphxe", model.previousValue()); - Assertions.assertEquals(UsageSeverity.ALERT, model.severity()); - Assertions.assertEquals("vahfn", model.statusMessage()); - Assertions.assertEquals("yq", model.subProperties().get(0).propertyId()); - Assertions.assertEquals("j", model.subProperties().get(0).propertyName()); - Assertions.assertEquals("uujqgidokgjljyo", model.subProperties().get(0).currentValue()); - Assertions.assertEquals("vcltbgsncgh", model.subProperties().get(0).previousValue()); + Assertions.assertEquals("gz", model.propertyId()); + Assertions.assertEquals("buhfmvfaxkffeiit", model.propertyName()); + Assertions.assertEquals("lvmezyvshxmzsbbz", model.currentValue()); + Assertions.assertEquals("gigr", model.previousValue()); + Assertions.assertEquals(UsageSeverity.NONE, model.severity()); + Assertions.assertEquals("ur", model.statusMessage()); + Assertions.assertEquals("xjnspy", model.subProperties().get(0).propertyId()); + Assertions.assertEquals("ptkoenkoukn", model.subProperties().get(0).propertyName()); + Assertions.assertEquals("udwtiukbl", model.subProperties().get(0).currentValue()); + Assertions.assertEquals("gkpocipazyxoe", model.subProperties().get(0).previousValue()); Assertions.assertEquals(UsageSeverity.NONE, model.subProperties().get(0).severity()); - Assertions.assertEquals("szzhbijhtxfvgxbf", model.subProperties().get(0).statusMessage()); - Assertions.assertEquals("nehmpvecx", model.subProperties().get(0).subProperties().get(0).propertyId()); - Assertions.assertEquals("odebfqkkrbmpu", model.subProperties().get(0).subProperties().get(0).propertyName()); - Assertions.assertEquals("gr", model.subProperties().get(0).subProperties().get(0).currentValue()); - Assertions.assertEquals("flz", model.subProperties().get(0).subProperties().get(0).previousValue()); + Assertions.assertEquals("g", model.subProperties().get(0).statusMessage()); + Assertions.assertEquals("iucgygevqzn", model.subProperties().get(0).subProperties().get(0).propertyId()); + Assertions.assertEquals("yp", model.subProperties().get(0).subProperties().get(0).propertyName()); + Assertions.assertEquals("rbpizc", model.subProperties().get(0).subProperties().get(0).currentValue()); + Assertions.assertEquals("qjsdpydnfyhxdeo", model.subProperties().get(0).subProperties().get(0).previousValue()); Assertions.assertEquals(UsageSeverity.WARNING, model.subProperties().get(0).subProperties().get(0).severity()); - Assertions.assertEquals("xzpuzycisp", model.subProperties().get(0).subProperties().get(0).statusMessage()); - Assertions.assertEquals("ahmgkbrp", + Assertions.assertEquals("icwifsjtt", model.subProperties().get(0).subProperties().get(0).statusMessage()); + Assertions.assertEquals("bishcbkhajdeyea", model.subProperties().get(0).subProperties().get(0).subProperties().get(0).propertyId()); - Assertions.assertEquals("y", + Assertions.assertEquals("dphagalpbuxwgip", model.subProperties().get(0).subProperties().get(0).subProperties().get(0).propertyName()); - Assertions.assertEquals("hibnuqqkpika", + Assertions.assertEquals("honowkgshwank", model.subProperties().get(0).subProperties().get(0).subProperties().get(0).currentValue()); - Assertions.assertEquals(UsageSeverity.INFORMATION, + Assertions.assertEquals(UsageSeverity.WARNING, model.subProperties().get(0).subProperties().get(0).subProperties().get(0).severity()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ConnectionParametersResponseInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ConnectionParametersResponseInnerTests.java new file mode 100644 index 000000000000..0c4f3cf71368 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ConnectionParametersResponseInnerTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.ConnectionParametersResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class ConnectionParametersResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ConnectionParametersResponseInner model = BinaryData + .fromString( + "{\"iscsi\":{\"endpoints\":[{\"ip\":\"rxkpmloazuruoc\",\"port\":1983144959,\"iqn\":\"oorb\"}]}}") + .toObject(ConnectionParametersResponseInner.class); + Assertions.assertEquals("rxkpmloazuruoc", model.iscsi().endpoints().get(0).ip()); + Assertions.assertEquals(1983144959, model.iscsi().endpoints().get(0).port()); + Assertions.assertEquals("oorb", model.iscsi().endpoints().get(0).iqn()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/DestroyedStatePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/DestroyedStatePropertiesTests.java new file mode 100644 index 000000000000..70b69c1a94a6 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/DestroyedStatePropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.DestroyedStateProperties; + +public final class DestroyedStatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DestroyedStateProperties model = BinaryData.fromString( + "{\"destroyed\":true,\"destroyedAt\":\"2021-06-12T00:01:41Z\",\"previousName\":\"stmjlxrri\",\"eradicationTimestamp\":\"2021-02-03T08:16:34Z\"}") + .toObject(DestroyedStateProperties.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/HealthDetailsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/HealthDetailsTests.java index 56bdaf7f0ada..765ff2b3160c 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/HealthDetailsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/HealthDetailsTests.java @@ -12,20 +12,20 @@ public final class HealthDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HealthDetails model = BinaryData.fromString( - "{\"usedCapacityPercentage\":86.70706848567121,\"bandwidthUsage\":{\"current\":7227919326419178637,\"provisioned\":5767639862165404734,\"max\":1778964673623605649},\"iopsUsage\":{\"current\":3706325358985550286,\"provisioned\":2021331363267121666,\"max\":7599641624551569114},\"space\":{\"totalUsed\":7902119571785822811,\"unique\":3209157136466060094,\"snapshots\":1649253814789212920,\"shared\":8358866216552319675},\"dataReductionRatio\":38.945365161426515,\"estimatedMaxCapacity\":8785236673495844841}") + "{\"usedCapacityPercentage\":73.92609873118205,\"bandwidthUsage\":{\"current\":6679760626312548131,\"provisioned\":5744286568716968585,\"max\":1238366971592199185},\"iopsUsage\":{\"current\":4790240939770837417,\"provisioned\":3450156772675162636,\"max\":609111947256097194},\"space\":{\"totalUsed\":7914857163807651319,\"unique\":6186305042394833028,\"snapshots\":4645704067973725569,\"shared\":2299728096259421603},\"dataReductionRatio\":52.051627656759926,\"estimatedMaxCapacity\":4291870996342138092}") .toObject(HealthDetails.class); - Assertions.assertEquals(86.70706848567121, model.usedCapacityPercentage()); - Assertions.assertEquals(7227919326419178637L, model.bandwidthUsage().current()); - Assertions.assertEquals(5767639862165404734L, model.bandwidthUsage().provisioned()); - Assertions.assertEquals(1778964673623605649L, model.bandwidthUsage().max()); - Assertions.assertEquals(3706325358985550286L, model.iopsUsage().current()); - Assertions.assertEquals(2021331363267121666L, model.iopsUsage().provisioned()); - Assertions.assertEquals(7599641624551569114L, model.iopsUsage().max()); - Assertions.assertEquals(7902119571785822811L, model.space().totalUsed()); - Assertions.assertEquals(3209157136466060094L, model.space().unique()); - Assertions.assertEquals(1649253814789212920L, model.space().snapshots()); - Assertions.assertEquals(8358866216552319675L, model.space().shared()); - Assertions.assertEquals(38.945365161426515, model.dataReductionRatio()); - Assertions.assertEquals(8785236673495844841L, model.estimatedMaxCapacity()); + Assertions.assertEquals(73.92609873118205, model.usedCapacityPercentage()); + Assertions.assertEquals(6679760626312548131L, model.bandwidthUsage().current()); + Assertions.assertEquals(5744286568716968585L, model.bandwidthUsage().provisioned()); + Assertions.assertEquals(1238366971592199185L, model.bandwidthUsage().max()); + Assertions.assertEquals(4790240939770837417L, model.iopsUsage().current()); + Assertions.assertEquals(3450156772675162636L, model.iopsUsage().provisioned()); + Assertions.assertEquals(609111947256097194L, model.iopsUsage().max()); + Assertions.assertEquals(7914857163807651319L, model.space().totalUsed()); + Assertions.assertEquals(6186305042394833028L, model.space().unique()); + Assertions.assertEquals(4645704067973725569L, model.space().snapshots()); + Assertions.assertEquals(2299728096259421603L, model.space().shared()); + Assertions.assertEquals(52.051627656759926, model.dataReductionRatio()); + Assertions.assertEquals(4291870996342138092L, model.estimatedMaxCapacity()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IopsUsageTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IopsUsageTests.java index 84efd0bc7d3a..a53a899b297d 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IopsUsageTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IopsUsageTests.java @@ -13,10 +13,10 @@ public final class IopsUsageTests { public void testDeserialize() throws Exception { IopsUsage model = BinaryData .fromString( - "{\"current\":4942892095072246886,\"provisioned\":5967113662628227205,\"max\":6786807909891437356}") + "{\"current\":1857528814684738489,\"provisioned\":4589373462999613920,\"max\":1349349327808665603}") .toObject(IopsUsage.class); - Assertions.assertEquals(4942892095072246886L, model.current()); - Assertions.assertEquals(5967113662628227205L, model.provisioned()); - Assertions.assertEquals(6786807909891437356L, model.max()); + Assertions.assertEquals(1857528814684738489L, model.current()); + Assertions.assertEquals(4589373462999613920L, model.provisioned()); + Assertions.assertEquals(1349349327808665603L, model.max()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IscsiConnectionParametersTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IscsiConnectionParametersTests.java new file mode 100644 index 000000000000..083486f93ad0 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IscsiConnectionParametersTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.IscsiConnectionParameters; +import org.junit.jupiter.api.Assertions; + +public final class IscsiConnectionParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IscsiConnectionParameters model = BinaryData.fromString( + "{\"endpoints\":[{\"ip\":\"oybfhjxakvvj\",\"port\":639924781,\"iqn\":\"lordilmywwtkgkxn\"},{\"ip\":\"edabgyvudtjue\",\"port\":359778244,\"iqn\":\"cihxuuwhcjyx\"},{\"ip\":\"cybvpayakkudzpxg\",\"port\":431593989,\"iqn\":\"plmag\"},{\"ip\":\"tcyohpfkyrk\",\"port\":172770191,\"iqn\":\"dg\"}]}") + .toObject(IscsiConnectionParameters.class); + Assertions.assertEquals("oybfhjxakvvj", model.endpoints().get(0).ip()); + Assertions.assertEquals(639924781, model.endpoints().get(0).port()); + Assertions.assertEquals("lordilmywwtkgkxn", model.endpoints().get(0).iqn()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IscsiEndpointTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IscsiEndpointTests.java new file mode 100644 index 000000000000..0e8bf93d88d9 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/IscsiEndpointTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.IscsiEndpoint; +import org.junit.jupiter.api.Assertions; + +public final class IscsiEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IscsiEndpoint model = BinaryData.fromString("{\"ip\":\"ogsjkmnwqjno\",\"port\":688364927,\"iqn\":\"iyhddvi\"}") + .toObject(IscsiEndpoint.class); + Assertions.assertEquals("ogsjkmnwqjno", model.ip()); + Assertions.assertEquals(688364927, model.port()); + Assertions.assertEquals("iyhddvi", model.iqn()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LatestLinkedSaaSResponseInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LatestLinkedSaaSResponseInnerTests.java new file mode 100644 index 000000000000..c44e7a161850 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LatestLinkedSaaSResponseInnerTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.LatestLinkedSaaSResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class LatestLinkedSaaSResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LatestLinkedSaaSResponseInner model + = BinaryData.fromString("{\"saaSResourceId\":\"rqlfktsthsucocmn\",\"isHiddenSaaS\":false}") + .toObject(LatestLinkedSaaSResponseInner.class); + Assertions.assertEquals("rqlfktsthsucocmn", model.saaSResourceId()); + Assertions.assertFalse(model.isHiddenSaaS()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LimitDetailsInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LimitDetailsInnerTests.java index 6bfea561f399..24f81687e054 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LimitDetailsInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LimitDetailsInnerTests.java @@ -12,22 +12,22 @@ public final class LimitDetailsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LimitDetailsInner model = BinaryData.fromString( - "{\"storagePool\":{\"provisionedBandwidthMbPerSec\":{\"min\":4652283960591475965,\"max\":3226770590349878189},\"provisionedIops\":{\"min\":729151913745579744,\"max\":4015230803094049478},\"physicalAvailabilityZones\":[\"fkgukdkexxppof\",\"xaxcfjpgddtocjjx\",\"vpmouexhdzxib\"]},\"volume\":{\"provisionedSize\":{\"min\":4277846390701650653,\"max\":4614606581389875358}},\"protectionPolicy\":{\"frequency\":{\"min\":4100986999398487835,\"max\":2361719571524653167},\"retention\":{\"min\":7242238818162588034,\"max\":4291031946118420703}},\"performancePolicy\":{\"iopsLimit\":{\"min\":808595757398499551,\"max\":3565100103213873234},\"bandwidthLimit\":{\"min\":2543360050548789201,\"max\":4634265215487541073}}}") + "{\"storagePool\":{\"provisionedBandwidthMbPerSec\":{\"min\":6053828266727030876,\"max\":5238657988148777604},\"provisionedIops\":{\"min\":800185130738068140,\"max\":2824855369069129793},\"physicalAvailabilityZones\":[\"jctbza\",\"s\",\"sycbkbfk\",\"ukdkexxppofmxa\"]},\"volume\":{\"provisionedSize\":{\"min\":234739697710718593,\"max\":3544936977106916903}},\"protectionPolicy\":{\"frequency\":{\"min\":7025637214094256468,\"max\":5329254752236906798},\"retention\":{\"min\":6058519776110267460,\"max\":8556120198731757598}},\"performancePolicy\":{\"iopsLimit\":{\"min\":8427359700591319302,\"max\":5599595646430060423},\"bandwidthLimit\":{\"min\":832230444306913912,\"max\":7583874860615513488}}}") .toObject(LimitDetailsInner.class); - Assertions.assertEquals(4652283960591475965L, model.storagePool().provisionedBandwidthMbPerSec().min()); - Assertions.assertEquals(3226770590349878189L, model.storagePool().provisionedBandwidthMbPerSec().max()); - Assertions.assertEquals(729151913745579744L, model.storagePool().provisionedIops().min()); - Assertions.assertEquals(4015230803094049478L, model.storagePool().provisionedIops().max()); - Assertions.assertEquals("fkgukdkexxppof", model.storagePool().physicalAvailabilityZones().get(0)); - Assertions.assertEquals(4277846390701650653L, model.volume().provisionedSize().min()); - Assertions.assertEquals(4614606581389875358L, model.volume().provisionedSize().max()); - Assertions.assertEquals(4100986999398487835L, model.protectionPolicy().frequency().min()); - Assertions.assertEquals(2361719571524653167L, model.protectionPolicy().frequency().max()); - Assertions.assertEquals(7242238818162588034L, model.protectionPolicy().retention().min()); - Assertions.assertEquals(4291031946118420703L, model.protectionPolicy().retention().max()); - Assertions.assertEquals(808595757398499551L, model.performancePolicy().iopsLimit().min()); - Assertions.assertEquals(3565100103213873234L, model.performancePolicy().iopsLimit().max()); - Assertions.assertEquals(2543360050548789201L, model.performancePolicy().bandwidthLimit().min()); - Assertions.assertEquals(4634265215487541073L, model.performancePolicy().bandwidthLimit().max()); + Assertions.assertEquals(6053828266727030876L, model.storagePool().provisionedBandwidthMbPerSec().min()); + Assertions.assertEquals(5238657988148777604L, model.storagePool().provisionedBandwidthMbPerSec().max()); + Assertions.assertEquals(800185130738068140L, model.storagePool().provisionedIops().min()); + Assertions.assertEquals(2824855369069129793L, model.storagePool().provisionedIops().max()); + Assertions.assertEquals("jctbza", model.storagePool().physicalAvailabilityZones().get(0)); + Assertions.assertEquals(234739697710718593L, model.volume().provisionedSize().min()); + Assertions.assertEquals(3544936977106916903L, model.volume().provisionedSize().max()); + Assertions.assertEquals(7025637214094256468L, model.protectionPolicy().frequency().min()); + Assertions.assertEquals(5329254752236906798L, model.protectionPolicy().frequency().max()); + Assertions.assertEquals(6058519776110267460L, model.protectionPolicy().retention().min()); + Assertions.assertEquals(8556120198731757598L, model.protectionPolicy().retention().max()); + Assertions.assertEquals(8427359700591319302L, model.performancePolicy().iopsLimit().min()); + Assertions.assertEquals(5599595646430060423L, model.performancePolicy().iopsLimit().max()); + Assertions.assertEquals(832230444306913912L, model.performancePolicy().bandwidthLimit().min()); + Assertions.assertEquals(7583874860615513488L, model.performancePolicy().bandwidthLimit().max()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LinkSaaSRequestTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LinkSaaSRequestTests.java new file mode 100644 index 000000000000..e8d369b4ea43 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/LinkSaaSRequestTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.LinkSaaSRequest; +import org.junit.jupiter.api.Assertions; + +public final class LinkSaaSRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LinkSaaSRequest model + = BinaryData.fromString("{\"saaSResourceId\":\"axdbabph\"}").toObject(LinkSaaSRequest.class); + Assertions.assertEquals("axdbabph", model.saaSResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LinkSaaSRequest model = new LinkSaaSRequest().withSaaSResourceId("axdbabph"); + model = BinaryData.fromObject(model).toObject(LinkSaaSRequest.class); + Assertions.assertEquals("axdbabph", model.saaSResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ManagedServiceIdentityTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ManagedServiceIdentityTests.java index dbeb090fd369..3ba4c188c6ac 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ManagedServiceIdentityTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ManagedServiceIdentityTests.java @@ -16,17 +16,19 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"vfiwjmygtdss\",\"tenantId\":\"wtmwerio\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"mwmbes\":{\"principalId\":\"semwabnet\",\"clientId\":\"hszhedplvwiwu\"},\"onz\":{\"principalId\":\"nkww\",\"clientId\":\"pjflcxogao\"}}}") + "{\"principalId\":\"kvugfhzovawjvzun\",\"tenantId\":\"thnnpr\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"pwo\":{\"principalId\":\"ilpjzuaejxdult\",\"clientId\":\"zbbtdzumveek\"},\"luu\":{\"principalId\":\"hkfpbs\",\"clientId\":\"ofd\"},\"wyjsflhhcaalnjix\":{\"principalId\":\"ttouwaboekqvkel\",\"clientId\":\"mvb\"},\"slyjpkiid\":{\"principalId\":\"xyawj\",\"clientId\":\"aq\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("mwmbes", new UserAssignedIdentity(), "onz", new UserAssignedIdentity())); + ManagedServiceIdentity model + = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("pwo", new UserAssignedIdentity(), "luu", new UserAssignedIdentity(), + "wyjsflhhcaalnjix", new UserAssignedIdentity(), "slyjpkiid", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/MarketplaceDetailsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/MarketplaceDetailsTests.java index a1bcc10dc120..a75cf5295432 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/MarketplaceDetailsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/MarketplaceDetailsTests.java @@ -14,34 +14,37 @@ public final class MarketplaceDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarketplaceDetails model = BinaryData.fromString( - "{\"subscriptionId\":\"ubljofxqe\",\"subscriptionStatus\":\"PendingFulfillmentStart\",\"offerDetails\":{\"publisherId\":\"aeqjhqjbasvms\",\"offerId\":\"jqul\",\"planId\":\"gsntnbybkzgcwr\",\"planName\":\"lxxwrljdouskc\",\"termUnit\":\"kocrcjdkwtnhx\",\"termId\":\"jbiksqrglssai\"}}") + "{\"subscriptionId\":\"rnfygxgispem\",\"subscriptionStatus\":\"Suspended\",\"offerDetails\":{\"publisherId\":\"kufubljo\",\"offerId\":\"xqeofjaeqjhqjba\",\"planId\":\"v\",\"planName\":\"mjqulngsn\",\"termUnit\":\"bybkzgcwrwclxx\",\"termId\":\"ljdousk\"},\"saaSResourceId\":\"vkocrcjdkwtn\"}") .toObject(MarketplaceDetails.class); - Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START, model.subscriptionStatus()); - Assertions.assertEquals("aeqjhqjbasvms", model.offerDetails().publisherId()); - Assertions.assertEquals("jqul", model.offerDetails().offerId()); - Assertions.assertEquals("gsntnbybkzgcwr", model.offerDetails().planId()); - Assertions.assertEquals("lxxwrljdouskc", model.offerDetails().planName()); - Assertions.assertEquals("kocrcjdkwtnhx", model.offerDetails().termUnit()); - Assertions.assertEquals("jbiksqrglssai", model.offerDetails().termId()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, model.subscriptionStatus()); + Assertions.assertEquals("kufubljo", model.offerDetails().publisherId()); + Assertions.assertEquals("xqeofjaeqjhqjba", model.offerDetails().offerId()); + Assertions.assertEquals("v", model.offerDetails().planId()); + Assertions.assertEquals("mjqulngsn", model.offerDetails().planName()); + Assertions.assertEquals("bybkzgcwrwclxx", model.offerDetails().termUnit()); + Assertions.assertEquals("ljdousk", model.offerDetails().termId()); + Assertions.assertEquals("vkocrcjdkwtn", model.saaSResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MarketplaceDetails model - = new MarketplaceDetails().withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START) - .withOfferDetails(new OfferDetails().withPublisherId("aeqjhqjbasvms") - .withOfferId("jqul") - .withPlanId("gsntnbybkzgcwr") - .withPlanName("lxxwrljdouskc") - .withTermUnit("kocrcjdkwtnhx") - .withTermId("jbiksqrglssai")); + = new MarketplaceDetails().withSubscriptionStatus(MarketplaceSubscriptionStatus.SUSPENDED) + .withOfferDetails(new OfferDetails().withPublisherId("kufubljo") + .withOfferId("xqeofjaeqjhqjba") + .withPlanId("v") + .withPlanName("mjqulngsn") + .withTermUnit("bybkzgcwrwclxx") + .withTermId("ljdousk")) + .withSaaSResourceId("vkocrcjdkwtn"); model = BinaryData.fromObject(model).toObject(MarketplaceDetails.class); - Assertions.assertEquals(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START, model.subscriptionStatus()); - Assertions.assertEquals("aeqjhqjbasvms", model.offerDetails().publisherId()); - Assertions.assertEquals("jqul", model.offerDetails().offerId()); - Assertions.assertEquals("gsntnbybkzgcwr", model.offerDetails().planId()); - Assertions.assertEquals("lxxwrljdouskc", model.offerDetails().planName()); - Assertions.assertEquals("kocrcjdkwtnhx", model.offerDetails().termUnit()); - Assertions.assertEquals("jbiksqrglssai", model.offerDetails().termId()); + Assertions.assertEquals(MarketplaceSubscriptionStatus.SUSPENDED, model.subscriptionStatus()); + Assertions.assertEquals("kufubljo", model.offerDetails().publisherId()); + Assertions.assertEquals("xqeofjaeqjhqjba", model.offerDetails().offerId()); + Assertions.assertEquals("v", model.offerDetails().planId()); + Assertions.assertEquals("mjqulngsn", model.offerDetails().planName()); + Assertions.assertEquals("bybkzgcwrwclxx", model.offerDetails().termUnit()); + Assertions.assertEquals("ljdousk", model.offerDetails().termId()); + Assertions.assertEquals("vkocrcjdkwtn", model.saaSResourceId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/OfferDetailsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/OfferDetailsTests.java index 960e2c696092..6b307e7c7912 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/OfferDetailsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/OfferDetailsTests.java @@ -12,30 +12,30 @@ public final class OfferDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OfferDetails model = BinaryData.fromString( - "{\"publisherId\":\"qpjwnzlljfm\",\"offerId\":\"pee\",\"planId\":\"vmgxsab\",\"planName\":\"qduujitcjczdz\",\"termUnit\":\"ndhkrw\",\"termId\":\"appd\"}") + "{\"publisherId\":\"xbnjbiksq\",\"offerId\":\"gls\",\"planId\":\"ainqpjwnzlljfm\",\"planName\":\"eebvmgxsab\",\"termUnit\":\"qduujitcjczdz\",\"termId\":\"ndhkrw\"}") .toObject(OfferDetails.class); - Assertions.assertEquals("qpjwnzlljfm", model.publisherId()); - Assertions.assertEquals("pee", model.offerId()); - Assertions.assertEquals("vmgxsab", model.planId()); - Assertions.assertEquals("qduujitcjczdz", model.planName()); - Assertions.assertEquals("ndhkrw", model.termUnit()); - Assertions.assertEquals("appd", model.termId()); + Assertions.assertEquals("xbnjbiksq", model.publisherId()); + Assertions.assertEquals("gls", model.offerId()); + Assertions.assertEquals("ainqpjwnzlljfm", model.planId()); + Assertions.assertEquals("eebvmgxsab", model.planName()); + Assertions.assertEquals("qduujitcjczdz", model.termUnit()); + Assertions.assertEquals("ndhkrw", model.termId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OfferDetails model = new OfferDetails().withPublisherId("qpjwnzlljfm") - .withOfferId("pee") - .withPlanId("vmgxsab") - .withPlanName("qduujitcjczdz") - .withTermUnit("ndhkrw") - .withTermId("appd"); + OfferDetails model = new OfferDetails().withPublisherId("xbnjbiksq") + .withOfferId("gls") + .withPlanId("ainqpjwnzlljfm") + .withPlanName("eebvmgxsab") + .withTermUnit("qduujitcjczdz") + .withTermId("ndhkrw"); model = BinaryData.fromObject(model).toObject(OfferDetails.class); - Assertions.assertEquals("qpjwnzlljfm", model.publisherId()); - Assertions.assertEquals("pee", model.offerId()); - Assertions.assertEquals("vmgxsab", model.planId()); - Assertions.assertEquals("qduujitcjczdz", model.planName()); - Assertions.assertEquals("ndhkrw", model.termUnit()); - Assertions.assertEquals("appd", model.termId()); + Assertions.assertEquals("xbnjbiksq", model.publisherId()); + Assertions.assertEquals("gls", model.offerId()); + Assertions.assertEquals("ainqpjwnzlljfm", model.planId()); + Assertions.assertEquals("eebvmgxsab", model.planName()); + Assertions.assertEquals("qduujitcjczdz", model.termUnit()); + Assertions.assertEquals("ndhkrw", model.termId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/OperationsListMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/OperationsListMockTests.java index 46682f6dd054..5db61dfa2d7b 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/OperationsListMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"rbgyefry\",\"isDataAction\":false,\"display\":{\"provider\":\"j\",\"resource\":\"wncot\",\"operation\":\"fhir\",\"description\":\"ymoxoftpipiwyczu\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"wmqtibx\",\"isDataAction\":false,\"display\":{\"provider\":\"tvqcttadijaeu\",\"resource\":\"rsiee\",\"operation\":\"ndzaapmudq\",\"description\":\"qwigpibudqwyxe\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PerformanceParametersTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PerformanceParametersTests.java new file mode 100644 index 000000000000..59cb970dfdf6 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PerformanceParametersTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import org.junit.jupiter.api.Assertions; + +public final class PerformanceParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PerformanceParameters model + = BinaryData.fromString("{\"bandwidthLimitMbPerSec\":2979275467216366207,\"iopsLimit\":379152667379515000}") + .toObject(PerformanceParameters.class); + Assertions.assertEquals(2979275467216366207L, model.bandwidthLimitMbPerSec()); + Assertions.assertEquals(379152667379515000L, model.iopsLimit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PerformanceParameters model = new PerformanceParameters().withBandwidthLimitMbPerSec(2979275467216366207L) + .withIopsLimit(379152667379515000L); + model = BinaryData.fromObject(model).toObject(PerformanceParameters.class); + Assertions.assertEquals(2979275467216366207L, model.bandwidthLimitMbPerSec()); + Assertions.assertEquals(379152667379515000L, model.iopsLimit()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PerformancePolicyLimitsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PerformancePolicyLimitsTests.java index 0984a680e83b..1abb99a50c58 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PerformancePolicyLimitsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PerformancePolicyLimitsTests.java @@ -12,11 +12,11 @@ public final class PerformancePolicyLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PerformancePolicyLimits model = BinaryData.fromString( - "{\"iopsLimit\":{\"min\":1374202645553660529,\"max\":2121697815416351815},\"bandwidthLimit\":{\"min\":57754051587633869,\"max\":495685925173240949}}") + "{\"iopsLimit\":{\"min\":5957914782999520303,\"max\":1424644879574037453},\"bandwidthLimit\":{\"min\":3642573438978350422,\"max\":7417380553588926362}}") .toObject(PerformancePolicyLimits.class); - Assertions.assertEquals(1374202645553660529L, model.iopsLimit().min()); - Assertions.assertEquals(2121697815416351815L, model.iopsLimit().max()); - Assertions.assertEquals(57754051587633869L, model.bandwidthLimit().min()); - Assertions.assertEquals(495685925173240949L, model.bandwidthLimit().max()); + Assertions.assertEquals(5957914782999520303L, model.iopsLimit().min()); + Assertions.assertEquals(1424644879574037453L, model.iopsLimit().max()); + Assertions.assertEquals(3642573438978350422L, model.bandwidthLimit().min()); + Assertions.assertEquals(7417380553588926362L, model.bandwidthLimit().max()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAccessSettingsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAccessSettingsTests.java new file mode 100644 index 000000000000..74184301fcb2 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAccessSettingsTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAccessSettings; +import org.junit.jupiter.api.Assertions; + +public final class PlatformConsoleAccessSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformConsoleAccessSettings model + = BinaryData.fromString("{\"enabled\":false}").toObject(PlatformConsoleAccessSettings.class); + Assertions.assertFalse(model.enabled()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PlatformConsoleAccessSettings model = new PlatformConsoleAccessSettings().withEnabled(false); + model = BinaryData.fromObject(model).toObject(PlatformConsoleAccessSettings.class); + Assertions.assertFalse(model.enabled()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAuthConfigTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAuthConfigTests.java new file mode 100644 index 000000000000..413f29d5b4ef --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAuthConfigTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthConfig; + +public final class PlatformConsoleAuthConfigTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformConsoleAuthConfig model = BinaryData.fromString("{\"authType\":\"PlatformConsoleAuthConfig\"}") + .toObject(PlatformConsoleAuthConfig.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PlatformConsoleAuthConfig model = new PlatformConsoleAuthConfig(); + model = BinaryData.fromObject(model).toObject(PlatformConsoleAuthConfig.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAuthResultInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAuthResultInnerTests.java new file mode 100644 index 000000000000..a94675c7210d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleAuthResultInnerTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.PlatformConsoleAuthResultInner; + +public final class PlatformConsoleAuthResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformConsoleAuthResultInner model = BinaryData.fromString("{\"authType\":\"PlatformConsoleAuthResult\"}") + .toObject(PlatformConsoleAuthResultInner.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleSettingsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleSettingsTests.java new file mode 100644 index 000000000000..b291f71e371a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleSettingsTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAccessSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSubnet; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PlatformConsoleSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformConsoleSettings model = BinaryData.fromString( + "{\"enabled\":true,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":false},\"cli\":{\"enabled\":true},\"subnets\":[{\"id\":\"eualupjmkhf\",\"managementIpAddress\":\"bbcswsrtjri\",\"serviceBackendIps\":[\"bpbewtghfgb\",\"c\",\"wxzvlvqhjkb\",\"gibtnm\"]},{\"id\":\"iebwwaloayqcgwrt\",\"managementIpAddress\":\"uzgwyzmhtx\",\"serviceBackendIps\":[\"mtsavjcbpwxqp\",\"rknftguvriuhprwm\",\"yvxqtayriwwroy\",\"bexrmcq\"]}],\"defaultUsername\":\"ycnojvknmefqsg\"}") + .toObject(PlatformConsoleSettings.class); + Assertions.assertTrue(model.enabled()); + Assertions.assertFalse(model.gui().enabled()); + Assertions.assertFalse(model.api().enabled()); + Assertions.assertTrue(model.cli().enabled()); + Assertions.assertEquals("eualupjmkhf", model.subnets().get(0).id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PlatformConsoleSettings model = new PlatformConsoleSettings().withEnabled(true) + .withGui(new PlatformConsoleAccessSettings().withEnabled(false)) + .withApi(new PlatformConsoleAccessSettings().withEnabled(false)) + .withCli(new PlatformConsoleAccessSettings().withEnabled(true)) + .withSubnets(Arrays.asList(new PlatformConsoleSubnet().withId("eualupjmkhf"), + new PlatformConsoleSubnet().withId("iebwwaloayqcgwrt"))); + model = BinaryData.fromObject(model).toObject(PlatformConsoleSettings.class); + Assertions.assertTrue(model.enabled()); + Assertions.assertFalse(model.gui().enabled()); + Assertions.assertFalse(model.api().enabled()); + Assertions.assertTrue(model.cli().enabled()); + Assertions.assertEquals("eualupjmkhf", model.subnets().get(0).id()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleSubnetTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleSubnetTests.java new file mode 100644 index 000000000000..bd2184f7c8bc --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/PlatformConsoleSubnetTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSubnet; +import org.junit.jupiter.api.Assertions; + +public final class PlatformConsoleSubnetTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlatformConsoleSubnet model = BinaryData + .fromString("{\"id\":\"ah\",\"managementIpAddress\":\"jyzhpvgq\",\"serviceBackendIps\":[\"rvxdjzlmw\"]}") + .toObject(PlatformConsoleSubnet.class); + Assertions.assertEquals("ah", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PlatformConsoleSubnet model = new PlatformConsoleSubnet().withId("ah"); + model = BinaryData.fromObject(model).toObject(PlatformConsoleSubnet.class); + Assertions.assertEquals("ah", model.id()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ProtectionParametersTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ProtectionParametersTests.java new file mode 100644 index 000000000000..e1597a6d5a66 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ProtectionParametersTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import java.time.Duration; +import org.junit.jupiter.api.Assertions; + +public final class ProtectionParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProtectionParameters model + = BinaryData.fromString("{\"retention\":\"PT158H45M46S\",\"frequency\":\"PT65H25M59S\"}") + .toObject(ProtectionParameters.class); + Assertions.assertEquals(Duration.parse("PT158H45M46S"), model.retention()); + Assertions.assertEquals(Duration.parse("PT65H25M59S"), model.frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProtectionParameters model = new ProtectionParameters().withRetention(Duration.parse("PT158H45M46S")) + .withFrequency(Duration.parse("PT65H25M59S")); + model = BinaryData.fromObject(model).toObject(ProtectionParameters.class); + Assertions.assertEquals(Duration.parse("PT158H45M46S"), model.retention()); + Assertions.assertEquals(Duration.parse("PT65H25M59S"), model.frequency()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ProtectionPolicyLimitsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ProtectionPolicyLimitsTests.java index 655cd8d0dfcf..50a875f00246 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ProtectionPolicyLimitsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ProtectionPolicyLimitsTests.java @@ -12,11 +12,11 @@ public final class ProtectionPolicyLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionPolicyLimits model = BinaryData.fromString( - "{\"frequency\":{\"min\":7360318284111753754,\"max\":6563598327820568661},\"retention\":{\"min\":2529230432728826986,\"max\":5232700234439771330}}") + "{\"frequency\":{\"min\":9114569351870679024,\"max\":5712976136216097028},\"retention\":{\"min\":489725236273769678,\"max\":2446371757978717753}}") .toObject(ProtectionPolicyLimits.class); - Assertions.assertEquals(7360318284111753754L, model.frequency().min()); - Assertions.assertEquals(6563598327820568661L, model.frequency().max()); - Assertions.assertEquals(2529230432728826986L, model.retention().min()); - Assertions.assertEquals(5232700234439771330L, model.retention().max()); + Assertions.assertEquals(9114569351870679024L, model.frequency().min()); + Assertions.assertEquals(5712976136216097028L, model.frequency().max()); + Assertions.assertEquals(489725236273769678L, model.retention().min()); + Assertions.assertEquals(2446371757978717753L, model.retention().max()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RangeLimitsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RangeLimitsTests.java index 561dc77a45b3..d514f9a749dd 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RangeLimitsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RangeLimitsTests.java @@ -11,9 +11,9 @@ public final class RangeLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RangeLimits model = BinaryData.fromString("{\"min\":3455031391724056303,\"max\":2667969705485885831}") + RangeLimits model = BinaryData.fromString("{\"min\":8941192620574400347,\"max\":886477673791412708}") .toObject(RangeLimits.class); - Assertions.assertEquals(3455031391724056303L, model.min()); - Assertions.assertEquals(2667969705485885831L, model.max()); + Assertions.assertEquals(8941192620574400347L, model.min()); + Assertions.assertEquals(886477673791412708L, model.max()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupInnerTests.java new file mode 100644 index 000000000000..a325483f04aa --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.RecoverableVolumeGroupInner; + +public final class RecoverableVolumeGroupInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RecoverableVolumeGroupInner model = BinaryData.fromString( + "{\"properties\":{\"createdAt\":\"2021-02-11T17:54:04Z\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-09-02T12:01:46Z\",\"previousName\":\"ihih\",\"eradicationTimestamp\":\"2021-05-07T17:19:51Z\"},\"performanceParameters\":{\"bandwidthLimitMbPerSec\":2778672543282420556,\"iopsLimit\":8794293942031923163},\"protectionParameters\":{\"retention\":\"PT215H38M36S\",\"frequency\":\"PT115H30M26S\"},\"space\":{\"totalUsed\":3019395130723147651,\"unique\":4912715799442068283,\"snapshots\":3660912103339273976,\"shared\":6839610084052198593},\"provisioningState\":\"Accepted\"},\"id\":\"xmwoteyowcluqo\",\"name\":\"ekqvgqouwif\",\"type\":\"mpjw\"}") + .toObject(RecoverableVolumeGroupInner.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupListResultTests.java new file mode 100644 index 000000000000..7994cf461bf8 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.implementation.models.RecoverableVolumeGroupListResult; +import org.junit.jupiter.api.Assertions; + +public final class RecoverableVolumeGroupListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RecoverableVolumeGroupListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"createdAt\":\"2021-09-13T22:37:23Z\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-10-29T22:49:45Z\",\"previousName\":\"qcuubgqibrta\",\"eradicationTimestamp\":\"2021-04-21T10:09:38Z\"},\"performanceParameters\":{\"bandwidthLimitMbPerSec\":164688709661552118,\"iopsLimit\":8696293720164196486},\"protectionParameters\":{\"retention\":\"PT227H40M34S\",\"frequency\":\"PT41H56M22S\"},\"space\":{\"totalUsed\":24920049510923286,\"unique\":32649607287286313,\"snapshots\":618753299566596484,\"shared\":3464871827628211920},\"provisioningState\":\"Failed\"},\"id\":\"xiutcx\",\"name\":\"pzhyr\",\"type\":\"etoge\"},{\"properties\":{\"createdAt\":\"2021-07-24T12:15:08Z\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-09-05T07:02:59Z\",\"previousName\":\"hlabrq\",\"eradicationTimestamp\":\"2021-09-26T21:51:14Z\"},\"performanceParameters\":{\"bandwidthLimitMbPerSec\":5360573657900704125,\"iopsLimit\":8388507251957303098},\"protectionParameters\":{\"retention\":\"PT209H15M42S\",\"frequency\":\"PT232H53M49S\"},\"space\":{\"totalUsed\":2224204418995372793,\"unique\":6591356112538439286,\"snapshots\":1199870922590196154,\"shared\":453982295042099428},\"provisioningState\":\"Accepted\"},\"id\":\"eitpkxztmo\",\"name\":\"bklftidgfcwqmpim\",\"type\":\"qxzhem\"},{\"properties\":{\"createdAt\":\"2021-06-14T22:58:13Z\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-02-04T05:09:41Z\",\"previousName\":\"t\",\"eradicationTimestamp\":\"2021-02-28T12:44:36Z\"},\"performanceParameters\":{\"bandwidthLimitMbPerSec\":8763676046339141097,\"iopsLimit\":2922521852735651575},\"protectionParameters\":{\"retention\":\"PT18H36M16S\",\"frequency\":\"PT110H12M1S\"},\"space\":{\"totalUsed\":101810227198669247,\"unique\":2813139304371547019,\"snapshots\":7299139482903204662,\"shared\":3733298951427650199},\"provisioningState\":\"Deleting\"},\"id\":\"guk\",\"name\":\"alhsnvkc\",\"type\":\"mxzrpoa\"}],\"nextLink\":\"lnwiaaomylwe\"}") + .toObject(RecoverableVolumeGroupListResult.class); + Assertions.assertEquals("lnwiaaomylwe", model.nextLink()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupPropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupPropertiesTests.java new file mode 100644 index 000000000000..be88001c7b34 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroupProperties; + +public final class RecoverableVolumeGroupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RecoverableVolumeGroupProperties model = BinaryData.fromString( + "{\"createdAt\":\"2021-08-17T21:45:28Z\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-03-25T17:15:32Z\",\"previousName\":\"cvhrfsp\",\"eradicationTimestamp\":\"2021-03-24T21:48:38Z\"},\"performanceParameters\":{\"bandwidthLimitMbPerSec\":8954451670172217459,\"iopsLimit\":411801841623955697},\"protectionParameters\":{\"retention\":\"PT123H5M8S\",\"frequency\":\"PT219H54M30S\"},\"space\":{\"totalUsed\":6985965395162175205,\"unique\":8741364863001165224,\"snapshots\":6751807886056090415,\"shared\":2173155893890174136},\"provisioningState\":\"Deleting\"}") + .toObject(RecoverableVolumeGroupProperties.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsGetWithResponseMockTests.java new file mode 100644 index 000000000000..7435fe87052b --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsGetWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroup; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RecoverableVolumeGroupsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"createdAt\":\"2021-12-07T02:27:26Z\",\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-10-28T01:06:02Z\",\"previousName\":\"h\",\"eradicationTimestamp\":\"2021-07-09T17:38:17Z\"},\"performanceParameters\":{\"bandwidthLimitMbPerSec\":8067959356414385637,\"iopsLimit\":7031906555713564353},\"protectionParameters\":{\"retention\":\"PT230H38M4S\",\"frequency\":\"PT144H13M22S\"},\"space\":{\"totalUsed\":8106459162816330355,\"unique\":2008609093528264024,\"snapshots\":971090188713373675,\"shared\":14387237489053315},\"provisioningState\":\"Accepted\"},\"id\":\"uskbrreq\",\"name\":\"n\",\"type\":\"ceysfaqeg\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RecoverableVolumeGroup response = manager.recoverableVolumeGroups() + .getWithResponse("tgroesh", "ygzc", "yf", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsListByStoragePoolMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsListByStoragePoolMockTests.java new file mode 100644 index 000000000000..8ea78239caeb --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/RecoverableVolumeGroupsListByStoragePoolMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.RecoverableVolumeGroup; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RecoverableVolumeGroupsListByStoragePoolMockTests { + @Test + public void testListByStoragePool() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"createdAt\":\"2021-03-06T01:51:55Z\",\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-09-09T02:05:09Z\",\"previousName\":\"tpo\",\"eradicationTimestamp\":\"2021-02-04T13:27:46Z\"},\"performanceParameters\":{\"bandwidthLimitMbPerSec\":5794667745348900018,\"iopsLimit\":1687931055724115736},\"protectionParameters\":{\"retention\":\"PT89H30M27S\",\"frequency\":\"PT161H6M32S\"},\"space\":{\"totalUsed\":7244246857170439837,\"unique\":7689369794154411309,\"snapshots\":7104254094559493194,\"shared\":185180593501651337},\"provisioningState\":\"Canceled\"},\"id\":\"sdpcvess\",\"name\":\"zhhkuuipldqqc\",\"type\":\"ekvalblhtjq\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.recoverableVolumeGroups() + .listByStoragePool("lwryshwddkvbxgkq", "sybwptdaca", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationBillingStatusInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationBillingStatusInnerTests.java index 9aac0edf0626..ded2c8aa685a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationBillingStatusInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationBillingStatusInnerTests.java @@ -12,21 +12,21 @@ public final class ReservationBillingStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReservationBillingStatusInner model = BinaryData.fromString( - "{\"timestamp\":\"m\",\"totalUsedCapacityReported\":199478075825684377,\"lowDrrPoolCount\":1338226566,\"drrWeightedAverage\":5.773117540744533,\"totalNonReducibleReported\":4291268661905691897,\"extraUsedCapacityNonReducible\":5532394837865502846,\"extraUsedCapacityLowUsageRounding\":4811588424327006022,\"extraUsedCapacityNonReduciblePlanDiscount\":8189670768631717659,\"totalUsedCapacityBilled\":1144092009173010962,\"totalUsedCapacityIncludedPlan\":3105636476634467949,\"totalUsedCapacityOverage\":3694853900658231195,\"totalPerformanceReported\":7982526886149094942,\"totalPerformanceIncludedPlan\":8505816739590036821,\"totalPerformanceOverage\":6433366187327369612}") + "{\"timestamp\":\"jthjqkwpyei\",\"totalUsedCapacityReported\":5249632183286427435,\"lowDrrPoolCount\":1907104888,\"drrWeightedAverage\":41.64201526730872,\"totalNonReducibleReported\":5650616844832545685,\"extraUsedCapacityNonReducible\":6968905495959747775,\"extraUsedCapacityLowUsageRounding\":5154702853155489872,\"extraUsedCapacityNonReduciblePlanDiscount\":5115351983117671001,\"totalUsedCapacityBilled\":5654168720621130688,\"totalUsedCapacityIncludedPlan\":4083184887004469884,\"totalUsedCapacityOverage\":1606432780866459111,\"totalPerformanceReported\":6491877655864517038,\"totalPerformanceIncludedPlan\":1866958004161497380,\"totalPerformanceOverage\":2441730285810886150}") .toObject(ReservationBillingStatusInner.class); - Assertions.assertEquals("m", model.timestamp()); - Assertions.assertEquals(199478075825684377L, model.totalUsedCapacityReported()); - Assertions.assertEquals(1338226566, model.lowDrrPoolCount()); - Assertions.assertEquals(5.773117540744533, model.drrWeightedAverage()); - Assertions.assertEquals(4291268661905691897L, model.totalNonReducibleReported()); - Assertions.assertEquals(5532394837865502846L, model.extraUsedCapacityNonReducible()); - Assertions.assertEquals(4811588424327006022L, model.extraUsedCapacityLowUsageRounding()); - Assertions.assertEquals(8189670768631717659L, model.extraUsedCapacityNonReduciblePlanDiscount()); - Assertions.assertEquals(1144092009173010962L, model.totalUsedCapacityBilled()); - Assertions.assertEquals(3105636476634467949L, model.totalUsedCapacityIncludedPlan()); - Assertions.assertEquals(3694853900658231195L, model.totalUsedCapacityOverage()); - Assertions.assertEquals(7982526886149094942L, model.totalPerformanceReported()); - Assertions.assertEquals(8505816739590036821L, model.totalPerformanceIncludedPlan()); - Assertions.assertEquals(6433366187327369612L, model.totalPerformanceOverage()); + Assertions.assertEquals("jthjqkwpyei", model.timestamp()); + Assertions.assertEquals(5249632183286427435L, model.totalUsedCapacityReported()); + Assertions.assertEquals(1907104888, model.lowDrrPoolCount()); + Assertions.assertEquals(41.64201526730872, model.drrWeightedAverage()); + Assertions.assertEquals(5650616844832545685L, model.totalNonReducibleReported()); + Assertions.assertEquals(6968905495959747775L, model.extraUsedCapacityNonReducible()); + Assertions.assertEquals(5154702853155489872L, model.extraUsedCapacityLowUsageRounding()); + Assertions.assertEquals(5115351983117671001L, model.extraUsedCapacityNonReduciblePlanDiscount()); + Assertions.assertEquals(5654168720621130688L, model.totalUsedCapacityBilled()); + Assertions.assertEquals(4083184887004469884L, model.totalUsedCapacityIncludedPlan()); + Assertions.assertEquals(1606432780866459111L, model.totalUsedCapacityOverage()); + Assertions.assertEquals(6491877655864517038L, model.totalPerformanceReported()); + Assertions.assertEquals(1866958004161497380L, model.totalPerformanceIncludedPlan()); + Assertions.assertEquals(2441730285810886150L, model.totalPerformanceOverage()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationBillingUsageReportInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationBillingUsageReportInnerTests.java index 181dc939360c..78c188c6b1ff 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationBillingUsageReportInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationBillingUsageReportInnerTests.java @@ -13,33 +13,33 @@ public final class ReservationBillingUsageReportInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReservationBillingUsageReportInner model = BinaryData.fromString( - "{\"timestamp\":\"ln\",\"billingUsageProperties\":[{\"propertyId\":\"lefgugnxk\",\"propertyName\":\"xdqmidtthzrvqdra\",\"currentValue\":\"hjybigehoqfbo\",\"previousValue\":\"kanyktzlcuiywg\",\"severity\":\"information\",\"statusMessage\":\"gndrvynh\",\"subProperties\":[{\"propertyId\":\"phrcgyncoc\",\"propertyName\":\"ecfvmm\",\"currentValue\":\"oo\",\"previousValue\":\"xlzevgbmqjqabcy\",\"severity\":\"warning\",\"statusMessage\":\"vkwlzuvccfwnf\",\"subProperties\":[{\"propertyId\":\"cfionl\",\"propertyName\":\"bxetqgtzxdpn\",\"currentValue\":\"bqqwxrj\",\"severity\":\"none\"}]},{\"propertyId\":\"al\",\"propertyName\":\"nwsubisnj\",\"currentValue\":\"mpmngnzscxaqwoo\",\"previousValue\":\"cbonqvpk\",\"severity\":\"none\",\"statusMessage\":\"xnj\",\"subProperties\":[{\"propertyId\":\"eipheoflokeyy\",\"propertyName\":\"enjbdlwtgrhp\",\"currentValue\":\"jp\",\"severity\":\"warning\"},{\"propertyId\":\"masxazjpqyegu\",\"propertyName\":\"lhbxxhejjzzvdud\",\"currentValue\":\"wdslfhotwmcy\",\"severity\":\"information\"}]},{\"propertyId\":\"wlbjnpgacftade\",\"propertyName\":\"xnltyfsoppu\",\"currentValue\":\"uesnzwdejbavo\",\"previousValue\":\"zdmohctbqvu\",\"severity\":\"none\",\"statusMessage\":\"dndnvow\",\"subProperties\":[{\"propertyId\":\"jugwdkcglhsl\",\"propertyName\":\"zj\",\"currentValue\":\"yggdtjixh\",\"severity\":\"warning\"},{\"propertyId\":\"uofqwe\",\"propertyName\":\"kh\",\"currentValue\":\"enevfyexfwhybci\",\"severity\":\"information\"},{\"propertyId\":\"yvdcsitynnaa\",\"propertyName\":\"dectehfiqsc\",\"currentValue\":\"eypvhezrkg\",\"severity\":\"warning\"},{\"propertyId\":\"c\",\"propertyName\":\"refovgmkqsleyyvx\",\"currentValue\":\"qjpkcattpngjcrc\",\"severity\":\"none\"}]}]},{\"propertyId\":\"sqpjhvmdajvn\",\"propertyName\":\"sounqecanoaeu\",\"currentValue\":\"fhyhltrpmopjmcma\",\"previousValue\":\"okth\",\"severity\":\"none\",\"statusMessage\":\"uaodsfcpk\",\"subProperties\":[{\"propertyId\":\"dpuozmyz\",\"propertyName\":\"dagfuaxbezyiuok\",\"currentValue\":\"twhrdxwzywqsm\",\"previousValue\":\"ureximoryocfs\",\"severity\":\"information\",\"statusMessage\":\"ymddys\",\"subProperties\":[{\"propertyId\":\"iuxhqyudxorr\",\"propertyName\":\"nbpoczvyifqrvkdv\",\"currentValue\":\"sllr\",\"severity\":\"none\"}]},{\"propertyId\":\"vdfwatkpn\",\"propertyName\":\"ulexxbczwtr\",\"currentValue\":\"wiqzbqjvsovmyo\",\"previousValue\":\"cspkwlhzdobpxjmf\",\"severity\":\"warning\",\"statusMessage\":\"vnchrkcci\",\"subProperties\":[{\"propertyId\":\"juqk\",\"propertyName\":\"rsa\",\"currentValue\":\"iwkuofos\",\"severity\":\"none\"},{\"propertyId\":\"hsauuimjmvxied\",\"propertyName\":\"ugidyjrr\",\"currentValue\":\"byao\",\"severity\":\"alert\"},{\"propertyId\":\"e\",\"propertyName\":\"csonpclhoco\",\"currentValue\":\"slkevle\",\"severity\":\"alert\"}]},{\"propertyId\":\"zfbuhf\",\"propertyName\":\"vfaxkffeiith\",\"currentValue\":\"vmezy\",\"previousValue\":\"hxmzsbbzoggig\",\"severity\":\"warning\",\"statusMessage\":\"burvjxxjnspy\",\"subProperties\":[{\"propertyId\":\"koen\",\"propertyName\":\"ou\",\"currentValue\":\"nvudwtiukb\",\"severity\":\"alert\"}]},{\"propertyId\":\"ngkpocipazy\",\"propertyName\":\"o\",\"currentValue\":\"gukgjnpiucgygevq\",\"previousValue\":\"typmrbpizcdrqjsd\",\"severity\":\"none\",\"statusMessage\":\"nfyhx\",\"subProperties\":[{\"propertyId\":\"ejzicwifsjtt\",\"propertyName\":\"zfbishcbkhaj\",\"currentValue\":\"eyeam\",\"severity\":\"alert\"},{\"propertyId\":\"hagalpbuxwgipwh\",\"propertyName\":\"nowkgshw\",\"currentValue\":\"nkixzbinj\",\"severity\":\"alert\"}]}]},{\"propertyId\":\"uttmrywnuzoqft\",\"propertyName\":\"yqzrnkcqvyxlw\",\"currentValue\":\"zlsico\",\"previousValue\":\"qqn\",\"severity\":\"none\",\"statusMessage\":\"ryavwhheunmmqh\",\"subProperties\":[{\"propertyId\":\"zko\",\"propertyName\":\"ocukoklyax\",\"currentValue\":\"conuqszfkbeype\",\"previousValue\":\"mjmwvvjektcx\",\"severity\":\"information\",\"statusMessage\":\"hwlrsf\",\"subProperties\":[{\"propertyId\":\"pwvlqdq\",\"propertyName\":\"biqylihkaet\",\"currentValue\":\"kt\",\"severity\":\"warning\"}]}]}],\"overallStatusMessage\":\"civfsnkymuctq\"}") + "{\"timestamp\":\"ghmewuam\",\"billingUsageProperties\":[{\"propertyId\":\"hrzayvvtpgvdf\",\"propertyName\":\"iotkftutqxl\",\"currentValue\":\"gxlefgugnxkrxd\",\"previousValue\":\"i\",\"severity\":\"information\",\"statusMessage\":\"hzrvqd\",\"subProperties\":[{\"propertyId\":\"hjybigehoqfbo\",\"propertyName\":\"skanyk\",\"currentValue\":\"zlcuiywgqywgndrv\",\"previousValue\":\"hzgpphrcgyncocpe\",\"severity\":\"alert\",\"statusMessage\":\"m\",\"subProperties\":[{\"propertyId\":\"ofsx\",\"propertyName\":\"zevgb\",\"currentValue\":\"qjqabcypmivkwl\",\"severity\":\"alert\"}]}]},{\"propertyId\":\"vccfw\",\"propertyName\":\"fnba\",\"currentValue\":\"fionl\",\"previousValue\":\"x\",\"severity\":\"none\",\"statusMessage\":\"gtzxdpn\",\"subProperties\":[{\"propertyId\":\"qwxrjfeallnw\",\"propertyName\":\"ubisnjampmng\",\"currentValue\":\"zscxaqwo\",\"previousValue\":\"hcbonqvpkvlr\",\"severity\":\"none\",\"statusMessage\":\"ea\",\"subProperties\":[{\"propertyId\":\"pheoflokeyy\",\"propertyName\":\"enjbdlwtgrhp\",\"currentValue\":\"jp\",\"severity\":\"warning\"},{\"propertyId\":\"masxazjpqyegu\",\"propertyName\":\"lhbxxhejjzzvdud\",\"currentValue\":\"wdslfhotwmcy\",\"severity\":\"information\"},{\"propertyId\":\"wlbjnpgacftade\",\"propertyName\":\"xnltyfsoppu\",\"currentValue\":\"uesnzwdejbavo\",\"severity\":\"warning\"},{\"propertyId\":\"zdmohctbqvu\",\"propertyName\":\"wxdndnvowgujjug\",\"currentValue\":\"dkcglhsl\",\"severity\":\"alert\"}]}]},{\"propertyId\":\"jdyggdtji\",\"propertyName\":\"hbkuofqwey\",\"currentValue\":\"hmenevfyexfwhybc\",\"previousValue\":\"vyvdcs\",\"severity\":\"none\",\"statusMessage\":\"nnaamdectehfiqsc\",\"subProperties\":[{\"propertyId\":\"pvhez\",\"propertyName\":\"kgqhcjrefovg\",\"currentValue\":\"kqsleyyvxy\",\"previousValue\":\"pkc\",\"severity\":\"alert\",\"statusMessage\":\"pngjcrcczsqpjhvm\",\"subProperties\":[{\"propertyId\":\"v\",\"propertyName\":\"ysou\",\"currentValue\":\"q\",\"severity\":\"warning\"},{\"propertyId\":\"a\",\"propertyName\":\"oaeupfhyhltrpmo\",\"currentValue\":\"jmcmatuokthfu\",\"severity\":\"warning\"},{\"propertyId\":\"aodsfcpkv\",\"propertyName\":\"odpuozmyzydag\",\"currentValue\":\"uaxbezyiuokkt\",\"severity\":\"none\"}]},{\"propertyId\":\"rdxwzywqsm\",\"propertyName\":\"surex\",\"currentValue\":\"moryocfsfksym\",\"previousValue\":\"ys\",\"severity\":\"none\",\"statusMessage\":\"iuxhqyudxorr\",\"subProperties\":[{\"propertyId\":\"poczvyifqrvkdvjs\",\"propertyName\":\"lrmv\",\"currentValue\":\"d\",\"severity\":\"none\"}]},{\"propertyId\":\"atkpnp\",\"propertyName\":\"lexxbczwtru\",\"currentValue\":\"iqzbq\",\"previousValue\":\"sovmyokacspkwl\",\"severity\":\"none\",\"statusMessage\":\"obpxjmflbvvn\",\"subProperties\":[{\"propertyId\":\"kcciwwzjuqkhr\",\"propertyName\":\"ajiwkuo\",\"currentValue\":\"oskg\",\"severity\":\"information\"},{\"propertyId\":\"auu\",\"propertyName\":\"mjmvxieduugidyjr\",\"currentValue\":\"f\",\"severity\":\"alert\"},{\"propertyId\":\"aos\",\"propertyName\":\"e\",\"currentValue\":\"csonpclhoco\",\"severity\":\"information\"}]}]}],\"overallStatusMessage\":\"lkevle\"}") .toObject(ReservationBillingUsageReportInner.class); - Assertions.assertEquals("ln", model.timestamp()); - Assertions.assertEquals("lefgugnxk", model.billingUsageProperties().get(0).propertyId()); - Assertions.assertEquals("xdqmidtthzrvqdra", model.billingUsageProperties().get(0).propertyName()); - Assertions.assertEquals("hjybigehoqfbo", model.billingUsageProperties().get(0).currentValue()); - Assertions.assertEquals("kanyktzlcuiywg", model.billingUsageProperties().get(0).previousValue()); + Assertions.assertEquals("ghmewuam", model.timestamp()); + Assertions.assertEquals("hrzayvvtpgvdf", model.billingUsageProperties().get(0).propertyId()); + Assertions.assertEquals("iotkftutqxl", model.billingUsageProperties().get(0).propertyName()); + Assertions.assertEquals("gxlefgugnxkrxd", model.billingUsageProperties().get(0).currentValue()); + Assertions.assertEquals("i", model.billingUsageProperties().get(0).previousValue()); Assertions.assertEquals(UsageSeverity.INFORMATION, model.billingUsageProperties().get(0).severity()); - Assertions.assertEquals("gndrvynh", model.billingUsageProperties().get(0).statusMessage()); - Assertions.assertEquals("phrcgyncoc", + Assertions.assertEquals("hzrvqd", model.billingUsageProperties().get(0).statusMessage()); + Assertions.assertEquals("hjybigehoqfbo", model.billingUsageProperties().get(0).subProperties().get(0).propertyId()); - Assertions.assertEquals("ecfvmm", model.billingUsageProperties().get(0).subProperties().get(0).propertyName()); - Assertions.assertEquals("oo", model.billingUsageProperties().get(0).subProperties().get(0).currentValue()); - Assertions.assertEquals("xlzevgbmqjqabcy", + Assertions.assertEquals("skanyk", model.billingUsageProperties().get(0).subProperties().get(0).propertyName()); + Assertions.assertEquals("zlcuiywgqywgndrv", + model.billingUsageProperties().get(0).subProperties().get(0).currentValue()); + Assertions.assertEquals("hzgpphrcgyncocpe", model.billingUsageProperties().get(0).subProperties().get(0).previousValue()); - Assertions.assertEquals(UsageSeverity.WARNING, + Assertions.assertEquals(UsageSeverity.ALERT, model.billingUsageProperties().get(0).subProperties().get(0).severity()); - Assertions.assertEquals("vkwlzuvccfwnf", - model.billingUsageProperties().get(0).subProperties().get(0).statusMessage()); - Assertions.assertEquals("cfionl", + Assertions.assertEquals("m", model.billingUsageProperties().get(0).subProperties().get(0).statusMessage()); + Assertions.assertEquals("ofsx", model.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).propertyId()); - Assertions.assertEquals("bxetqgtzxdpn", + Assertions.assertEquals("zevgb", model.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).propertyName()); - Assertions.assertEquals("bqqwxrj", + Assertions.assertEquals("qjqabcypmivkwl", model.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).currentValue()); - Assertions.assertEquals(UsageSeverity.NONE, + Assertions.assertEquals(UsageSeverity.ALERT, model.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).severity()); - Assertions.assertEquals("civfsnkymuctq", model.overallStatusMessage()); + Assertions.assertEquals("lkevle", model.overallStatusMessage()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingReportWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingReportWithResponseMockTests.java index 5f28237c3aed..2ec8e66da162 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingReportWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingReportWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ReservationsGetBillingReportWithResponseMockTests { @Test public void testGetBillingReportWithResponse() throws Exception { String responseStr - = "{\"timestamp\":\"jslb\",\"billingUsageProperties\":[{\"propertyId\":\"kojgcyzts\",\"propertyName\":\"mznbaeqphch\",\"currentValue\":\"nrnrp\",\"previousValue\":\"huwrykqgaifm\",\"severity\":\"warning\",\"statusMessage\":\"lb\",\"subProperties\":[{\"propertyId\":\"khbejdznxc\",\"propertyName\":\"dsrhnjiv\",\"currentValue\":\"lvtno\",\"previousValue\":\"fzg\",\"severity\":\"information\",\"statusMessage\":\"dftuljltduce\",\"subProperties\":[{\"propertyId\":\"mczuo\",\"propertyName\":\"ejwcwwqiok\",\"currentValue\":\"ssxmojms\",\"severity\":\"alert\"},{\"propertyId\":\"kjprvk\",\"propertyName\":\"cfzq\",\"currentValue\":\"jyxgtczh\",\"severity\":\"information\"},{\"propertyId\":\"dbsdshm\",\"propertyName\":\"xmaehvbbxu\",\"currentValue\":\"iplt\",\"severity\":\"alert\"},{\"propertyId\":\"htba\",\"propertyName\":\"kgxywr\",\"currentValue\":\"kpyklyhp\",\"severity\":\"information\"}]},{\"propertyId\":\"odpvruudlgzib\",\"propertyName\":\"hostgktstvdxecl\",\"currentValue\":\"edqbc\",\"previousValue\":\"zlhp\",\"severity\":\"warning\",\"statusMessage\":\"qkdlw\",\"subProperties\":[{\"propertyId\":\"bum\",\"propertyName\":\"kxtrq\",\"currentValue\":\"fsmlmbtxhwgfw\",\"severity\":\"warning\"},{\"propertyId\":\"tawc\",\"propertyName\":\"ezbrhubskh\",\"currentValue\":\"dyg\",\"severity\":\"alert\"}]},{\"propertyId\":\"okkqfqjbvleo\",\"propertyName\":\"fmluiqtqzfavyvn\",\"currentValue\":\"qybaryeua\",\"previousValue\":\"kq\",\"severity\":\"none\",\"statusMessage\":\"gzslesjcbhernnti\",\"subProperties\":[{\"propertyId\":\"jcvb\",\"propertyName\":\"uwrbehwagoh\",\"currentValue\":\"uffkmrqemvvh\",\"severity\":\"alert\"}]}]},{\"propertyId\":\"tdrjfutacoebj\",\"propertyName\":\"ewzcjznmwcp\",\"currentValue\":\"guaadraufactkahz\",\"previousValue\":\"ajjziuxxpshne\",\"severity\":\"information\",\"statusMessage\":\"lfg\",\"subProperties\":[{\"propertyId\":\"ubkwdle\",\"propertyName\":\"rds\",\"currentValue\":\"tujbazpju\",\"previousValue\":\"minyflnorwm\",\"severity\":\"warning\",\"statusMessage\":\"wpklvxw\",\"subProperties\":[{\"propertyId\":\"dxpgpqchiszepnnb\",\"propertyName\":\"crxgibb\",\"currentValue\":\"axconfozauo\",\"severity\":\"warning\"},{\"propertyId\":\"ukokwbqplhlvn\",\"propertyName\":\"uepzl\",\"currentValue\":\"phwzsoldweyuqdu\",\"severity\":\"information\"}]},{\"propertyId\":\"mnnrwr\",\"propertyName\":\"i\",\"currentValue\":\"rk\",\"previousValue\":\"lywjhh\",\"severity\":\"information\",\"statusMessage\":\"hxmsivfo\",\"subProperties\":[{\"propertyId\":\"ox\",\"propertyName\":\"gdufiqnd\",\"currentValue\":\"euzaof\",\"severity\":\"warning\"},{\"propertyId\":\"hvcyyysfg\",\"propertyName\":\"otcubi\",\"currentValue\":\"p\",\"severity\":\"none\"},{\"propertyId\":\"pwoqo\",\"propertyName\":\"macjekn\",\"currentValue\":\"zshq\",\"severity\":\"information\"}]}]},{\"propertyId\":\"impevf\",\"propertyName\":\"mblrrilbywd\",\"currentValue\":\"smiccwrwfscj\",\"previousValue\":\"ynszquji\",\"severity\":\"information\",\"statusMessage\":\"oqytibyowbblgy\",\"subProperties\":[{\"propertyId\":\"tp\",\"propertyName\":\"hjoxo\",\"currentValue\":\"smsks\",\"previousValue\":\"iml\",\"severity\":\"information\",\"statusMessage\":\"jxkcgxxlxsff\",\"subProperties\":[{\"propertyId\":\"izqzdwlvwlyou\",\"propertyName\":\"fgfb\",\"currentValue\":\"jub\",\"severity\":\"alert\"},{\"propertyId\":\"hgkfmin\",\"propertyName\":\"g\",\"currentValue\":\"wzf\",\"severity\":\"warning\"}]}]},{\"propertyId\":\"sttktlahbqa\",\"propertyName\":\"tx\",\"currentValue\":\"gzukxitmm\",\"previousValue\":\"gqqqxh\",\"severity\":\"alert\",\"statusMessage\":\"rxcpjuisavo\",\"subProperties\":[{\"propertyId\":\"zfvazi\",\"propertyName\":\"jlfrq\",\"currentValue\":\"tbajlkatn\",\"previousValue\":\"yiopi\",\"severity\":\"information\",\"statusMessage\":\"qfkuvscxkdmli\",\"subProperties\":[{\"propertyId\":\"ibrxkp\",\"propertyName\":\"loazuruocbgoo\",\"currentValue\":\"bteoybf\",\"severity\":\"information\"},{\"propertyId\":\"xakvvjgslor\",\"propertyName\":\"il\",\"currentValue\":\"yw\",\"severity\":\"alert\"},{\"propertyId\":\"kgkxn\",\"propertyName\":\"edabgyvudtjue\",\"currentValue\":\"bcihxuuwhc\",\"severity\":\"information\"},{\"propertyId\":\"xccybvpa\",\"propertyName\":\"akkud\",\"currentValue\":\"px\",\"severity\":\"information\"}]}]}],\"overallStatusMessage\":\"jplmagstcy\"}"; + = "{\"timestamp\":\"v\",\"billingUsageProperties\":[{\"propertyId\":\"qxeysko\",\"propertyName\":\"qzinkfkbg\",\"currentValue\":\"z\",\"previousValue\":\"wxeqocljmygvkzqk\",\"severity\":\"none\",\"statusMessage\":\"okbzef\",\"subProperties\":[{\"propertyId\":\"xcczurtl\",\"propertyName\":\"ipqxbkwvzgnzv\",\"currentValue\":\"fbzdixzmqpnoda\",\"previousValue\":\"pqhe\",\"severity\":\"warning\",\"statusMessage\":\"tmcg\",\"subProperties\":[{\"propertyId\":\"stzelndlatut\",\"propertyName\":\"zlbiojlvfhrbbpn\",\"currentValue\":\"qvcww\",\"severity\":\"none\"},{\"propertyId\":\"urmochpprprs\",\"propertyName\":\"mo\",\"currentValue\":\"ayzejnhlbkpbz\",\"severity\":\"information\"},{\"propertyId\":\"piljhahzvech\",\"propertyName\":\"dbn\",\"currentValue\":\"ieholewjwi\",\"severity\":\"information\"}]}]},{\"propertyId\":\"bwefqsfapaqtfer\",\"propertyName\":\"q\",\"currentValue\":\"ex\",\"previousValue\":\"mfxapjwogqqno\",\"severity\":\"alert\",\"statusMessage\":\"dcdab\",\"subProperties\":[{\"propertyId\":\"pwyawbz\",\"propertyName\":\"sqbuc\",\"currentValue\":\"jg\",\"previousValue\":\"exaoguya\",\"severity\":\"alert\",\"statusMessage\":\"dsdaultxijjumf\",\"subProperties\":[{\"propertyId\":\"z\",\"propertyName\":\"nqnm\",\"currentValue\":\"jng\",\"severity\":\"alert\"},{\"propertyId\":\"dqxtbjwgnyf\",\"propertyName\":\"sf\",\"currentValue\":\"svtui\",\"severity\":\"alert\"},{\"propertyId\":\"hajqglcfh\",\"propertyName\":\"l\",\"currentValue\":\"qryxyn\",\"severity\":\"warning\"},{\"propertyId\":\"zrdpsovwxznptgoe\",\"propertyName\":\"ybbabpfhvfsl\",\"currentValue\":\"vntjlrigjk\",\"severity\":\"warning\"}]},{\"propertyId\":\"yrio\",\"propertyName\":\"vzidsxwaab\",\"currentValue\":\"mifrygznmma\",\"previousValue\":\"izkzobgo\",\"severity\":\"information\",\"statusMessage\":\"hsln\",\"subProperties\":[{\"propertyId\":\"ieixynllxe\",\"propertyName\":\"wcrojphslhcaw\",\"currentValue\":\"u\",\"severity\":\"alert\"},{\"propertyId\":\"fdwfmvigorqj\",\"propertyName\":\"ttzhra\",\"currentValue\":\"lkafhonqjuje\",\"severity\":\"none\"},{\"propertyId\":\"kpzvcpopmxelnwc\",\"propertyName\":\"tyjedex\",\"currentValue\":\"mlfmkqs\",\"severity\":\"information\"}]}]},{\"propertyId\":\"zuawxtzxpuamwa\",\"propertyName\":\"zxrvxcus\",\"currentValue\":\"sphaivmxyasflvg\",\"previousValue\":\"zwywako\",\"severity\":\"information\",\"statusMessage\":\"nsmjbl\",\"subProperties\":[{\"propertyId\":\"hlnymzotq\",\"propertyName\":\"ryuzcbmqqv\",\"currentValue\":\"mv\",\"previousValue\":\"gtayxonsupeujlz\",\"severity\":\"alert\",\"statusMessage\":\"cvsql\",\"subProperties\":[{\"propertyId\":\"oibgsxg\",\"propertyName\":\"xfyqonmpqoxwdo\",\"currentValue\":\"dbxiqx\",\"severity\":\"information\"},{\"propertyId\":\"iqbi\",\"propertyName\":\"htmwwinh\",\"currentValue\":\"hfqpofv\",\"severity\":\"information\"}]},{\"propertyId\":\"cblembnkbwv\",\"propertyName\":\"vxkdivqihebwtswb\",\"currentValue\":\"uwfmduragegizvc\",\"previousValue\":\"elisdjub\",\"severity\":\"alert\",\"statusMessage\":\"qigkx\",\"subProperties\":[{\"propertyId\":\"azgakg\",\"propertyName\":\"cyrcmjdmspo\",\"currentValue\":\"apvu\",\"severity\":\"warning\"},{\"propertyId\":\"ylnio\",\"propertyName\":\"rz\",\"currentValue\":\"bzjedmstk\",\"severity\":\"warning\"},{\"propertyId\":\"l\",\"propertyName\":\"xbcuiiznkt\",\"currentValue\":\"f\",\"severity\":\"information\"},{\"propertyId\":\"snvpdibmi\",\"propertyName\":\"ostbzbkiwb\",\"currentValue\":\"qnyophzfyls\",\"severity\":\"warning\"}]},{\"propertyId\":\"rpfbcunezz\",\"propertyName\":\"e\",\"currentValue\":\"elfwy\",\"previousValue\":\"lwxjwetn\",\"severity\":\"none\",\"statusMessage\":\"hclafzvaylptrs\",\"subProperties\":[{\"propertyId\":\"ztcmwq\",\"propertyName\":\"chcxwaxfewzj\",\"currentValue\":\"jexfdeqvhp\",\"severity\":\"none\"},{\"propertyId\":\"lkkshkbffmbmx\",\"propertyName\":\"jrgywwpgjxsn\",\"currentValue\":\"tf\",\"severity\":\"information\"},{\"propertyId\":\"gicgaaoepttaq\",\"propertyName\":\"tdewemxswvruu\",\"currentValue\":\"zzjgehkfki\",\"severity\":\"information\"}]},{\"propertyId\":\"tixo\",\"propertyName\":\"ffqyinlj\",\"currentValue\":\"epqw\",\"previousValue\":\"xmonstshi\",\"severity\":\"none\",\"statusMessage\":\"velfcldu\",\"subProperties\":[{\"propertyId\":\"irdsvuwcob\",\"propertyName\":\"egstmninwjizci\",\"currentValue\":\"nghgshej\",\"severity\":\"warning\"},{\"propertyId\":\"bxqmu\",\"propertyName\":\"uxlxqzvners\",\"currentValue\":\"ycucrwnamikzeb\",\"severity\":\"information\"},{\"propertyId\":\"bsmswziqgf\",\"propertyName\":\"hokzrusw\",\"currentValue\":\"vhczznvfby\",\"severity\":\"information\"},{\"propertyId\":\"sxjwwixz\",\"propertyName\":\"umwmxqhnd\",\"currentValue\":\"noamldsehaohdj\",\"severity\":\"warning\"}]}]}],\"overallStatusMessage\":\"flzokxco\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,35 +32,36 @@ public void testGetBillingReportWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ReservationBillingUsageReport response = manager.reservations() - .getBillingReportWithResponse("cvlhv", "gdyftumrtwna", com.azure.core.util.Context.NONE) + .getBillingReportWithResponse("cohdx", "zlmcmuapcvhdb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jslb", response.timestamp()); - Assertions.assertEquals("kojgcyzts", response.billingUsageProperties().get(0).propertyId()); - Assertions.assertEquals("mznbaeqphch", response.billingUsageProperties().get(0).propertyName()); - Assertions.assertEquals("nrnrp", response.billingUsageProperties().get(0).currentValue()); - Assertions.assertEquals("huwrykqgaifm", response.billingUsageProperties().get(0).previousValue()); - Assertions.assertEquals(UsageSeverity.WARNING, response.billingUsageProperties().get(0).severity()); - Assertions.assertEquals("lb", response.billingUsageProperties().get(0).statusMessage()); - Assertions.assertEquals("khbejdznxc", + Assertions.assertEquals("v", response.timestamp()); + Assertions.assertEquals("qxeysko", response.billingUsageProperties().get(0).propertyId()); + Assertions.assertEquals("qzinkfkbg", response.billingUsageProperties().get(0).propertyName()); + Assertions.assertEquals("z", response.billingUsageProperties().get(0).currentValue()); + Assertions.assertEquals("wxeqocljmygvkzqk", response.billingUsageProperties().get(0).previousValue()); + Assertions.assertEquals(UsageSeverity.NONE, response.billingUsageProperties().get(0).severity()); + Assertions.assertEquals("okbzef", response.billingUsageProperties().get(0).statusMessage()); + Assertions.assertEquals("xcczurtl", response.billingUsageProperties().get(0).subProperties().get(0).propertyId()); - Assertions.assertEquals("dsrhnjiv", + Assertions.assertEquals("ipqxbkwvzgnzv", response.billingUsageProperties().get(0).subProperties().get(0).propertyName()); - Assertions.assertEquals("lvtno", + Assertions.assertEquals("fbzdixzmqpnoda", response.billingUsageProperties().get(0).subProperties().get(0).currentValue()); - Assertions.assertEquals("fzg", response.billingUsageProperties().get(0).subProperties().get(0).previousValue()); - Assertions.assertEquals(UsageSeverity.INFORMATION, + Assertions.assertEquals("pqhe", + response.billingUsageProperties().get(0).subProperties().get(0).previousValue()); + Assertions.assertEquals(UsageSeverity.WARNING, response.billingUsageProperties().get(0).subProperties().get(0).severity()); - Assertions.assertEquals("dftuljltduce", + Assertions.assertEquals("tmcg", response.billingUsageProperties().get(0).subProperties().get(0).statusMessage()); - Assertions.assertEquals("mczuo", + Assertions.assertEquals("stzelndlatut", response.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).propertyId()); - Assertions.assertEquals("ejwcwwqiok", + Assertions.assertEquals("zlbiojlvfhrbbpn", response.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).propertyName()); - Assertions.assertEquals("ssxmojms", + Assertions.assertEquals("qvcww", response.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).currentValue()); - Assertions.assertEquals(UsageSeverity.ALERT, + Assertions.assertEquals(UsageSeverity.NONE, response.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).severity()); - Assertions.assertEquals("jplmagstcy", response.overallStatusMessage()); + Assertions.assertEquals("flzokxco", response.overallStatusMessage()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingStatusWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingStatusWithResponseMockTests.java index f9b09f135470..8f28b2e2af39 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingStatusWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetBillingStatusWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ReservationsGetBillingStatusWithResponseMockTests { @Test public void testGetBillingStatusWithResponse() throws Exception { String responseStr - = "{\"timestamp\":\"fqntcyp\",\"totalUsedCapacityReported\":2635944081266702122,\"lowDrrPoolCount\":426307955,\"drrWeightedAverage\":95.23347855459366,\"totalNonReducibleReported\":4546309057929935505,\"extraUsedCapacityNonReducible\":6047137828551232297,\"extraUsedCapacityLowUsageRounding\":8042667527966501304,\"extraUsedCapacityNonReduciblePlanDiscount\":159225456433786941,\"totalUsedCapacityBilled\":7739182003359751945,\"totalUsedCapacityIncludedPlan\":1648418859978390426,\"totalUsedCapacityOverage\":8402050671930646038,\"totalPerformanceReported\":5029301967777206897,\"totalPerformanceIncludedPlan\":4440382960214117779,\"totalPerformanceOverage\":4987210128841466857}"; + = "{\"timestamp\":\"qwthmky\",\"totalUsedCapacityReported\":6308050303389285350,\"lowDrrPoolCount\":669264341,\"drrWeightedAverage\":82.00838158982012,\"totalNonReducibleReported\":4999567940157518830,\"extraUsedCapacityNonReducible\":5547419004345930777,\"extraUsedCapacityLowUsageRounding\":2251416135088020925,\"extraUsedCapacityNonReduciblePlanDiscount\":6639397482383698267,\"totalUsedCapacityBilled\":8114283161752734168,\"totalUsedCapacityIncludedPlan\":8229457154745715233,\"totalUsedCapacityOverage\":4553721559996277354,\"totalPerformanceReported\":5468502244343964133,\"totalPerformanceIncludedPlan\":2499995130164336659,\"totalPerformanceOverage\":959554963448832293}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,22 +31,22 @@ public void testGetBillingStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ReservationBillingStatus response = manager.reservations() - .getBillingStatusWithResponse("uutpwoqhih", "jqgwzp", com.azure.core.util.Context.NONE) + .getBillingStatusWithResponse("jltfvnzcyjtotpv", "pvpbdbzqgqqiheds", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fqntcyp", response.timestamp()); - Assertions.assertEquals(2635944081266702122L, response.totalUsedCapacityReported()); - Assertions.assertEquals(426307955, response.lowDrrPoolCount()); - Assertions.assertEquals(95.23347855459366, response.drrWeightedAverage()); - Assertions.assertEquals(4546309057929935505L, response.totalNonReducibleReported()); - Assertions.assertEquals(6047137828551232297L, response.extraUsedCapacityNonReducible()); - Assertions.assertEquals(8042667527966501304L, response.extraUsedCapacityLowUsageRounding()); - Assertions.assertEquals(159225456433786941L, response.extraUsedCapacityNonReduciblePlanDiscount()); - Assertions.assertEquals(7739182003359751945L, response.totalUsedCapacityBilled()); - Assertions.assertEquals(1648418859978390426L, response.totalUsedCapacityIncludedPlan()); - Assertions.assertEquals(8402050671930646038L, response.totalUsedCapacityOverage()); - Assertions.assertEquals(5029301967777206897L, response.totalPerformanceReported()); - Assertions.assertEquals(4440382960214117779L, response.totalPerformanceIncludedPlan()); - Assertions.assertEquals(4987210128841466857L, response.totalPerformanceOverage()); + Assertions.assertEquals("qwthmky", response.timestamp()); + Assertions.assertEquals(6308050303389285350L, response.totalUsedCapacityReported()); + Assertions.assertEquals(669264341, response.lowDrrPoolCount()); + Assertions.assertEquals(82.00838158982012, response.drrWeightedAverage()); + Assertions.assertEquals(4999567940157518830L, response.totalNonReducibleReported()); + Assertions.assertEquals(5547419004345930777L, response.extraUsedCapacityNonReducible()); + Assertions.assertEquals(2251416135088020925L, response.extraUsedCapacityLowUsageRounding()); + Assertions.assertEquals(6639397482383698267L, response.extraUsedCapacityNonReduciblePlanDiscount()); + Assertions.assertEquals(8114283161752734168L, response.totalUsedCapacityBilled()); + Assertions.assertEquals(8229457154745715233L, response.totalUsedCapacityIncludedPlan()); + Assertions.assertEquals(4553721559996277354L, response.totalUsedCapacityOverage()); + Assertions.assertEquals(5468502244343964133L, response.totalPerformanceReported()); + Assertions.assertEquals(2499995130164336659L, response.totalPerformanceIncludedPlan()); + Assertions.assertEquals(959554963448832293L, response.totalPerformanceOverage()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetResourceLimitsWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetResourceLimitsWithResponseMockTests.java index 113042be713c..12525bb0a93d 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetResourceLimitsWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsGetResourceLimitsWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class ReservationsGetResourceLimitsWithResponseMockTests { @Test public void testGetResourceLimitsWithResponse() throws Exception { String responseStr - = "{\"storagePool\":{\"provisionedBandwidthMbPerSec\":{\"min\":4427086989076318317,\"max\":6563841329201288310},\"provisionedIops\":{\"min\":8680246364842604153,\"max\":6851254807622539389},\"physicalAvailabilityZones\":[\"uzvx\",\"risjnhnytxifqjz\"]},\"volume\":{\"provisionedSize\":{\"min\":5028173088217913035,\"max\":6352328391564368443}},\"protectionPolicy\":{\"frequency\":{\"min\":4223928428315416005,\"max\":1575354894603985523},\"retention\":{\"min\":8129609655822520955,\"max\":7038720826135192724}},\"performancePolicy\":{\"iopsLimit\":{\"min\":3311635224555992257,\"max\":411296746406972015},\"bandwidthLimit\":{\"min\":7560632422312520218,\"max\":7666921470080196819}}}"; + = "{\"storagePool\":{\"provisionedBandwidthMbPerSec\":{\"min\":2365586815203072426,\"max\":1948425303402168643},\"provisionedIops\":{\"min\":6619495551064675423,\"max\":430611531006551205},\"physicalAvailabilityZones\":[\"hcmavmqfo\",\"dorhcgyyp\",\"otwypundmb\",\"hu\"]},\"volume\":{\"provisionedSize\":{\"min\":8589702615494300352,\"max\":4750372007133576018}},\"protectionPolicy\":{\"frequency\":{\"min\":3926398393677310169,\"max\":4873893799855836819},\"retention\":{\"min\":2120941596738305720,\"max\":9008399369327070874}},\"performancePolicy\":{\"iopsLimit\":{\"min\":5240370773268035766,\"max\":4877945582792424779},\"bandwidthLimit\":{\"min\":4888727306375927406,\"max\":6456868865327358658}}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,23 +31,23 @@ public void testGetResourceLimitsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); LimitDetails response = manager.reservations() - .getResourceLimitsWithResponse("qjlihhyuspska", "dvlmfwdgzxul", com.azure.core.util.Context.NONE) + .getResourceLimitsWithResponse("iitdfuxt", "asiibmiybnnust", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(4427086989076318317L, response.storagePool().provisionedBandwidthMbPerSec().min()); - Assertions.assertEquals(6563841329201288310L, response.storagePool().provisionedBandwidthMbPerSec().max()); - Assertions.assertEquals(8680246364842604153L, response.storagePool().provisionedIops().min()); - Assertions.assertEquals(6851254807622539389L, response.storagePool().provisionedIops().max()); - Assertions.assertEquals("uzvx", response.storagePool().physicalAvailabilityZones().get(0)); - Assertions.assertEquals(5028173088217913035L, response.volume().provisionedSize().min()); - Assertions.assertEquals(6352328391564368443L, response.volume().provisionedSize().max()); - Assertions.assertEquals(4223928428315416005L, response.protectionPolicy().frequency().min()); - Assertions.assertEquals(1575354894603985523L, response.protectionPolicy().frequency().max()); - Assertions.assertEquals(8129609655822520955L, response.protectionPolicy().retention().min()); - Assertions.assertEquals(7038720826135192724L, response.protectionPolicy().retention().max()); - Assertions.assertEquals(3311635224555992257L, response.performancePolicy().iopsLimit().min()); - Assertions.assertEquals(411296746406972015L, response.performancePolicy().iopsLimit().max()); - Assertions.assertEquals(7560632422312520218L, response.performancePolicy().bandwidthLimit().min()); - Assertions.assertEquals(7666921470080196819L, response.performancePolicy().bandwidthLimit().max()); + Assertions.assertEquals(2365586815203072426L, response.storagePool().provisionedBandwidthMbPerSec().min()); + Assertions.assertEquals(1948425303402168643L, response.storagePool().provisionedBandwidthMbPerSec().max()); + Assertions.assertEquals(6619495551064675423L, response.storagePool().provisionedIops().min()); + Assertions.assertEquals(430611531006551205L, response.storagePool().provisionedIops().max()); + Assertions.assertEquals("hcmavmqfo", response.storagePool().physicalAvailabilityZones().get(0)); + Assertions.assertEquals(8589702615494300352L, response.volume().provisionedSize().min()); + Assertions.assertEquals(4750372007133576018L, response.volume().provisionedSize().max()); + Assertions.assertEquals(3926398393677310169L, response.protectionPolicy().frequency().min()); + Assertions.assertEquals(4873893799855836819L, response.protectionPolicy().frequency().max()); + Assertions.assertEquals(2120941596738305720L, response.protectionPolicy().retention().min()); + Assertions.assertEquals(9008399369327070874L, response.protectionPolicy().retention().max()); + Assertions.assertEquals(5240370773268035766L, response.performancePolicy().iopsLimit().min()); + Assertions.assertEquals(4877945582792424779L, response.performancePolicy().iopsLimit().max()); + Assertions.assertEquals(4888727306375927406L, response.performancePolicy().bandwidthLimit().min()); + Assertions.assertEquals(6456868865327358658L, response.performancePolicy().bandwidthLimit().max()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLatestLinkedSaaSWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLatestLinkedSaaSWithResponseMockTests.java new file mode 100644 index 000000000000..e24624fea7af --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsLatestLinkedSaaSWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.LatestLinkedSaaSResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ReservationsLatestLinkedSaaSWithResponseMockTests { + @Test + public void testLatestLinkedSaaSWithResponse() throws Exception { + String responseStr = "{\"saaSResourceId\":\"nxaulk\",\"isHiddenSaaS\":false}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + LatestLinkedSaaSResponse response = manager.reservations() + .latestLinkedSaaSWithResponse("y", "qunjqh", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("nxaulk", response.saaSResourceId()); + Assertions.assertFalse(response.isHiddenSaaS()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SaaSOperationGroupsActivateResourceMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SaaSOperationGroupsActivateResourceMockTests.java new file mode 100644 index 000000000000..422a03cb9845 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SaaSOperationGroupsActivateResourceMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.ActivateSaaSRequest; +import com.azure.resourcemanager.purestorageblock.models.SaaSResourceDetailsResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SaaSOperationGroupsActivateResourceMockTests { + @Test + public void testActivateResource() throws Exception { + String responseStr + = "{\"saasId\":\"xhzzyse\",\"id\":\"sxivzrrryvei\",\"name\":\"ipsk\",\"type\":\"yzatvfuzkaft\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + SaaSResourceDetailsResponse response = manager.saaSOperationGroups() + .activateResource(new ActivateSaaSRequest().withSaasGuid("qyv").withPublisherId("hta"), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("xhzzyse", response.saasId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SaaSResourceDetailsResponseInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SaaSResourceDetailsResponseInnerTests.java new file mode 100644 index 000000000000..2ca6342acd1e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SaaSResourceDetailsResponseInnerTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.SaaSResourceDetailsResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class SaaSResourceDetailsResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SaaSResourceDetailsResponseInner model = BinaryData + .fromString("{\"saasId\":\"wwnpj\",\"id\":\"fz\",\"name\":\"wpchwahf\",\"type\":\"ousnfepgfewe\"}") + .toObject(SaaSResourceDetailsResponseInner.class); + Assertions.assertEquals("wwnpj", model.saasId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ServiceInitializationHandleTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ServiceInitializationHandleTests.java index c0f4a0a5f566..9ac505e39dd3 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ServiceInitializationHandleTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ServiceInitializationHandleTests.java @@ -11,10 +11,10 @@ public final class ServiceInitializationHandleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceInitializationHandle model - = BinaryData.fromString("{\"sddcResourceId\":\"qlcvydy\",\"serviceAccountUsername\":\"tdooaoj\"}") - .toObject(ServiceInitializationHandle.class); - Assertions.assertEquals("qlcvydy", model.clusterResourceId()); - Assertions.assertEquals("tdooaoj", model.serviceAccountUsername()); + ServiceInitializationHandle model = BinaryData + .fromString("{\"sddcResourceId\":\"vfdnwnwmewzsyyce\",\"serviceAccountUsername\":\"soibjudpfrx\"}") + .toObject(ServiceInitializationHandle.class); + Assertions.assertEquals("vfdnwnwmewzsyyce", model.clusterResourceId()); + Assertions.assertEquals("soibjudpfrx", model.serviceAccountUsername()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SoftDeletionTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SoftDeletionTests.java index ea1e2b5a049f..3f35dbca8dfb 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SoftDeletionTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SoftDeletionTests.java @@ -11,7 +11,7 @@ public final class SoftDeletionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SoftDeletion model = BinaryData.fromString("{\"destroyed\":true,\"eradicationTimestamp\":\"sfraoyzko\"}") + SoftDeletion model = BinaryData.fromString("{\"destroyed\":true,\"eradicationTimestamp\":\"lwntoego\"}") .toObject(SoftDeletion.class); Assertions.assertTrue(model.destroyed()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SpaceTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SpaceTests.java index 6a72030b0d38..53f71974e79f 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SpaceTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SpaceTests.java @@ -12,11 +12,11 @@ public final class SpaceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Space model = BinaryData.fromString( - "{\"totalUsed\":6890446013965356970,\"unique\":5279167733168748347,\"snapshots\":7872879762734325914,\"shared\":6613981438658559852}") + "{\"totalUsed\":2758860525004415394,\"unique\":6938259574609186760,\"snapshots\":8831902609339042569,\"shared\":4566065121206336323}") .toObject(Space.class); - Assertions.assertEquals(6890446013965356970L, model.totalUsed()); - Assertions.assertEquals(5279167733168748347L, model.unique()); - Assertions.assertEquals(7872879762734325914L, model.snapshots()); - Assertions.assertEquals(6613981438658559852L, model.shared()); + Assertions.assertEquals(2758860525004415394L, model.totalUsed()); + Assertions.assertEquals(6938259574609186760L, model.unique()); + Assertions.assertEquals(8831902609339042569L, model.snapshots()); + Assertions.assertEquals(4566065121206336323L, model.shared()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SshPlatformConsoleAuthResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SshPlatformConsoleAuthResultTests.java new file mode 100644 index 000000000000..8b482828820f --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/SshPlatformConsoleAuthResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleRole; +import com.azure.resourcemanager.purestorageblock.models.SshPlatformConsoleAuthResult; +import org.junit.jupiter.api.Assertions; + +public final class SshPlatformConsoleAuthResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SshPlatformConsoleAuthResult model + = BinaryData.fromString("{\"authType\":\"ssh\",\"username\":\"akggkfpag\",\"role\":\"array_admin\"}") + .toObject(SshPlatformConsoleAuthResult.class); + Assertions.assertEquals("akggkfpag", model.username()); + Assertions.assertEquals(PlatformConsoleRole.ARRAY_ADMIN, model.role()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolEnableAvsConnectionPostTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolEnableAvsConnectionPostTests.java index 65acab8c4382..ec3c32afecde 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolEnableAvsConnectionPostTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolEnableAvsConnectionPostTests.java @@ -11,15 +11,16 @@ public final class StoragePoolEnableAvsConnectionPostTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StoragePoolEnableAvsConnectionPost model - = BinaryData.fromString("{\"sddcResourceId\":\"wj\"}").toObject(StoragePoolEnableAvsConnectionPost.class); - Assertions.assertEquals("wj", model.clusterResourceId()); + StoragePoolEnableAvsConnectionPost model = BinaryData.fromString("{\"sddcResourceId\":\"tiirqtdqoa\"}") + .toObject(StoragePoolEnableAvsConnectionPost.class); + Assertions.assertEquals("tiirqtdqoa", model.clusterResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StoragePoolEnableAvsConnectionPost model = new StoragePoolEnableAvsConnectionPost().withClusterResourceId("wj"); + StoragePoolEnableAvsConnectionPost model + = new StoragePoolEnableAvsConnectionPost().withClusterResourceId("tiirqtdqoa"); model = BinaryData.fromObject(model).toObject(StoragePoolEnableAvsConnectionPost.class); - Assertions.assertEquals("wj", model.clusterResourceId()); + Assertions.assertEquals("tiirqtdqoa", model.clusterResourceId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolHealthInfoInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolHealthInfoInnerTests.java index 83618225df1a..f73cbc41570b 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolHealthInfoInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolHealthInfoInnerTests.java @@ -13,22 +13,22 @@ public final class StoragePoolHealthInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StoragePoolHealthInfoInner model = BinaryData.fromString( - "{\"health\":{\"usedCapacityPercentage\":35.81887419990952,\"bandwidthUsage\":{\"current\":140341677696577800,\"provisioned\":5313229010418378323,\"max\":1731792145789040801},\"iopsUsage\":{\"current\":4071195826596998153,\"provisioned\":2507936832402771228,\"max\":3778047541183075264},\"space\":{\"totalUsed\":3270121833645921057,\"unique\":3973281254631070018,\"snapshots\":8890235474847299570,\"shared\":4683978347036523050},\"dataReductionRatio\":1.4486555360253672,\"estimatedMaxCapacity\":1882078303153240506},\"alerts\":[{\"level\":\"error\",\"message\":\"q\"},{\"level\":\"info\",\"message\":\"dfnbyxbaaabjyv\"},{\"level\":\"error\",\"message\":\"ffimrzrtuzqogsex\"},{\"level\":\"error\",\"message\":\"vfdnwnwmewzsyyce\"}]}") + "{\"health\":{\"usedCapacityPercentage\":65.45286770248899,\"bandwidthUsage\":{\"current\":2683403328100371700,\"provisioned\":8623333094540637378,\"max\":7064706580171927315},\"iopsUsage\":{\"current\":282081857130974978,\"provisioned\":820247449544562599,\"max\":2223326609364776386},\"space\":{\"totalUsed\":7097635139026517031,\"unique\":8112083907169848140,\"snapshots\":3059787385770886832,\"shared\":832648404577263349},\"dataReductionRatio\":6.958733142803009,\"estimatedMaxCapacity\":254698639474854306},\"alerts\":[{\"level\":\"error\",\"message\":\"ywdmjsjqbjh\"}]}") .toObject(StoragePoolHealthInfoInner.class); - Assertions.assertEquals(35.81887419990952, model.health().usedCapacityPercentage()); - Assertions.assertEquals(140341677696577800L, model.health().bandwidthUsage().current()); - Assertions.assertEquals(5313229010418378323L, model.health().bandwidthUsage().provisioned()); - Assertions.assertEquals(1731792145789040801L, model.health().bandwidthUsage().max()); - Assertions.assertEquals(4071195826596998153L, model.health().iopsUsage().current()); - Assertions.assertEquals(2507936832402771228L, model.health().iopsUsage().provisioned()); - Assertions.assertEquals(3778047541183075264L, model.health().iopsUsage().max()); - Assertions.assertEquals(3270121833645921057L, model.health().space().totalUsed()); - Assertions.assertEquals(3973281254631070018L, model.health().space().unique()); - Assertions.assertEquals(8890235474847299570L, model.health().space().snapshots()); - Assertions.assertEquals(4683978347036523050L, model.health().space().shared()); - Assertions.assertEquals(1.4486555360253672, model.health().dataReductionRatio()); - Assertions.assertEquals(1882078303153240506L, model.health().estimatedMaxCapacity()); + Assertions.assertEquals(65.45286770248899, model.health().usedCapacityPercentage()); + Assertions.assertEquals(2683403328100371700L, model.health().bandwidthUsage().current()); + Assertions.assertEquals(8623333094540637378L, model.health().bandwidthUsage().provisioned()); + Assertions.assertEquals(7064706580171927315L, model.health().bandwidthUsage().max()); + Assertions.assertEquals(282081857130974978L, model.health().iopsUsage().current()); + Assertions.assertEquals(820247449544562599L, model.health().iopsUsage().provisioned()); + Assertions.assertEquals(2223326609364776386L, model.health().iopsUsage().max()); + Assertions.assertEquals(7097635139026517031L, model.health().space().totalUsed()); + Assertions.assertEquals(8112083907169848140L, model.health().space().unique()); + Assertions.assertEquals(3059787385770886832L, model.health().space().snapshots()); + Assertions.assertEquals(832648404577263349L, model.health().space().shared()); + Assertions.assertEquals(6.958733142803009, model.health().dataReductionRatio()); + Assertions.assertEquals(254698639474854306L, model.health().estimatedMaxCapacity()); Assertions.assertEquals(AlertLevel.ERROR, model.alerts().get(0).level()); - Assertions.assertEquals("q", model.alerts().get(0).message()); + Assertions.assertEquals("ywdmjsjqbjh", model.alerts().get(0).message()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolInnerTests.java index 4e7506d3b797..f4b6c379199c 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolInnerTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolInnerTests.java @@ -8,9 +8,13 @@ import com.azure.resourcemanager.purestorageblock.fluent.models.StoragePoolInner; import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentity; import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAccessSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSubnet; import com.azure.resourcemanager.purestorageblock.models.StoragePoolProperties; import com.azure.resourcemanager.purestorageblock.models.UserAssignedIdentity; import com.azure.resourcemanager.purestorageblock.models.VnetInjection; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -19,36 +23,53 @@ public final class StoragePoolInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StoragePoolInner model = BinaryData.fromString( - "{\"properties\":{\"storagePoolInternalId\":\"blmpewww\",\"availabilityZone\":\"bkrvrnsvshqj\",\"vnetInjection\":{\"subnetId\":\"hxcr\",\"vnetId\":\"bfovasrruvwbhsq\"},\"dataRetentionPeriod\":1327647524081799749,\"provisionedBandwidthMbPerSec\":915934839325229453,\"provisionedIops\":4263658870464562119,\"avs\":{\"avsEnabled\":false,\"sddcResourceId\":\"pybsrfbjfdtw\"},\"provisioningState\":\"Failed\",\"reservationResourceId\":\"t\"},\"identity\":{\"principalId\":\"vjz\",\"tenantId\":\"xilzznf\",\"type\":\"None\",\"userAssignedIdentities\":{\"ybn\":{\"principalId\":\"pmqtaru\",\"clientId\":\"jmkcjhwqytj\"}}},\"location\":\"ewgdrjervn\",\"tags\":{\"hin\":\"qp\",\"nzdndslgna\":\"oygmift\"},\"id\":\"qig\",\"name\":\"nduhavhqlkthum\",\"type\":\"qolbgyc\"}") + "{\"properties\":{\"storagePoolInternalId\":\"t\",\"availabilityZone\":\"twwrqp\",\"vnetInjection\":{\"subnetId\":\"edckzywbiexzfey\",\"vnetId\":\"eaxib\"},\"dataRetentionPeriod\":3158755380595328806,\"provisionedBandwidthMbPerSec\":5504260917336517154,\"provisionedIops\":3923542166316348185,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"zyoxaepdkzjan\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"rhdwbavxbniw\",\"platformConsoleSettings\":{\"enabled\":false,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":true},\"cli\":{\"enabled\":false},\"subnets\":[{\"id\":\"xytxhpzxbz\",\"managementIpAddress\":\"zabglcuhxwt\",\"serviceBackendIps\":[\"qik\",\"bbovplwzbhvgyugu\",\"svmkfssxquk\",\"fpl\"]},{\"id\":\"mg\",\"managementIpAddress\":\"nkjzkdeslpvlop\",\"serviceBackendIps\":[\"ighxpk\",\"wzbaiue\"]}],\"defaultUsername\":\"a\"}},\"identity\":{\"principalId\":\"yqupedeojnabckh\",\"tenantId\":\"txp\",\"type\":\"None\",\"userAssignedIdentities\":{\"jdhtldwkyzxu\":{\"principalId\":\"fhvpesaps\",\"clientId\":\"dqmh\"},\"xotogtwrupqsxv\":{\"principalId\":\"kn\",\"clientId\":\"scwsv\"},\"fcnj\":{\"principalId\":\"i\",\"clientId\":\"kvceoveilovnotyf\"}}},\"location\":\"cn\",\"tags\":{\"h\":\"bttk\",\"jtoqne\":\"wpn\",\"abgy\":\"mclfplphoxuscr\"},\"id\":\"psbjta\",\"name\":\"qugxywpmueefjzwf\",\"type\":\"kqujidsuyono\"}") .toObject(StoragePoolInner.class); - Assertions.assertEquals("ewgdrjervn", model.location()); - Assertions.assertEquals("qp", model.tags().get("hin")); - Assertions.assertEquals("bkrvrnsvshqj", model.properties().availabilityZone()); - Assertions.assertEquals("hxcr", model.properties().vnetInjection().subnetId()); - Assertions.assertEquals("bfovasrruvwbhsq", model.properties().vnetInjection().vnetId()); - Assertions.assertEquals(915934839325229453L, model.properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("t", model.properties().reservationResourceId()); + Assertions.assertEquals("cn", model.location()); + Assertions.assertEquals("bttk", model.tags().get("h")); + Assertions.assertEquals("twwrqp", model.properties().availabilityZone()); + Assertions.assertEquals("edckzywbiexzfey", model.properties().vnetInjection().subnetId()); + Assertions.assertEquals("eaxib", model.properties().vnetInjection().vnetId()); + Assertions.assertEquals(5504260917336517154L, model.properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals("rhdwbavxbniw", model.properties().reservationResourceId()); + Assertions.assertFalse(model.properties().platformConsoleSettings().enabled()); + Assertions.assertFalse(model.properties().platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(model.properties().platformConsoleSettings().api().enabled()); + Assertions.assertFalse(model.properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("xytxhpzxbz", model.properties().platformConsoleSettings().subnets().get(0).id()); Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StoragePoolInner model = new StoragePoolInner().withLocation("ewgdrjervn") - .withTags(mapOf("hin", "qp", "nzdndslgna", "oygmift")) - .withProperties(new StoragePoolProperties().withAvailabilityZone("bkrvrnsvshqj") - .withVnetInjection(new VnetInjection().withSubnetId("hxcr").withVnetId("bfovasrruvwbhsq")) - .withProvisionedBandwidthMbPerSec(915934839325229453L) - .withReservationResourceId("t")) + StoragePoolInner model = new StoragePoolInner().withLocation("cn") + .withTags(mapOf("h", "bttk", "jtoqne", "wpn", "abgy", "mclfplphoxuscr")) + .withProperties(new StoragePoolProperties().withAvailabilityZone("twwrqp") + .withVnetInjection(new VnetInjection().withSubnetId("edckzywbiexzfey").withVnetId("eaxib")) + .withProvisionedBandwidthMbPerSec(5504260917336517154L) + .withReservationResourceId("rhdwbavxbniw") + .withPlatformConsoleSettings(new PlatformConsoleSettings().withEnabled(false) + .withGui(new PlatformConsoleAccessSettings().withEnabled(false)) + .withApi(new PlatformConsoleAccessSettings().withEnabled(true)) + .withCli(new PlatformConsoleAccessSettings().withEnabled(false)) + .withSubnets(Arrays.asList(new PlatformConsoleSubnet().withId("xytxhpzxbz"), + new PlatformConsoleSubnet().withId("mg"))))) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("ybn", new UserAssignedIdentity()))); + .withUserAssignedIdentities(mapOf("jdhtldwkyzxu", new UserAssignedIdentity(), "xotogtwrupqsxv", + new UserAssignedIdentity(), "fcnj", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(StoragePoolInner.class); - Assertions.assertEquals("ewgdrjervn", model.location()); - Assertions.assertEquals("qp", model.tags().get("hin")); - Assertions.assertEquals("bkrvrnsvshqj", model.properties().availabilityZone()); - Assertions.assertEquals("hxcr", model.properties().vnetInjection().subnetId()); - Assertions.assertEquals("bfovasrruvwbhsq", model.properties().vnetInjection().vnetId()); - Assertions.assertEquals(915934839325229453L, model.properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("t", model.properties().reservationResourceId()); + Assertions.assertEquals("cn", model.location()); + Assertions.assertEquals("bttk", model.tags().get("h")); + Assertions.assertEquals("twwrqp", model.properties().availabilityZone()); + Assertions.assertEquals("edckzywbiexzfey", model.properties().vnetInjection().subnetId()); + Assertions.assertEquals("eaxib", model.properties().vnetInjection().vnetId()); + Assertions.assertEquals(5504260917336517154L, model.properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals("rhdwbavxbniw", model.properties().reservationResourceId()); + Assertions.assertFalse(model.properties().platformConsoleSettings().enabled()); + Assertions.assertFalse(model.properties().platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(model.properties().platformConsoleSettings().api().enabled()); + Assertions.assertFalse(model.properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("xytxhpzxbz", model.properties().platformConsoleSettings().subnets().get(0).id()); Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolLimitsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolLimitsTests.java index 42d3beaebd61..479d14bb4730 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolLimitsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolLimitsTests.java @@ -12,12 +12,12 @@ public final class StoragePoolLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StoragePoolLimits model = BinaryData.fromString( - "{\"provisionedBandwidthMbPerSec\":{\"min\":7038668112279725759,\"max\":6892435850965040543},\"provisionedIops\":{\"min\":2307841656567378187,\"max\":6289683561460888713},\"physicalAvailabilityZones\":[\"uhrhcffcyddgl\",\"jthjqkwpyei\",\"xmqci\",\"q\"]}") + "{\"provisionedBandwidthMbPerSec\":{\"min\":5563523584093599698,\"max\":8357781437020373583},\"provisionedIops\":{\"min\":40835509897926426,\"max\":3171024248855177563},\"physicalAvailabilityZones\":[\"ojnxqbzvdd\",\"t\",\"ndei\"]}") .toObject(StoragePoolLimits.class); - Assertions.assertEquals(7038668112279725759L, model.provisionedBandwidthMbPerSec().min()); - Assertions.assertEquals(6892435850965040543L, model.provisionedBandwidthMbPerSec().max()); - Assertions.assertEquals(2307841656567378187L, model.provisionedIops().min()); - Assertions.assertEquals(6289683561460888713L, model.provisionedIops().max()); - Assertions.assertEquals("uhrhcffcyddgl", model.physicalAvailabilityZones().get(0)); + Assertions.assertEquals(5563523584093599698L, model.provisionedBandwidthMbPerSec().min()); + Assertions.assertEquals(8357781437020373583L, model.provisionedBandwidthMbPerSec().max()); + Assertions.assertEquals(40835509897926426L, model.provisionedIops().min()); + Assertions.assertEquals(3171024248855177563L, model.provisionedIops().max()); + Assertions.assertEquals("ojnxqbzvdd", model.physicalAvailabilityZones().get(0)); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolListResultTests.java index 67d63109e5a9..a4a96051f64a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolListResultTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolListResultTests.java @@ -13,16 +13,22 @@ public final class StoragePoolListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StoragePoolListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"hsd\",\"availabilityZone\":\"htozfikdow\",\"vnetInjection\":{\"subnetId\":\"quuvxzxcl\",\"vnetId\":\"ithhqzon\"},\"dataRetentionPeriod\":2524808261528080597,\"provisionedBandwidthMbPerSec\":788094577217246114,\"provisionedIops\":5900736133358401520,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"sjnkal\"},\"provisioningState\":\"Canceled\",\"reservationResourceId\":\"iiswacffgdkzze\"},\"identity\":{\"principalId\":\"vhqcrail\",\"tenantId\":\"n\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"fcnihgwq\":{\"principalId\":\"lrwdmhdlxyj\",\"clientId\":\"sag\"},\"rhvoods\":{\"principalId\":\"nedgfbc\",\"clientId\":\"cvqvpkeqdcv\"}}},\"location\":\"bobzdopcjwvnhd\",\"tags\":{\"twuoegrpkhjwni\":\"mgxcxrslpm\",\"ggkzzlvmbmpa\":\"qsluicp\",\"yhrfouyftaakcpw\":\"modfvuefywsbpfvm\"},\"id\":\"yzvqt\",\"name\":\"nubexk\",\"type\":\"zksmondj\"},{\"properties\":{\"storagePoolInternalId\":\"xvy\",\"availabilityZone\":\"omgkopkwho\",\"vnetInjection\":{\"subnetId\":\"v\",\"vnetId\":\"ajqgxy\"},\"dataRetentionPeriod\":7500274521983784453,\"provisionedBandwidthMbPerSec\":8191946554711009380,\"provisionedIops\":3563158574762399534,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"cxozapvhelxp\"},\"provisioningState\":\"Deleting\",\"reservationResourceId\":\"yat\"},\"identity\":{\"principalId\":\"kcbcue\",\"tenantId\":\"jxgciqibrh\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"hrkwo\":{\"principalId\":\"qrhzoymibmrqyib\",\"clientId\":\"wfluszdt\"},\"nwashrtd\":{\"principalId\":\"yvoqa\",\"clientId\":\"iexpbtgiwbwo\"},\"i\":{\"principalId\":\"cnqxwbpokulpi\",\"clientId\":\"waasip\"},\"fbtkuwhhmhyk\":{\"principalId\":\"byuqerpqlp\",\"clientId\":\"cciuqgbdbutau\"}}},\"location\":\"oxafn\",\"tags\":{\"bpkkpwdre\":\"pichkoymkcdy\",\"suwsyrsnds\":\"novvqfovljxy\"},\"id\":\"tgadgvraeaen\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"storagePoolInternalId\":\"qkacewii\",\"availabilityZone\":\"fpubjibwwi\",\"vnetInjection\":{\"subnetId\":\"tohqkvpuvksgp\",\"vnetId\":\"saknynfsyn\"},\"dataRetentionPeriod\":2136562121038637671,\"provisionedBandwidthMbPerSec\":6369380004296885865,\"provisionedIops\":6903848945185645363,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"iyntorzihle\"},\"provisioningState\":\"Deleting\",\"reservationResourceId\":\"swsrms\"},\"identity\":{\"principalId\":\"rpzbchckqqzqi\",\"tenantId\":\"iysui\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"mnzgmwznmabi\":{\"principalId\":\"edyatrwyhqmibzyh\",\"clientId\":\"tsmypyynpcdp\"},\"lkdmtncvokotllxd\":{\"principalId\":\"sorgj\",\"clientId\":\"bldtlww\"},\"oocrkvcikhnv\":{\"principalId\":\"gsyocogj\",\"clientId\":\"dtbnnha\"},\"ggxkallatmelwuip\":{\"principalId\":\"mqg\",\"clientId\":\"queziky\"}}},\"location\":\"cjzkzivgvvcna\",\"tags\":{\"rdvstkwqqtch\":\"yrnxxmueedn\",\"mtdaa\":\"alm\"},\"id\":\"gdv\",\"name\":\"vgpiohgwxrt\",\"type\":\"udxepxgyqagv\"},{\"properties\":{\"storagePoolInternalId\":\"npkukghimdblx\",\"availabilityZone\":\"wi\",\"vnetInjection\":{\"subnetId\":\"fnjhfjxwmszkkfo\",\"vnetId\":\"rey\"},\"dataRetentionPeriod\":2234038582671997054,\"provisionedBandwidthMbPerSec\":2185206310902116436,\"provisionedIops\":2140423423373896312,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"ivx\"},\"provisioningState\":\"Canceled\",\"reservationResourceId\":\"elpcirelsfeaenwa\"},\"identity\":{\"principalId\":\"tkl\",\"tenantId\":\"xbjhwuaanozjosph\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"qumiek\":{\"principalId\":\"jrvxaglrv\",\"clientId\":\"jwosytxitcskfck\"}}},\"location\":\"zzikhlyfjhdg\",\"tags\":{\"eqidbqfatpx\":\"ebdunyg\",\"cyjmoadsuvarmy\":\"lr\",\"hhyxxrw\":\"dmjsjqb\"},\"id\":\"yc\",\"name\":\"duhpk\",\"type\":\"kgymareqnajxqug\"}],\"nextLink\":\"ky\"}") + "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"wwtppj\",\"availabilityZone\":\"lcxog\",\"vnetInjection\":{\"subnetId\":\"okonzmnsikvmkqz\",\"vnetId\":\"qqkdltfzxmhhvhgu\"},\"dataRetentionPeriod\":7509689601441927537,\"provisionedBandwidthMbPerSec\":3695494116612415824,\"provisionedIops\":5876340549871344535,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"tibqdxbxwakb\"},\"provisioningState\":\"Failed\",\"reservationResourceId\":\"xndlkzgxhu\",\"platformConsoleSettings\":{\"enabled\":true,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":true},\"cli\":{\"enabled\":false},\"subnets\":[{\"id\":\"bebxmubyyntwl\"},{\"id\":\"bqtkoievseotgqr\"},{\"id\":\"ltmuwlauwzizx\"},{\"id\":\"mpgcjefuzmuvpbt\"}],\"defaultUsername\":\"um\"}},\"identity\":{\"principalId\":\"pxebmnzbt\",\"tenantId\":\"jpglkfgohdne\",\"type\":\"None\",\"userAssignedIdentities\":{\"zfikd\":{\"principalId\":\"hsd\",\"clientId\":\"t\"},\"zx\":{\"principalId\":\"wq\",\"clientId\":\"v\"},\"osggbhc\":{\"principalId\":\"vithh\",\"clientId\":\"o\"},\"fgdkzzew\":{\"principalId\":\"fwdsj\",\"clientId\":\"aljutiiswac\"}}},\"location\":\"vhqcrail\",\"tags\":{\"wdmhdlxyjrxs\":\"ppfufl\"},\"id\":\"gafcnihgwqapnedg\",\"name\":\"bcvkcvqvpkeq\",\"type\":\"cvdrhvoodsot\"},{\"properties\":{\"storagePoolInternalId\":\"zdopcjwvnhd\",\"availabilityZone\":\"d\",\"vnetInjection\":{\"subnetId\":\"mgxcxrslpm\",\"vnetId\":\"twuoegrpkhjwni\"},\"dataRetentionPeriod\":4489227154951392836,\"provisionedBandwidthMbPerSec\":5254392939268183781,\"provisionedIops\":1509856375818766415,\"avs\":{\"avsEnabled\":false,\"sddcResourceId\":\"zzlvmbmpaxmodfv\"},\"provisioningState\":\"Deleting\",\"reservationResourceId\":\"yw\",\"platformConsoleSettings\":{\"enabled\":false,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":true},\"cli\":{\"enabled\":true},\"subnets\":[{\"id\":\"uyfta\"},{\"id\":\"kcpwiy\"},{\"id\":\"vqtmnub\"}],\"defaultUsername\":\"kpzksmondjmq\"}},\"identity\":{\"principalId\":\"ypomgkopkwho\",\"tenantId\":\"pajqgxysm\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"helxprglya\":{\"principalId\":\"fqvm\",\"clientId\":\"xozap\"}}},\"location\":\"dckcbc\",\"tags\":{\"hos\":\"rjxgciqib\",\"ibahwflus\":\"sdqrhzoymibmrq\",\"piexpbtgiw\":\"dtmhrkwofyyvoqa\",\"nwashrtd\":\"wo\"},\"id\":\"kcnqxwbpo\",\"name\":\"ulpiuj\",\"type\":\"aasipqi\"},{\"properties\":{\"storagePoolInternalId\":\"yuq\",\"availabilityZone\":\"rpqlp\",\"vnetInjection\":{\"subnetId\":\"wcciuqgbdbu\",\"vnetId\":\"auvfbtkuwhhmhyk\"},\"dataRetentionPeriod\":5084521144740681912,\"provisionedBandwidthMbPerSec\":3465382466938026517,\"provisionedIops\":1511555508586955135,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"chkoymkcdyh\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"kpw\",\"platformConsoleSettings\":{\"enabled\":false,\"gui\":{\"enabled\":true},\"api\":{\"enabled\":false},\"cli\":{\"enabled\":true},\"subnets\":[{\"id\":\"ljxywsu\"},{\"id\":\"syrsndsytgadgvra\"}],\"defaultUsername\":\"en\"}},\"identity\":{\"principalId\":\"zar\",\"tenantId\":\"lquuijfqkacewii\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"qkvpuvksgplsakn\":{\"principalId\":\"ji\",\"clientId\":\"wifto\"},\"eosjswsr\":{\"principalId\":\"fsynljphuop\",\"clientId\":\"dlqiyntorzih\"}}},\"location\":\"lyzrpzbchckqqzqi\",\"tags\":{\"rwyhqmibzyhwitsm\":\"ysuiizynkedya\",\"pcdpumnz\":\"pyy\"},\"id\":\"mwzn\",\"name\":\"abikns\",\"type\":\"rgjhxb\"},{\"properties\":{\"storagePoolInternalId\":\"lwwrl\",\"availabilityZone\":\"dmtnc\",\"vnetInjection\":{\"subnetId\":\"ok\",\"vnetId\":\"tllxdyhgsyocogj\"},\"dataRetentionPeriod\":6994873517454554947,\"provisionedBandwidthMbPerSec\":7818158463712312814,\"provisionedIops\":8180810548190524314,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"crkvcikhnv\"},\"provisioningState\":\"Failed\",\"reservationResourceId\":\"qgxqquezikyw\",\"platformConsoleSettings\":{\"enabled\":true,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":false},\"cli\":{\"enabled\":true},\"subnets\":[{\"id\":\"wuipiccjzkzivg\"},{\"id\":\"vc\"}],\"defaultUsername\":\"y\"}},\"identity\":{\"principalId\":\"rnxxmueed\",\"tenantId\":\"rdvstkwqqtch\",\"type\":\"None\",\"userAssignedIdentities\":{\"g\":{\"principalId\":\"mtdaa\",\"clientId\":\"dvwvgpio\"},\"himdbl\":{\"principalId\":\"rtfudxepxg\",\"clientId\":\"agvrvmnpkuk\"},\"xw\":{\"principalId\":\"wi\",\"clientId\":\"njhf\"}}},\"location\":\"zk\",\"tags\":{\"fjawneaivxwczel\":\"qreyfkzi\",\"r\":\"c\",\"xbjhwuaanozjosph\":\"lsfeaenwabfatkld\",\"ag\":\"oulpjrv\"},\"id\":\"rvimjwosytxitcsk\",\"name\":\"cktqumiekkezzi\",\"type\":\"hlyfjhdgqgg\"}],\"nextLink\":\"dunyg\"}") .toObject(StoragePoolListResult.class); - Assertions.assertEquals("bobzdopcjwvnhd", model.value().get(0).location()); - Assertions.assertEquals("mgxcxrslpm", model.value().get(0).tags().get("twuoegrpkhjwni")); - Assertions.assertEquals("htozfikdow", model.value().get(0).properties().availabilityZone()); - Assertions.assertEquals("quuvxzxcl", model.value().get(0).properties().vnetInjection().subnetId()); - Assertions.assertEquals("ithhqzon", model.value().get(0).properties().vnetInjection().vnetId()); - Assertions.assertEquals(788094577217246114L, model.value().get(0).properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("iiswacffgdkzze", model.value().get(0).properties().reservationResourceId()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ky", model.nextLink()); + Assertions.assertEquals("vhqcrail", model.value().get(0).location()); + Assertions.assertEquals("ppfufl", model.value().get(0).tags().get("wdmhdlxyjrxs")); + Assertions.assertEquals("lcxog", model.value().get(0).properties().availabilityZone()); + Assertions.assertEquals("okonzmnsikvmkqz", model.value().get(0).properties().vnetInjection().subnetId()); + Assertions.assertEquals("qqkdltfzxmhhvhgu", model.value().get(0).properties().vnetInjection().vnetId()); + Assertions.assertEquals(3695494116612415824L, model.value().get(0).properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals("xndlkzgxhu", model.value().get(0).properties().reservationResourceId()); + Assertions.assertTrue(model.value().get(0).properties().platformConsoleSettings().enabled()); + Assertions.assertFalse(model.value().get(0).properties().platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(model.value().get(0).properties().platformConsoleSettings().api().enabled()); + Assertions.assertFalse(model.value().get(0).properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("bebxmubyyntwl", + model.value().get(0).properties().platformConsoleSettings().subnets().get(0).id()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); + Assertions.assertEquals("dunyg", model.nextLink()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolPropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolPropertiesTests.java index cb2cbfd7870b..15a060f4eef9 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolPropertiesTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolPropertiesTests.java @@ -5,34 +5,55 @@ package com.azure.resourcemanager.purestorageblock.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAccessSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSubnet; import com.azure.resourcemanager.purestorageblock.models.StoragePoolProperties; import com.azure.resourcemanager.purestorageblock.models.VnetInjection; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class StoragePoolPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StoragePoolProperties model = BinaryData.fromString( - "{\"storagePoolInternalId\":\"iertgccymvaolp\",\"availabilityZone\":\"slqlfmmdn\",\"vnetInjection\":{\"subnetId\":\"bglzpswi\",\"vnetId\":\"d\"},\"dataRetentionPeriod\":6855898880348717340,\"provisionedBandwidthMbPerSec\":2986988161676305406,\"provisionedIops\":3868778507667885775,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"bzmnvdfznud\"},\"provisioningState\":\"Failed\",\"reservationResourceId\":\"vxzbncb\"}") + "{\"storagePoolInternalId\":\"laocqxtccmg\",\"availabilityZone\":\"udxytlmoyrx\",\"vnetInjection\":{\"subnetId\":\"wfudwpzntxhdzhl\",\"vnetId\":\"qj\"},\"dataRetentionPeriod\":1196903059215633177,\"provisionedBandwidthMbPerSec\":4544642130176849463,\"provisionedIops\":6543879944519090498,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"kyv\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"anuzbpzkafkuw\",\"platformConsoleSettings\":{\"enabled\":false,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":true},\"cli\":{\"enabled\":false},\"subnets\":[{\"id\":\"yvjusrtslhsp\",\"managementIpAddress\":\"eemaofmxagkvtme\",\"serviceBackendIps\":[\"krh\",\"hvljuahaquh\",\"dhmdua\"]},{\"id\":\"aex\",\"managementIpAddress\":\"vfadmws\",\"serviceBackendIps\":[\"gvxp\"]},{\"id\":\"gomz\",\"managementIpAddress\":\"misgwbnb\",\"serviceBackendIps\":[\"dawkzbali\",\"urqhaka\",\"hashsfwxosow\",\"xcug\"]},{\"id\":\"cjooxdjebwpucwwf\",\"managementIpAddress\":\"vbvmeu\",\"serviceBackendIps\":[\"vyhzceuojgjrwj\",\"eiotwmcdytdx\",\"it\",\"nrjawgqwg\"]}],\"defaultUsername\":\"ni\"}}") .toObject(StoragePoolProperties.class); - Assertions.assertEquals("slqlfmmdn", model.availabilityZone()); - Assertions.assertEquals("bglzpswi", model.vnetInjection().subnetId()); - Assertions.assertEquals("d", model.vnetInjection().vnetId()); - Assertions.assertEquals(2986988161676305406L, model.provisionedBandwidthMbPerSec()); - Assertions.assertEquals("vxzbncb", model.reservationResourceId()); + Assertions.assertEquals("udxytlmoyrx", model.availabilityZone()); + Assertions.assertEquals("wfudwpzntxhdzhl", model.vnetInjection().subnetId()); + Assertions.assertEquals("qj", model.vnetInjection().vnetId()); + Assertions.assertEquals(4544642130176849463L, model.provisionedBandwidthMbPerSec()); + Assertions.assertEquals("anuzbpzkafkuw", model.reservationResourceId()); + Assertions.assertFalse(model.platformConsoleSettings().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(model.platformConsoleSettings().api().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("yvjusrtslhsp", model.platformConsoleSettings().subnets().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StoragePoolProperties model = new StoragePoolProperties().withAvailabilityZone("slqlfmmdn") - .withVnetInjection(new VnetInjection().withSubnetId("bglzpswi").withVnetId("d")) - .withProvisionedBandwidthMbPerSec(2986988161676305406L) - .withReservationResourceId("vxzbncb"); + StoragePoolProperties model = new StoragePoolProperties().withAvailabilityZone("udxytlmoyrx") + .withVnetInjection(new VnetInjection().withSubnetId("wfudwpzntxhdzhl").withVnetId("qj")) + .withProvisionedBandwidthMbPerSec(4544642130176849463L) + .withReservationResourceId("anuzbpzkafkuw") + .withPlatformConsoleSettings(new PlatformConsoleSettings().withEnabled(false) + .withGui(new PlatformConsoleAccessSettings().withEnabled(false)) + .withApi(new PlatformConsoleAccessSettings().withEnabled(true)) + .withCli(new PlatformConsoleAccessSettings().withEnabled(false)) + .withSubnets(Arrays.asList(new PlatformConsoleSubnet().withId("yvjusrtslhsp"), + new PlatformConsoleSubnet().withId("aex"), new PlatformConsoleSubnet().withId("gomz"), + new PlatformConsoleSubnet().withId("cjooxdjebwpucwwf")))); model = BinaryData.fromObject(model).toObject(StoragePoolProperties.class); - Assertions.assertEquals("slqlfmmdn", model.availabilityZone()); - Assertions.assertEquals("bglzpswi", model.vnetInjection().subnetId()); - Assertions.assertEquals("d", model.vnetInjection().vnetId()); - Assertions.assertEquals(2986988161676305406L, model.provisionedBandwidthMbPerSec()); - Assertions.assertEquals("vxzbncb", model.reservationResourceId()); + Assertions.assertEquals("udxytlmoyrx", model.availabilityZone()); + Assertions.assertEquals("wfudwpzntxhdzhl", model.vnetInjection().subnetId()); + Assertions.assertEquals("qj", model.vnetInjection().vnetId()); + Assertions.assertEquals(4544642130176849463L, model.provisionedBandwidthMbPerSec()); + Assertions.assertEquals("anuzbpzkafkuw", model.reservationResourceId()); + Assertions.assertFalse(model.platformConsoleSettings().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(model.platformConsoleSettings().api().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("yvjusrtslhsp", model.platformConsoleSettings().subnets().get(0).id()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolUpdatePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolUpdatePropertiesTests.java index a8cf8b09d3ce..51dfaa7ac418 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolUpdatePropertiesTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolUpdatePropertiesTests.java @@ -5,23 +5,44 @@ package com.azure.resourcemanager.purestorageblock.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAccessSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSubnet; import com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdateProperties; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class StoragePoolUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StoragePoolUpdateProperties model - = BinaryData.fromString("{\"provisionedBandwidthMbPerSec\":3210432700680479776}") - .toObject(StoragePoolUpdateProperties.class); - Assertions.assertEquals(3210432700680479776L, model.provisionedBandwidthMbPerSec()); + StoragePoolUpdateProperties model = BinaryData.fromString( + "{\"provisionedBandwidthMbPerSec\":651752597881008375,\"platformConsoleSettings\":{\"enabled\":true,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":false},\"cli\":{\"enabled\":false},\"subnets\":[{\"id\":\"taruoujmkcj\",\"managementIpAddress\":\"qytjrybnwjewgd\",\"serviceBackendIps\":[\"rvnaenqpeh\",\"ndoygmifthnzdnd\",\"l\"]},{\"id\":\"nayqi\",\"managementIpAddress\":\"nduhavhqlkthum\",\"serviceBackendIps\":[\"lbg\",\"cdui\",\"r\",\"gccymvaolpssl\"]},{\"id\":\"lfmmdnbbglzpswi\",\"managementIpAddress\":\"mcwyhzdxssadb\",\"serviceBackendIps\":[\"vdfznudaodvxzb\",\"cblylpstdbhhxsr\",\"dzu\"]},{\"id\":\"erscdntne\",\"managementIpAddress\":\"iwjmygtdssls\",\"serviceBackendIps\":[\"weriofzpyqsem\",\"abnetshh\",\"zhedplvwiw\"]}],\"defaultUsername\":\"mwmbes\"}}") + .toObject(StoragePoolUpdateProperties.class); + Assertions.assertEquals(651752597881008375L, model.provisionedBandwidthMbPerSec()); + Assertions.assertTrue(model.platformConsoleSettings().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().gui().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().api().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("taruoujmkcj", model.platformConsoleSettings().subnets().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StoragePoolUpdateProperties model - = new StoragePoolUpdateProperties().withProvisionedBandwidthMbPerSec(3210432700680479776L); + StoragePoolUpdateProperties model = new StoragePoolUpdateProperties() + .withProvisionedBandwidthMbPerSec(651752597881008375L) + .withPlatformConsoleSettings(new PlatformConsoleSettings().withEnabled(true) + .withGui(new PlatformConsoleAccessSettings().withEnabled(false)) + .withApi(new PlatformConsoleAccessSettings().withEnabled(false)) + .withCli(new PlatformConsoleAccessSettings().withEnabled(false)) + .withSubnets(Arrays.asList(new PlatformConsoleSubnet().withId("taruoujmkcj"), + new PlatformConsoleSubnet().withId("nayqi"), new PlatformConsoleSubnet().withId("lfmmdnbbglzpswi"), + new PlatformConsoleSubnet().withId("erscdntne")))); model = BinaryData.fromObject(model).toObject(StoragePoolUpdateProperties.class); - Assertions.assertEquals(3210432700680479776L, model.provisionedBandwidthMbPerSec()); + Assertions.assertEquals(651752597881008375L, model.provisionedBandwidthMbPerSec()); + Assertions.assertTrue(model.platformConsoleSettings().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().gui().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().api().enabled()); + Assertions.assertFalse(model.platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("taruoujmkcj", model.platformConsoleSettings().subnets().get(0).id()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolUpdateTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolUpdateTests.java index 28dbe556b023..2d17d5152d76 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolUpdateTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolUpdateTests.java @@ -7,9 +7,13 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentity; import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAccessSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSubnet; import com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdate; import com.azure.resourcemanager.purestorageblock.models.StoragePoolUpdateProperties; import com.azure.resourcemanager.purestorageblock.models.UserAssignedIdentity; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -18,25 +22,44 @@ public final class StoragePoolUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StoragePoolUpdate model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"obdagxtibqdxb\",\"tenantId\":\"akbogqxndlkzgxh\",\"type\":\"None\",\"userAssignedIdentities\":{\"bqtkoievseotgqr\":{\"principalId\":\"bpodxunkbebxm\",\"clientId\":\"yyntwl\"},\"gcj\":{\"principalId\":\"tmuwlauwzi\",\"clientId\":\"bm\"},\"tdum\":{\"principalId\":\"u\",\"clientId\":\"uvpb\"}}},\"tags\":{\"hjpglkf\":\"pxebmnzbt\"},\"properties\":{\"provisionedBandwidthMbPerSec\":4451284906694141783}}") + "{\"identity\":{\"principalId\":\"ppg\",\"tenantId\":\"tpnapnyiropuhpig\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"zhxgktrmgucn\":{\"principalId\":\"gqgitxmedjvcsl\",\"clientId\":\"qwwncw\"},\"pfqbuaceopzf\":{\"principalId\":\"kteo\",\"clientId\":\"lwptfdy\"},\"lzdahzxctobgbkdm\":{\"principalId\":\"hhuao\",\"clientId\":\"pcqeqx\"},\"jy\":{\"principalId\":\"zpostmgrcfbu\",\"clientId\":\"mfqjhhkxbp\"}}},\"tags\":{\"xqzvszjfa\":\"xxjyngudivkrtsw\"},\"properties\":{\"provisionedBandwidthMbPerSec\":8685114994195323199,\"platformConsoleSettings\":{\"enabled\":false,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":true},\"cli\":{\"enabled\":true},\"subnets\":[{\"id\":\"qtdo\",\"managementIpAddress\":\"cbxvwvxyslqbh\",\"serviceBackendIps\":[\"obl\",\"tkblmpewww\",\"bkrvrnsvshqj\"]},{\"id\":\"hxcr\",\"managementIpAddress\":\"fovasr\",\"serviceBackendIps\":[\"wbhsqfsub\"]},{\"id\":\"gjb\",\"managementIpAddress\":\"xb\",\"serviceBackendIps\":[\"srfbjfdtwss\",\"t\"]}],\"defaultUsername\":\"pvjzbe\"}}}") .toObject(StoragePoolUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("pxebmnzbt", model.tags().get("hjpglkf")); - Assertions.assertEquals(4451284906694141783L, model.properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("xxjyngudivkrtsw", model.tags().get("xqzvszjfa")); + Assertions.assertEquals(8685114994195323199L, model.properties().provisionedBandwidthMbPerSec()); + Assertions.assertFalse(model.properties().platformConsoleSettings().enabled()); + Assertions.assertFalse(model.properties().platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(model.properties().platformConsoleSettings().api().enabled()); + Assertions.assertTrue(model.properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("qtdo", model.properties().platformConsoleSettings().subnets().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StoragePoolUpdate model = new StoragePoolUpdate() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("bqtkoievseotgqr", new UserAssignedIdentity(), "gcj", - new UserAssignedIdentity(), "tdum", new UserAssignedIdentity()))) - .withTags(mapOf("hjpglkf", "pxebmnzbt")) - .withProperties(new StoragePoolUpdateProperties().withProvisionedBandwidthMbPerSec(4451284906694141783L)); + StoragePoolUpdate model + = new StoragePoolUpdate() + .withIdentity( + new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("zhxgktrmgucn", new UserAssignedIdentity(), "pfqbuaceopzf", + new UserAssignedIdentity(), "lzdahzxctobgbkdm", new UserAssignedIdentity(), "jy", + new UserAssignedIdentity()))) + .withTags(mapOf("xqzvszjfa", "xxjyngudivkrtsw")) + .withProperties(new StoragePoolUpdateProperties().withProvisionedBandwidthMbPerSec(8685114994195323199L) + .withPlatformConsoleSettings(new PlatformConsoleSettings().withEnabled(false) + .withGui(new PlatformConsoleAccessSettings().withEnabled(false)) + .withApi(new PlatformConsoleAccessSettings().withEnabled(true)) + .withCli(new PlatformConsoleAccessSettings().withEnabled(true)) + .withSubnets(Arrays.asList(new PlatformConsoleSubnet().withId("qtdo"), + new PlatformConsoleSubnet().withId("hxcr"), new PlatformConsoleSubnet().withId("gjb"))))); model = BinaryData.fromObject(model).toObject(StoragePoolUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("pxebmnzbt", model.tags().get("hjpglkf")); - Assertions.assertEquals(4451284906694141783L, model.properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); + Assertions.assertEquals("xxjyngudivkrtsw", model.tags().get("xqzvszjfa")); + Assertions.assertEquals(8685114994195323199L, model.properties().provisionedBandwidthMbPerSec()); + Assertions.assertFalse(model.properties().platformConsoleSettings().enabled()); + Assertions.assertFalse(model.properties().platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(model.properties().platformConsoleSettings().api().enabled()); + Assertions.assertTrue(model.properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("qtdo", model.properties().platformConsoleSettings().subnets().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsConfigurePlatformConsoleAuthWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsConfigurePlatformConsoleAuthWithResponseMockTests.java new file mode 100644 index 000000000000..df6c304eb427 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsConfigurePlatformConsoleAuthWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthConfig; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAuthResult; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class StoragePoolsConfigurePlatformConsoleAuthWithResponseMockTests { + @Test + public void testConfigurePlatformConsoleAuthWithResponse() throws Exception { + String responseStr = "{\"authType\":\"PlatformConsoleAuthResult\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PlatformConsoleAuthResult response = manager.storagePools() + .configurePlatformConsoleAuthWithResponse("htuevrhrljy", "ogwxhnsduugwb", new PlatformConsoleAuthConfig(), + com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateMockTests.java index 6e7b0fbd2507..7b0b975eda23 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateMockTests.java @@ -12,12 +12,16 @@ import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentity; import com.azure.resourcemanager.purestorageblock.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleAccessSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSettings; +import com.azure.resourcemanager.purestorageblock.models.PlatformConsoleSubnet; import com.azure.resourcemanager.purestorageblock.models.StoragePool; import com.azure.resourcemanager.purestorageblock.models.StoragePoolProperties; import com.azure.resourcemanager.purestorageblock.models.UserAssignedIdentity; import com.azure.resourcemanager.purestorageblock.models.VnetInjection; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -28,7 +32,7 @@ public final class StoragePoolsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"storagePoolInternalId\":\"ethwwnpjhlfz\",\"availabilityZone\":\"wpchwahf\",\"vnetInjection\":{\"subnetId\":\"ousnfepgfewe\",\"vnetId\":\"wlyxgncxyk\"},\"dataRetentionPeriod\":7273208540565917930,\"provisionedBandwidthMbPerSec\":136880772984526370,\"provisionedIops\":1348597910469137076,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"f\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"po\"},\"identity\":{\"principalId\":\"xcjzhqizxfpxt\",\"tenantId\":\"scjavftju\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"wpijrajci\":{\"principalId\":\"k\",\"clientId\":\"gg\"},\"oxgsgbpfgzdjtx\":{\"principalId\":\"mghfcfiwrxgkne\",\"clientId\":\"yinzqodfvpgs\"},\"rdve\":{\"principalId\":\"flbqvgaq\",\"clientId\":\"gafcqu\"}}},\"location\":\"wsdtutnwl\",\"tags\":{\"dxukuqgsjjxundxg\":\"cvuzhyrmewipmve\",\"hhzjhfj\":\"etw\",\"qsxvmhf\":\"hvvmuvgpmun\",\"yue\":\"uzjyihsasbhudypo\"},\"id\":\"slynsqyrpfoo\",\"name\":\"rlttymsjnygqdnfw\",\"type\":\"zdzgtilaxhnfhqly\"}"; + = "{\"properties\":{\"storagePoolInternalId\":\"qepvufhbzeh\",\"availabilityZone\":\"whoqhnlbqnbldxe\",\"vnetInjection\":{\"subnetId\":\"clgsc\",\"vnetId\":\"orim\"},\"dataRetentionPeriod\":3947758974496733605,\"provisionedBandwidthMbPerSec\":392452782648364567,\"provisionedIops\":4768005601466800077,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"ldpuviy\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"abeolhbhlvbm\",\"platformConsoleSettings\":{\"enabled\":true,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":true},\"cli\":{\"enabled\":true},\"subnets\":[{\"id\":\"fbsfarfsiow\",\"managementIpAddress\":\"jxnqp\",\"serviceBackendIps\":[\"fstmhqykizmdksao\"]},{\"id\":\"fcluqvo\",\"managementIpAddress\":\"ycjimryvwgcwwpbm\",\"serviceBackendIps\":[\"esyds\"]},{\"id\":\"wefohecbvo\",\"managementIpAddress\":\"ndyqleal\",\"serviceBackendIps\":[\"mtkhlowkxxpvbr\",\"fjmzsyzfho\",\"lhikcyychunsj\"]},{\"id\":\"pjrtws\",\"managementIpAddress\":\"vv\",\"serviceBackendIps\":[\"phvtrrmhwrb\"]}],\"defaultUsername\":\"pyf\"}},\"identity\":{\"principalId\":\"hvj\",\"tenantId\":\"r\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"emc\":{\"principalId\":\"lw\",\"clientId\":\"memhooclutnpq\"},\"fihotj\":{\"principalId\":\"kmmykyujxsglh\",\"clientId\":\"rryejylmbkzudnig\"}}},\"location\":\"lpxuzzjgnrefq\",\"tags\":{\"ydiw\":\"otoihiqa\",\"hcspo\":\"brkwpzdqt\",\"sipi\":\"aqa\",\"ulbmoichdlp\":\"tgbebj\"},\"id\":\"fpubntnbatz\",\"name\":\"iqsowsaaelc\",\"type\":\"ttcjuhplrvkmjc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,27 +42,36 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); StoragePool response = manager.storagePools() - .define("lhzdsqtzb") - .withRegion("b") - .withExistingResourceGroup("cwkhihi") - .withTags(mapOf("eitpkxztmo", "aehvvibrxjjstoq", "qxzhem", "bklftidgfcwqmpim", "lkb", "yhohujswtwkozzwc", - "jwltlwtjjgu", "wpfaj")) - .withProperties(new StoragePoolProperties().withAvailabilityZone("hfgmvecactxm") - .withVnetInjection(new VnetInjection().withSubnetId("oteyowc").withVnetId("uqovekqvgqouwif")) - .withProvisionedBandwidthMbPerSec(9183052747374666189L) - .withReservationResourceId("agr")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("brta", new UserAssignedIdentity(), "qseypxiutcxa", - new UserAssignedIdentity(), "abrqnkkzj", new UserAssignedIdentity()))) + .define("q") + .withRegion("iroqbosh") + .withExistingResourceGroup("reur") + .withTags(mapOf("pavbo", "gapyyrmfsv")) + .withProperties(new StoragePoolProperties().withAvailabilityZone("vkyfedevjbosl") + .withVnetInjection(new VnetInjection().withSubnetId("qxypokkhminq").withVnetId("ymc")) + .withProvisionedBandwidthMbPerSec(4891249123007115758L) + .withReservationResourceId("tvq") + .withPlatformConsoleSettings(new PlatformConsoleSettings().withEnabled(false) + .withGui(new PlatformConsoleAccessSettings().withEnabled(true)) + .withApi(new PlatformConsoleAccessSettings().withEnabled(true)) + .withCli(new PlatformConsoleAccessSettings().withEnabled(false)) + .withSubnets(Arrays.asList(new PlatformConsoleSubnet().withId("dmflhuytx"))))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("awpcbbnzqcykn", new UserAssignedIdentity(), "fmuvapckccr", + new UserAssignedIdentity(), "haim", new UserAssignedIdentity()))) .create(); - Assertions.assertEquals("wsdtutnwl", response.location()); - Assertions.assertEquals("cvuzhyrmewipmve", response.tags().get("dxukuqgsjjxundxg")); - Assertions.assertEquals("wpchwahf", response.properties().availabilityZone()); - Assertions.assertEquals("ousnfepgfewe", response.properties().vnetInjection().subnetId()); - Assertions.assertEquals("wlyxgncxyk", response.properties().vnetInjection().vnetId()); - Assertions.assertEquals(136880772984526370L, response.properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("po", response.properties().reservationResourceId()); + Assertions.assertEquals("lpxuzzjgnrefq", response.location()); + Assertions.assertEquals("otoihiqa", response.tags().get("ydiw")); + Assertions.assertEquals("whoqhnlbqnbldxe", response.properties().availabilityZone()); + Assertions.assertEquals("clgsc", response.properties().vnetInjection().subnetId()); + Assertions.assertEquals("orim", response.properties().vnetInjection().vnetId()); + Assertions.assertEquals(392452782648364567L, response.properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals("abeolhbhlvbm", response.properties().reservationResourceId()); + Assertions.assertTrue(response.properties().platformConsoleSettings().enabled()); + Assertions.assertFalse(response.properties().platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(response.properties().platformConsoleSettings().api().enabled()); + Assertions.assertTrue(response.properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("fbsfarfsiow", response.properties().platformConsoleSettings().subnets().get(0).id()); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsConnectionWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsConnectionWithResponseMockTests.java index 86bcb09bfe4a..f1ccefb1669b 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsConnectionWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsConnectionWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class StoragePoolsGetAvsConnectionWithResponseMockTests { @Test public void testGetAvsConnectionWithResponse() throws Exception { String responseStr - = "{\"serviceInitializationCompleted\":false,\"serviceInitializationHandleEnc\":\"mozuxylfsb\",\"serviceInitializationHandle\":{\"sddcResourceId\":\"dp\",\"serviceAccountUsername\":\"own\"}}"; + = "{\"serviceInitializationCompleted\":true,\"serviceInitializationHandleEnc\":\"mkwkl\",\"serviceInitializationHandle\":{\"sddcResourceId\":\"xaxmq\",\"serviceAccountUsername\":\"alhhjnhgwydyynfs\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetAvsConnectionWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsConnection response = manager.storagePools() - .getAvsConnectionWithResponse("iagtc", "jocqwogfnzjvusf", com.azure.core.util.Context.NONE) + .getAvsConnectionWithResponse("ftbyrplro", "kpigqfusu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.serviceInitializationCompleted()); - Assertions.assertEquals("mozuxylfsb", response.serviceInitializationHandleEnc()); - Assertions.assertEquals("dp", response.serviceInitializationHandle().clusterResourceId()); - Assertions.assertEquals("own", response.serviceInitializationHandle().serviceAccountUsername()); + Assertions.assertTrue(response.serviceInitializationCompleted()); + Assertions.assertEquals("mkwkl", response.serviceInitializationHandleEnc()); + Assertions.assertEquals("xaxmq", response.serviceInitializationHandle().clusterResourceId()); + Assertions.assertEquals("alhhjnhgwydyynfs", response.serviceInitializationHandle().serviceAccountUsername()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsStatusWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsStatusWithResponseMockTests.java index 83e323c463f0..458b9bc70f19 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsStatusWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetAvsStatusWithResponseMockTests.java @@ -20,7 +20,8 @@ public final class StoragePoolsGetAvsStatusWithResponseMockTests { @Test public void testGetAvsStatusWithResponse() throws Exception { - String responseStr = "{\"avsEnabled\":true,\"currentConnectionStatus\":\"u\",\"sddcResourceId\":\"cp\"}"; + String responseStr + = "{\"avsEnabled\":false,\"currentConnectionStatus\":\"yrneizjcpeo\",\"sddcResourceId\":\"hnmgbroux\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,11 +31,11 @@ public void testGetAvsStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsStatus response = manager.storagePools() - .getAvsStatusWithResponse("tgkbugrjqctojc", "isofieypefojyqd", com.azure.core.util.Context.NONE) + .getAvsStatusWithResponse("khgb", "qtanarfdlpuk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.avsEnabled()); - Assertions.assertEquals("u", response.currentConnectionStatus()); - Assertions.assertEquals("cp", response.clusterResourceId()); + Assertions.assertFalse(response.avsEnabled()); + Assertions.assertEquals("yrneizjcpeo", response.currentConnectionStatus()); + Assertions.assertEquals("hnmgbroux", response.clusterResourceId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetByResourceGroupWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetByResourceGroupWithResponseMockTests.java index 20ccc572089a..d6d633f8e3ba 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetByResourceGroupWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class StoragePoolsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storagePoolInternalId\":\"wqjnob\",\"availabilityZone\":\"iyhddvi\",\"vnetInjection\":{\"subnetId\":\"cegfnmntfp\",\"vnetId\":\"vm\"},\"dataRetentionPeriod\":4290987357614986610,\"provisionedBandwidthMbPerSec\":5936316598559171392,\"provisionedIops\":3782508391126657105,\"avs\":{\"avsEnabled\":false,\"sddcResourceId\":\"lxlllchpo\"},\"provisioningState\":\"Canceled\",\"reservationResourceId\":\"evwrdnhfuk\"},\"identity\":{\"principalId\":\"jcswsmys\",\"tenantId\":\"luqypfcvlerch\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"drihpfhoqcaaewda\":{\"principalId\":\"pjbabwidfc\",\"clientId\":\"spuunnoxyhkxgq\"},\"zkdnc\":{\"principalId\":\"djvlpj\",\"clientId\":\"kzbrmsgeivsiy\"}}},\"location\":\"xonbzoggculapz\",\"tags\":{\"b\":\"pgogtqxepny\",\"lvofqzhvfcibyfmo\":\"uajlyj\",\"dwxf\":\"uxrkjp\"},\"id\":\"wiivwzjbhyzsx\",\"name\":\"rkambt\",\"type\":\"negvmnvuqe\"}"; + = "{\"properties\":{\"storagePoolInternalId\":\"maajquhuxylr\",\"availabilityZone\":\"vmtygj\",\"vnetInjection\":{\"subnetId\":\"mzyospspshck\",\"vnetId\":\"kyjpmspbps\"},\"dataRetentionPeriod\":8811910129142275142,\"provisionedBandwidthMbPerSec\":2092383967752545958,\"provisionedIops\":1659137469183232589,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"ujtv\"},\"provisioningState\":\"Canceled\",\"reservationResourceId\":\"cnyxrxmunjd\",\"platformConsoleSettings\":{\"enabled\":false,\"gui\":{\"enabled\":false},\"api\":{\"enabled\":false},\"cli\":{\"enabled\":true},\"subnets\":[{\"id\":\"glqivbgkcv\",\"managementIpAddress\":\"pzvuqdflvo\",\"serviceBackendIps\":[\"pfpubcpzgpx\"]},{\"id\":\"ivhjknidi\",\"managementIpAddress\":\"qjxgpnrhgovfgp\",\"serviceBackendIps\":[\"mhha\",\"wjrmzvuporqzd\"]},{\"id\":\"uydzvk\",\"managementIpAddress\":\"xcnqmxqpswokmvkh\",\"serviceBackendIps\":[\"dhbemzqkzszu\",\"iwtglxxhljfpg\"]},{\"id\":\"icrmnzh\",\"managementIpAddress\":\"mqgjsxvpq\",\"serviceBackendIps\":[\"rmbodt\",\"s\",\"qgvriibakcla\"]}],\"defaultUsername\":\"fr\"}},\"identity\":{\"principalId\":\"usx\",\"tenantId\":\"zlwvsgmwohqfz\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"gplucfotangcfhny\":{\"principalId\":\"mmkjsvthnwpztek\",\"clientId\":\"mribiat\"},\"jmxmcuqud\":{\"principalId\":\"cugswvxwlmzqw\",\"clientId\":\"tx\"},\"abuiy\":{\"principalId\":\"vclx\",\"clientId\":\"pdkvg\"},\"ibtozipqw\":{\"principalId\":\"buzphdugn\",\"clientId\":\"knpgoxgjiuq\"}}},\"location\":\"d\",\"tags\":{\"x\":\"r\",\"kmqp\":\"ewpktvqy\",\"hlfbcgwgc\":\"o\"},\"id\":\"oxoebqi\",\"name\":\"jipnwj\",\"type\":\"ujqlafcbahh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,21 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); StoragePool response = manager.storagePools() - .getByResourceGroupWithResponse("hpfkyrkdbdgi", "gsj", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("amowaziynknlqwzd", "piwhxqs", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xonbzoggculapz", response.location()); - Assertions.assertEquals("pgogtqxepny", response.tags().get("b")); - Assertions.assertEquals("iyhddvi", response.properties().availabilityZone()); - Assertions.assertEquals("cegfnmntfp", response.properties().vnetInjection().subnetId()); - Assertions.assertEquals("vm", response.properties().vnetInjection().vnetId()); - Assertions.assertEquals(5936316598559171392L, response.properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("evwrdnhfuk", response.properties().reservationResourceId()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("d", response.location()); + Assertions.assertEquals("r", response.tags().get("x")); + Assertions.assertEquals("vmtygj", response.properties().availabilityZone()); + Assertions.assertEquals("mzyospspshck", response.properties().vnetInjection().subnetId()); + Assertions.assertEquals("kyjpmspbps", response.properties().vnetInjection().vnetId()); + Assertions.assertEquals(2092383967752545958L, response.properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals("cnyxrxmunjd", response.properties().reservationResourceId()); + Assertions.assertFalse(response.properties().platformConsoleSettings().enabled()); + Assertions.assertFalse(response.properties().platformConsoleSettings().gui().enabled()); + Assertions.assertFalse(response.properties().platformConsoleSettings().api().enabled()); + Assertions.assertTrue(response.properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("glqivbgkcv", response.properties().platformConsoleSettings().subnets().get(0).id()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetHealthStatusWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetHealthStatusWithResponseMockTests.java index 554457f0375f..cee0fd1b3158 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetHealthStatusWithResponseMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsGetHealthStatusWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class StoragePoolsGetHealthStatusWithResponseMockTests { @Test public void testGetHealthStatusWithResponse() throws Exception { String responseStr - = "{\"health\":{\"usedCapacityPercentage\":37.904659906955786,\"bandwidthUsage\":{\"current\":3561845794707371131,\"provisioned\":5142901389847761375,\"max\":3428056516697378704},\"iopsUsage\":{\"current\":2089848727273246662,\"provisioned\":2395973517654166674,\"max\":1210801517644379605},\"space\":{\"totalUsed\":8144209061033072751,\"unique\":1627513098218533241,\"snapshots\":195420941787005324,\"shared\":5700722260986013528},\"dataReductionRatio\":88.61506404849831,\"estimatedMaxCapacity\":1833714202725458886},\"alerts\":[{\"level\":\"info\",\"message\":\"iaa\"},{\"level\":\"warning\",\"message\":\"uagydwqfbylyrf\"}]}"; + = "{\"health\":{\"usedCapacityPercentage\":27.11264817465777,\"bandwidthUsage\":{\"current\":205069095955114127,\"provisioned\":2662641877735387496,\"max\":8349886578695136526},\"iopsUsage\":{\"current\":714793263673058266,\"provisioned\":5864227724036789317,\"max\":9078020840850761696},\"space\":{\"totalUsed\":994604483308032293,\"unique\":942922715491744842,\"snapshots\":1642106309711711609,\"shared\":247224500255142173},\"dataReductionRatio\":66.18135769379016,\"estimatedMaxCapacity\":4683047037511229554},\"alerts\":[{\"level\":\"info\",\"message\":\"izoyuelyetndnbf\"},{\"level\":\"error\",\"message\":\"ggagfln\"},{\"level\":\"info\",\"message\":\"mtrwah\"},{\"level\":\"warning\",\"message\":\"mu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,23 +32,23 @@ public void testGetHealthStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); StoragePoolHealthInfo response = manager.storagePools() - .getHealthStatusWithResponse("lefaxvxilcbtgn", "nzeyqxtjj", com.azure.core.util.Context.NONE) + .getHealthStatusWithResponse("vitac", "xmfcsserxhtv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(37.904659906955786, response.health().usedCapacityPercentage()); - Assertions.assertEquals(3561845794707371131L, response.health().bandwidthUsage().current()); - Assertions.assertEquals(5142901389847761375L, response.health().bandwidthUsage().provisioned()); - Assertions.assertEquals(3428056516697378704L, response.health().bandwidthUsage().max()); - Assertions.assertEquals(2089848727273246662L, response.health().iopsUsage().current()); - Assertions.assertEquals(2395973517654166674L, response.health().iopsUsage().provisioned()); - Assertions.assertEquals(1210801517644379605L, response.health().iopsUsage().max()); - Assertions.assertEquals(8144209061033072751L, response.health().space().totalUsed()); - Assertions.assertEquals(1627513098218533241L, response.health().space().unique()); - Assertions.assertEquals(195420941787005324L, response.health().space().snapshots()); - Assertions.assertEquals(5700722260986013528L, response.health().space().shared()); - Assertions.assertEquals(88.61506404849831, response.health().dataReductionRatio()); - Assertions.assertEquals(1833714202725458886L, response.health().estimatedMaxCapacity()); + Assertions.assertEquals(27.11264817465777, response.health().usedCapacityPercentage()); + Assertions.assertEquals(205069095955114127L, response.health().bandwidthUsage().current()); + Assertions.assertEquals(2662641877735387496L, response.health().bandwidthUsage().provisioned()); + Assertions.assertEquals(8349886578695136526L, response.health().bandwidthUsage().max()); + Assertions.assertEquals(714793263673058266L, response.health().iopsUsage().current()); + Assertions.assertEquals(5864227724036789317L, response.health().iopsUsage().provisioned()); + Assertions.assertEquals(9078020840850761696L, response.health().iopsUsage().max()); + Assertions.assertEquals(994604483308032293L, response.health().space().totalUsed()); + Assertions.assertEquals(942922715491744842L, response.health().space().unique()); + Assertions.assertEquals(1642106309711711609L, response.health().space().snapshots()); + Assertions.assertEquals(247224500255142173L, response.health().space().shared()); + Assertions.assertEquals(66.18135769379016, response.health().dataReductionRatio()); + Assertions.assertEquals(4683047037511229554L, response.health().estimatedMaxCapacity()); Assertions.assertEquals(AlertLevel.INFO, response.alerts().get(0).level()); - Assertions.assertEquals("iaa", response.alerts().get(0).message()); + Assertions.assertEquals("izoyuelyetndnbf", response.alerts().get(0).message()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListByResourceGroupMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListByResourceGroupMockTests.java index 40b2c9c77c9d..a9a02fa2fb7e 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListByResourceGroupMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListByResourceGroupMockTests.java @@ -23,7 +23,7 @@ public final class StoragePoolsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"bkkd\",\"availabilityZone\":\"flvestmjlxrrilo\",\"vnetInjection\":{\"subnetId\":\"apeewchpxlkt\",\"vnetId\":\"kuziycsle\"},\"dataRetentionPeriod\":376348209063943127,\"provisionedBandwidthMbPerSec\":7273800949722293579,\"provisionedIops\":5765928243400735909,\"avs\":{\"avsEnabled\":false,\"sddcResourceId\":\"tqedcgzulwm\"},\"provisioningState\":\"Accepted\",\"reservationResourceId\":\"z\"},\"identity\":{\"principalId\":\"jvpglydzgk\",\"tenantId\":\"qeevt\",\"type\":\"None\",\"userAssignedIdentities\":{\"z\":{\"principalId\":\"utnwytpzdmovzvf\",\"clientId\":\"awzqadfl\"}}},\"location\":\"iglaecx\",\"tags\":{\"mlqtmldgxob\":\"icokpv\"},\"id\":\"irclnpk\",\"name\":\"iayz\",\"type\":\"iykhy\"}]}"; + = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"holvdn\",\"availabilityZone\":\"viauogphua\",\"vnetInjection\":{\"subnetId\":\"tvt\",\"vnetId\":\"ukyefchnmnahmnxh\"},\"dataRetentionPeriod\":7955381669451659394,\"provisionedBandwidthMbPerSec\":5906539251383724820,\"provisionedIops\":4272600892482161522,\"avs\":{\"avsEnabled\":false,\"sddcResourceId\":\"xffi\"},\"provisioningState\":\"Deleting\",\"reservationResourceId\":\"wrsnewmozqvbu\",\"platformConsoleSettings\":{\"enabled\":true,\"gui\":{\"enabled\":true},\"api\":{\"enabled\":true},\"cli\":{\"enabled\":true},\"subnets\":[{\"id\":\"zgaz\",\"managementIpAddress\":\"abo\",\"serviceBackendIps\":[\"mfqhppubowse\",\"dfgkmtdh\",\"rngbtcjuahokqtob\"]}],\"defaultUsername\":\"uxofshfphwpnulai\"}},\"identity\":{\"principalId\":\"e\",\"tenantId\":\"whslwkoj\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hyet\":{\"principalId\":\"npdwr\",\"clientId\":\"afgfugsnn\"},\"rmlmuowo\":{\"principalId\":\"ypococtfjgtixr\",\"clientId\":\"zuyt\"},\"pngajin\":{\"principalId\":\"au\",\"clientId\":\"opionszon\"},\"ovne\":{\"principalId\":\"xjawrt\",\"clientId\":\"fjmyccxlzhco\"}}},\"location\":\"enlusfn\",\"tags\":{\"tjvidt\":\"jxtxrdc\",\"uwkasiz\":\"gepuslvyjtc\"},\"id\":\"esfuught\",\"name\":\"qfecjxeygtuhx\",\"type\":\"ic\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,23 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.storagePools().listByResourceGroup("vldspa", com.azure.core.util.Context.NONE); + = manager.storagePools().listByResourceGroup("zpofoiyjwpfilk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("iglaecx", response.iterator().next().location()); - Assertions.assertEquals("icokpv", response.iterator().next().tags().get("mlqtmldgxob")); - Assertions.assertEquals("flvestmjlxrrilo", response.iterator().next().properties().availabilityZone()); - Assertions.assertEquals("apeewchpxlkt", response.iterator().next().properties().vnetInjection().subnetId()); - Assertions.assertEquals("kuziycsle", response.iterator().next().properties().vnetInjection().vnetId()); - Assertions.assertEquals(7273800949722293579L, + Assertions.assertEquals("enlusfn", response.iterator().next().location()); + Assertions.assertEquals("jxtxrdc", response.iterator().next().tags().get("tjvidt")); + Assertions.assertEquals("viauogphua", response.iterator().next().properties().availabilityZone()); + Assertions.assertEquals("tvt", response.iterator().next().properties().vnetInjection().subnetId()); + Assertions.assertEquals("ukyefchnmnahmnxh", response.iterator().next().properties().vnetInjection().vnetId()); + Assertions.assertEquals(5906539251383724820L, response.iterator().next().properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("z", response.iterator().next().properties().reservationResourceId()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("wrsnewmozqvbu", response.iterator().next().properties().reservationResourceId()); + Assertions.assertTrue(response.iterator().next().properties().platformConsoleSettings().enabled()); + Assertions.assertTrue(response.iterator().next().properties().platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(response.iterator().next().properties().platformConsoleSettings().api().enabled()); + Assertions.assertTrue(response.iterator().next().properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("zgaz", + response.iterator().next().properties().platformConsoleSettings().subnets().get(0).id()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, + response.iterator().next().identity().type()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListMockTests.java index 68b750502dcc..709c4aa5befb 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListMockTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListMockTests.java @@ -23,7 +23,7 @@ public final class StoragePoolsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"vjlboxqvk\",\"availabilityZone\":\"lmxhomdyn\",\"vnetInjection\":{\"subnetId\":\"dwdigumb\",\"vnetId\":\"raauzzpt\"},\"dataRetentionPeriod\":6520171368318103183,\"provisionedBandwidthMbPerSec\":8740215687103788004,\"provisionedIops\":694347941979417663,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"vaiqyuvvf\"},\"provisioningState\":\"Deleting\",\"reservationResourceId\":\"p\"},\"identity\":{\"principalId\":\"yik\",\"tenantId\":\"lauyav\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"gnjdgkynscliqhz\":{\"principalId\":\"csttijfybvpoekr\",\"clientId\":\"sgbdhuz\"},\"hihfrbbcevqagtlt\":{\"principalId\":\"xnkomtkubo\",\"clientId\":\"pnvdxz\"},\"nifmzzsdymbrnysu\":{\"principalId\":\"lfkqojpy\",\"clientId\":\"gtrd\"},\"ffwafq\":{\"principalId\":\"prafwgckhoc\",\"clientId\":\"d\"}}},\"location\":\"udaspavehh\",\"tags\":{\"xg\":\"bunzozudh\",\"cdyuibhmfdnbzyd\":\"moy\"},\"id\":\"f\",\"name\":\"fcjnaeoisrvhmgor\",\"type\":\"fukiscvwmzhw\"}]}"; + = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"wmrswnjlxuzrh\",\"availabilityZone\":\"pusxjb\",\"vnetInjection\":{\"subnetId\":\"qehgpd\",\"vnetId\":\"hzjqatucoige\"},\"dataRetentionPeriod\":4113570631758060714,\"provisionedBandwidthMbPerSec\":209556675516595791,\"provisionedIops\":8956842510027719445,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"gfmx\"},\"provisioningState\":\"Canceled\",\"reservationResourceId\":\"g\",\"platformConsoleSettings\":{\"enabled\":false,\"gui\":{\"enabled\":true},\"api\":{\"enabled\":true},\"cli\":{\"enabled\":false},\"subnets\":[{\"id\":\"naquflq\",\"managementIpAddress\":\"tqhamzjrw\",\"serviceBackendIps\":[\"zeqyjleziun\",\"xdfzantkw\",\"eg\",\"amlbnseqacjjvpil\"]},{\"id\":\"uooqjagmdit\",\"managementIpAddress\":\"eiookjbsah\",\"serviceBackendIps\":[\"tpdelqa\"]}],\"defaultUsername\":\"lmotoebnfxofvcj\"}},\"identity\":{\"principalId\":\"irazftxejwabmd\",\"tenantId\":\"tmvcop\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"kffdjktsys\":{\"principalId\":\"urbuhhlkyqltq\",\"clientId\":\"ogtu\"}}},\"location\":\"fvcl\",\"tags\":{\"uijtkbu\":\"n\",\"haru\":\"qogsfikayian\",\"iqxf\":\"t\",\"wkpqhjpenuygbq\":\"yjqtt\"},\"id\":\"qqekewvnqvcdlgu\",\"name\":\"ucmfdj\",\"type\":\"nlaxpunjqikcz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,14 +34,20 @@ public void testList() throws Exception { PagedIterable response = manager.storagePools().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("udaspavehh", response.iterator().next().location()); - Assertions.assertEquals("bunzozudh", response.iterator().next().tags().get("xg")); - Assertions.assertEquals("lmxhomdyn", response.iterator().next().properties().availabilityZone()); - Assertions.assertEquals("dwdigumb", response.iterator().next().properties().vnetInjection().subnetId()); - Assertions.assertEquals("raauzzpt", response.iterator().next().properties().vnetInjection().vnetId()); - Assertions.assertEquals(8740215687103788004L, + Assertions.assertEquals("fvcl", response.iterator().next().location()); + Assertions.assertEquals("n", response.iterator().next().tags().get("uijtkbu")); + Assertions.assertEquals("pusxjb", response.iterator().next().properties().availabilityZone()); + Assertions.assertEquals("qehgpd", response.iterator().next().properties().vnetInjection().subnetId()); + Assertions.assertEquals("hzjqatucoige", response.iterator().next().properties().vnetInjection().vnetId()); + Assertions.assertEquals(209556675516595791L, response.iterator().next().properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("p", response.iterator().next().properties().reservationResourceId()); + Assertions.assertEquals("g", response.iterator().next().properties().reservationResourceId()); + Assertions.assertFalse(response.iterator().next().properties().platformConsoleSettings().enabled()); + Assertions.assertTrue(response.iterator().next().properties().platformConsoleSettings().gui().enabled()); + Assertions.assertTrue(response.iterator().next().properties().platformConsoleSettings().api().enabled()); + Assertions.assertFalse(response.iterator().next().properties().platformConsoleSettings().cli().enabled()); + Assertions.assertEquals("naquflq", + response.iterator().next().properties().platformConsoleSettings().subnets().get(0).id()); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/UserAssignedIdentityTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/UserAssignedIdentityTests.java index 4c66dbbea46a..3d2dc531ee66 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/UserAssignedIdentityTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model - = BinaryData.fromString("{\"principalId\":\"sikvmkqzeqqkdlt\",\"clientId\":\"xmhhvhgureo\"}") + = BinaryData.fromString("{\"principalId\":\"exznelixhnr\",\"clientId\":\"folhbnxknal\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VnetInjectionTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VnetInjectionTests.java index 01a48407cc48..59db4dff269d 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VnetInjectionTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VnetInjectionTests.java @@ -11,17 +11,17 @@ public final class VnetInjectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VnetInjection model = BinaryData.fromString("{\"subnetId\":\"ylpstdbhhxsrzdz\",\"vnetId\":\"cers\"}") + VnetInjection model = BinaryData.fromString("{\"subnetId\":\"kxfbkpycgklwndn\",\"vnetId\":\"jdauwhvy\"}") .toObject(VnetInjection.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.subnetId()); - Assertions.assertEquals("cers", model.vnetId()); + Assertions.assertEquals("kxfbkpycgklwndn", model.subnetId()); + Assertions.assertEquals("jdauwhvy", model.vnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VnetInjection model = new VnetInjection().withSubnetId("ylpstdbhhxsrzdz").withVnetId("cers"); + VnetInjection model = new VnetInjection().withSubnetId("kxfbkpycgklwndn").withVnetId("jdauwhvy"); model = BinaryData.fromObject(model).toObject(VnetInjection.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.subnetId()); - Assertions.assertEquals("cers", model.vnetId()); + Assertions.assertEquals("kxfbkpycgklwndn", model.subnetId()); + Assertions.assertEquals("jdauwhvy", model.vnetId()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupInnerTests.java new file mode 100644 index 000000000000..4b5fc99d4f3e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupInnerTests.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupInner; +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupInner model = BinaryData.fromString( + "{\"properties\":{\"storagePoolInternalId\":\"kdl\",\"volumeGroupInternalId\":\"qfbumlkxtrqjf\",\"sourceVolumeGroupResourceId\":\"lmbtxhwgfwsrt\",\"sourceType\":\"snapshot\",\"sourceSnapshotResourceId\":\"ezbrhubskh\",\"sourceRecoverableVolumeGroupResourceId\":\"ygo\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":9198987496362403320,\"iopsLimit\":3737641645482695688},\"protectionParameters\":{\"retention\":\"PT12H49M1S\",\"frequency\":\"PT76H38M34S\"},\"provisioningState\":\"Failed\"},\"location\":\"luiqtqzfavyvnqq\",\"tags\":{\"yjkqabqgzslesjcb\":\"ryeu\",\"behwagohb\":\"ernntiewdjcvbquw\"},\"id\":\"f\",\"name\":\"kmr\",\"type\":\"emvvhm\"}") + .toObject(VolumeGroupInner.class); + Assertions.assertEquals("luiqtqzfavyvnqq", model.location()); + Assertions.assertEquals("ryeu", model.tags().get("yjkqabqgzslesjcb")); + Assertions.assertEquals("lmbtxhwgfwsrt", model.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeGroupSourceType.SNAPSHOT, model.properties().sourceType()); + Assertions.assertEquals("ezbrhubskh", model.properties().sourceSnapshotResourceId()); + Assertions.assertEquals("ygo", model.properties().sourceRecoverableVolumeGroupResourceId()); + Assertions.assertEquals(9198987496362403320L, + model.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(3737641645482695688L, model.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT12H49M1S"), model.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT76H38M34S"), model.properties().protectionParameters().frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupInner model = new VolumeGroupInner().withLocation("luiqtqzfavyvnqq") + .withTags(mapOf("yjkqabqgzslesjcb", "ryeu", "behwagohb", "ernntiewdjcvbquw")) + .withProperties(new VolumeGroupProperties().withSourceVolumeGroupResourceId("lmbtxhwgfwsrt") + .withSourceType(VolumeGroupSourceType.SNAPSHOT) + .withSourceSnapshotResourceId("ezbrhubskh") + .withSourceRecoverableVolumeGroupResourceId("ygo") + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(9198987496362403320L) + .withIopsLimit(3737641645482695688L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT12H49M1S")) + .withFrequency(Duration.parse("PT76H38M34S")))); + model = BinaryData.fromObject(model).toObject(VolumeGroupInner.class); + Assertions.assertEquals("luiqtqzfavyvnqq", model.location()); + Assertions.assertEquals("ryeu", model.tags().get("yjkqabqgzslesjcb")); + Assertions.assertEquals("lmbtxhwgfwsrt", model.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeGroupSourceType.SNAPSHOT, model.properties().sourceType()); + Assertions.assertEquals("ezbrhubskh", model.properties().sourceSnapshotResourceId()); + Assertions.assertEquals("ygo", model.properties().sourceRecoverableVolumeGroupResourceId()); + Assertions.assertEquals(9198987496362403320L, + model.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(3737641645482695688L, model.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT12H49M1S"), model.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT76H38M34S"), model.properties().protectionParameters().frequency()); + } + + // 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/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupListResultTests.java new file mode 100644 index 000000000000..0014a7848346 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupListResultTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.implementation.models.VolumeGroupListResult; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType; +import java.time.Duration; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"phwzsoldweyuqdu\",\"volumeGroupInternalId\":\"mnnrwr\",\"sourceVolumeGroupResourceId\":\"ork\",\"sourceType\":\"volumeGroup\",\"sourceSnapshotResourceId\":\"wjhhgdnhxmsivf\",\"sourceRecoverableVolumeGroupResourceId\":\"iloxggdufiq\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":5828391548888381928,\"iopsLimit\":1458148723053789844},\"protectionParameters\":{\"retention\":\"PT157H34M37S\",\"frequency\":\"PT178H11M41S\"},\"provisioningState\":\"Canceled\"},\"location\":\"ys\",\"tags\":{\"p\":\"otcubi\",\"izsh\":\"ipwoqonmacjek\",\"gmblrri\":\"vcimpev\"},\"id\":\"bywdxsmicc\",\"name\":\"rwfscjfnynszquj\",\"type\":\"zdvoqytibyowbb\"},{\"properties\":{\"storagePoolInternalId\":\"avu\",\"volumeGroupInternalId\":\"thjoxoism\",\"sourceVolumeGroupResourceId\":\"sbpimlq\",\"sourceType\":\"snapshot\",\"sourceSnapshotResourceId\":\"kcgxxlxsffgcvi\",\"sourceRecoverableVolumeGroupResourceId\":\"zdwlvwlyoupfgfb\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":6967655628120748902,\"iopsLimit\":7578973114042008670},\"protectionParameters\":{\"retention\":\"PT68H28M31S\",\"frequency\":\"PT214H14M58S\"},\"provisioningState\":\"Deleting\"},\"location\":\"wzf\",\"tags\":{\"ctxtgzukxi\":\"ttktlahbq\",\"xrxc\":\"mmqtgqqqxhr\",\"azivjlfrqttbajl\":\"juisavokqdzf\"},\"id\":\"atnwxyiopi\",\"name\":\"kqqfk\",\"type\":\"vscx\"}],\"nextLink\":\"mligov\"}") + .toObject(VolumeGroupListResult.class); + Assertions.assertEquals("ys", model.value().get(0).location()); + Assertions.assertEquals("otcubi", model.value().get(0).tags().get("p")); + Assertions.assertEquals("ork", model.value().get(0).properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeGroupSourceType.VOLUME_GROUP, model.value().get(0).properties().sourceType()); + Assertions.assertEquals("wjhhgdnhxmsivf", model.value().get(0).properties().sourceSnapshotResourceId()); + Assertions.assertEquals("iloxggdufiq", + model.value().get(0).properties().sourceRecoverableVolumeGroupResourceId()); + Assertions.assertEquals(5828391548888381928L, + model.value().get(0).properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(1458148723053789844L, + model.value().get(0).properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT157H34M37S"), + model.value().get(0).properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT178H11M41S"), + model.value().get(0).properties().protectionParameters().frequency()); + Assertions.assertEquals("mligov", model.nextLink()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupOverwriteRequestTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupOverwriteRequestTests.java new file mode 100644 index 000000000000..d5386fbea1c0 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupOverwriteRequestTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupOverwriteRequest; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupOverwriteRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupOverwriteRequest model = BinaryData + .fromString( + "{\"sourceSnapshotResourceId\":\"pmvmemfnczdwvv\",\"sourceVolumeGroupResourceId\":\"alxlllchp\"}") + .toObject(VolumeGroupOverwriteRequest.class); + Assertions.assertEquals("pmvmemfnczdwvv", model.sourceSnapshotResourceId()); + Assertions.assertEquals("alxlllchp", model.sourceVolumeGroupResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupOverwriteRequest model + = new VolumeGroupOverwriteRequest().withSourceSnapshotResourceId("pmvmemfnczdwvv") + .withSourceVolumeGroupResourceId("alxlllchp"); + model = BinaryData.fromObject(model).toObject(VolumeGroupOverwriteRequest.class); + Assertions.assertEquals("pmvmemfnczdwvv", model.sourceSnapshotResourceId()); + Assertions.assertEquals("alxlllchp", model.sourceVolumeGroupResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupPropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupPropertiesTests.java new file mode 100644 index 000000000000..f2d04f7da9ac --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupPropertiesTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType; +import java.time.Duration; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupProperties model = BinaryData.fromString( + "{\"storagePoolInternalId\":\"drjf\",\"volumeGroupInternalId\":\"acoebj\",\"sourceVolumeGroupResourceId\":\"wzcjznmwcpmgua\",\"sourceType\":\"recoverableVolumeGroup\",\"sourceSnapshotResourceId\":\"ufactk\",\"sourceRecoverableVolumeGroupResourceId\":\"zov\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":3236724470840488238,\"iopsLimit\":1494527488794352511},\"protectionParameters\":{\"retention\":\"PT153H8M12S\",\"frequency\":\"PT39M9S\"},\"provisioningState\":\"Succeeded\"}") + .toObject(VolumeGroupProperties.class); + Assertions.assertEquals("wzcjznmwcpmgua", model.sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeGroupSourceType.RECOVERABLE_VOLUME_GROUP, model.sourceType()); + Assertions.assertEquals("ufactk", model.sourceSnapshotResourceId()); + Assertions.assertEquals("zov", model.sourceRecoverableVolumeGroupResourceId()); + Assertions.assertEquals(3236724470840488238L, model.performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(1494527488794352511L, model.performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT153H8M12S"), model.protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT39M9S"), model.protectionParameters().frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupProperties model = new VolumeGroupProperties().withSourceVolumeGroupResourceId("wzcjznmwcpmgua") + .withSourceType(VolumeGroupSourceType.RECOVERABLE_VOLUME_GROUP) + .withSourceSnapshotResourceId("ufactk") + .withSourceRecoverableVolumeGroupResourceId("zov") + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(3236724470840488238L) + .withIopsLimit(1494527488794352511L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT153H8M12S")) + .withFrequency(Duration.parse("PT39M9S"))); + model = BinaryData.fromObject(model).toObject(VolumeGroupProperties.class); + Assertions.assertEquals("wzcjznmwcpmgua", model.sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeGroupSourceType.RECOVERABLE_VOLUME_GROUP, model.sourceType()); + Assertions.assertEquals("ufactk", model.sourceSnapshotResourceId()); + Assertions.assertEquals("zov", model.sourceRecoverableVolumeGroupResourceId()); + Assertions.assertEquals(3236724470840488238L, model.performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(1494527488794352511L, model.performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT153H8M12S"), model.protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT39M9S"), model.protectionParameters().frequency()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotInnerTests.java new file mode 100644 index 000000000000..cf93552a508a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotInnerTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotInner; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotProperties; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupSnapshotInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupSnapshotInner model = BinaryData.fromString( + "{\"properties\":{\"sourceSnapshotResourceId\":\"yxgncxykxhdjhli\",\"createdAt\":\"2021-01-08T22:33:24Z\",\"createdByPolicy\":false,\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-02-16T23:35:43Z\",\"previousName\":\"orxvxcjzhqiz\",\"eradicationTimestamp\":\"2021-02-06T15:19:15Z\"},\"space\":{\"totalUsed\":5052475463760647731,\"unique\":3270173601592761113,\"snapshots\":3252837391835757045,\"shared\":4505259543848038537},\"volumeSnapshots\":[{\"name\":\"juhdqazkmtgguwpi\",\"space\":{\"totalUsed\":2899651316564533149,\"unique\":5791419916882152577,\"snapshots\":5886629369375785334,\"shared\":6883894318237557893},\"provisionedSize\":558684394200646691,\"serialNumber\":\"iwrxgkn\"}],\"provisioningState\":\"Deleting\"},\"id\":\"inzqodfvpgs\",\"name\":\"oxgsgbpfgzdjtx\",\"type\":\"zflbqvg\"}") + .toObject(VolumeGroupSnapshotInner.class); + Assertions.assertEquals("yxgncxykxhdjhli", model.properties().sourceSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupSnapshotInner model = new VolumeGroupSnapshotInner() + .withProperties(new VolumeGroupSnapshotProperties().withSourceSnapshotResourceId("yxgncxykxhdjhli")); + model = BinaryData.fromObject(model).toObject(VolumeGroupSnapshotInner.class); + Assertions.assertEquals("yxgncxykxhdjhli", model.properties().sourceSnapshotResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotListRequestTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotListRequestTests.java new file mode 100644 index 000000000000..d0686c37edc5 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotListRequestTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotListRequest; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupSnapshotListRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupSnapshotListRequest model = BinaryData + .fromString( + "{\"filter\":\"biqtgdq\",\"orderby\":\"mcwsldrizetpwb\",\"top\":1837991897,\"skip\":1155046174}") + .toObject(VolumeGroupSnapshotListRequest.class); + Assertions.assertEquals("biqtgdq", model.filter()); + Assertions.assertEquals("mcwsldrizetpwb", model.orderby()); + Assertions.assertEquals(1837991897, model.top()); + Assertions.assertEquals(1155046174, model.skip()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupSnapshotListRequest model = new VolumeGroupSnapshotListRequest().withFilter("biqtgdq") + .withOrderby("mcwsldrizetpwb") + .withTop(1837991897) + .withSkip(1155046174); + model = BinaryData.fromObject(model).toObject(VolumeGroupSnapshotListRequest.class); + Assertions.assertEquals("biqtgdq", model.filter()); + Assertions.assertEquals("mcwsldrizetpwb", model.orderby()); + Assertions.assertEquals(1837991897, model.top()); + Assertions.assertEquals(1155046174, model.skip()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotListResultTests.java new file mode 100644 index 000000000000..e7662320da70 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotListResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.implementation.models.VolumeGroupSnapshotListResult; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupSnapshotListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupSnapshotListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"sourceSnapshotResourceId\":\"iv\",\"createdAt\":\"2021-07-27T23:48:23Z\",\"createdByPolicy\":false,\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-02-18T11:10:51Z\",\"previousName\":\"xrtikvcpwpgclr\",\"eradicationTimestamp\":\"2021-06-07T01:59:28Z\"},\"space\":{\"totalUsed\":9129949467012960809,\"unique\":3934566350387136818,\"snapshots\":5451887377472245987,\"shared\":1943698242721661529},\"volumeSnapshots\":[{\"name\":\"m\",\"space\":{\"totalUsed\":3829870801328215256,\"unique\":3834497436762407259,\"snapshots\":2315707754428928704,\"shared\":7054600289861372959},\"provisionedSize\":4782407685604656860,\"serialNumber\":\"awaoqvmmbnpqfrt\"},{\"name\":\"lkzmegnitgvkxl\",\"space\":{\"totalUsed\":7756766827744355289,\"unique\":3176503585328331555,\"snapshots\":1360829779802759213,\"shared\":8315615477236104244},\"provisionedSize\":1295494696211960626,\"serialNumber\":\"whcans\"},{\"name\":\"moy\",\"space\":{\"totalUsed\":3312008222834410278,\"unique\":1866997718660945872,\"snapshots\":3846602928357782179,\"shared\":839596753630922738},\"provisionedSize\":8257810868158435043,\"serialNumber\":\"omfaj\"},{\"name\":\"wasqvdaeyyg\",\"space\":{\"totalUsed\":6133994852854779693,\"unique\":1487941149666255010,\"snapshots\":4810165647097023085,\"shared\":8277292798365451719},\"provisionedSize\":5510735422598293936,\"serialNumber\":\"gims\"}],\"provisioningState\":\"Deleting\"},\"id\":\"sicddyvv\",\"name\":\"skgfmocwahpq\",\"type\":\"atjeaahh\"},{\"properties\":{\"sourceSnapshotResourceId\":\"hnakzyb\",\"createdAt\":\"2021-11-17T05:23:09Z\",\"createdByPolicy\":false,\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-08-12T04:28:10Z\",\"previousName\":\"kyxvxevblbjedn\",\"eradicationTimestamp\":\"2021-08-26T01:48:01Z\"},\"space\":{\"totalUsed\":7592252826756292876,\"unique\":787143708098157956,\"snapshots\":4821158431752482124,\"shared\":3654875978787835683},\"volumeSnapshots\":[{\"name\":\"mjbnk\",\"space\":{\"totalUsed\":6340644129016563843,\"unique\":3933133394775341003,\"snapshots\":8795706373981455807,\"shared\":6141882961574128641},\"provisionedSize\":7037876001951104989,\"serialNumber\":\"zg\"},{\"name\":\"klnsrmffey\",\"space\":{\"totalUsed\":2687676301386392289,\"unique\":3223433173766261147,\"snapshots\":6725790923036170541,\"shared\":6119741312822099644},\"provisionedSize\":7578322139455994630,\"serialNumber\":\"ammxqi\"},{\"name\":\"kk\",\"space\":{\"totalUsed\":1789958984488926530,\"unique\":8657211280309706558,\"snapshots\":4913934098591506373,\"shared\":2366436168895450247},\"provisionedSize\":5333354176207044819,\"serialNumber\":\"vavrefdees\"}],\"provisioningState\":\"Accepted\"},\"id\":\"ijpxtx\",\"name\":\"uwprtujwsawd\",\"type\":\"jibabxvititvtze\"},{\"properties\":{\"sourceSnapshotResourceId\":\"vo\",\"createdAt\":\"2021-01-11T06:40:13Z\",\"createdByPolicy\":true,\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-07-20T08:15:13Z\",\"previousName\":\"qbw\",\"eradicationTimestamp\":\"2021-10-22T21:24:54Z\"},\"space\":{\"totalUsed\":6582481104194355063,\"unique\":2335839042688516657,\"snapshots\":8457785154953645967,\"shared\":7692078568165207428},\"volumeSnapshots\":[{\"name\":\"hhxud\",\"space\":{\"totalUsed\":5878408740822273567,\"unique\":33158265554061230,\"snapshots\":3476105471330074630,\"shared\":9188970028494434077},\"provisionedSize\":2281801992884770937,\"serialNumber\":\"z\"},{\"name\":\"mes\",\"space\":{\"totalUsed\":5579035152269151058,\"unique\":8486259057106369538,\"snapshots\":9125844466274989029,\"shared\":6609528242454255958},\"provisionedSize\":7606608761854539250,\"serialNumber\":\"lc\"},{\"name\":\"xwmdboxd\",\"space\":{\"totalUsed\":5413751597691708104,\"unique\":6604130429322702734,\"snapshots\":4577252961697762531,\"shared\":2973392596047775772},\"provisionedSize\":2405028455926654567,\"serialNumber\":\"acgcckknhx\"},{\"name\":\"izvy\",\"space\":{\"totalUsed\":5633654443710491466,\"unique\":7528780867918762439,\"snapshots\":1501738960750782331,\"shared\":149873479955101826},\"provisionedSize\":7910183506498938441,\"serialNumber\":\"nok\"}],\"provisioningState\":\"Canceled\"},\"id\":\"kjq\",\"name\":\"vbroylaxxu\",\"type\":\"cdisd\"},{\"properties\":{\"sourceSnapshotResourceId\":\"jbjsvgjrwh\",\"createdAt\":\"2021-04-04T11:10:54Z\",\"createdByPolicy\":true,\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-08-06T16:32:23Z\",\"previousName\":\"xgccknfnw\",\"eradicationTimestamp\":\"2021-09-18T13:57:49Z\"},\"space\":{\"totalUsed\":4058507600617122162,\"unique\":714189233527640971,\"snapshots\":4849320902219836691,\"shared\":4178875805239136026},\"volumeSnapshots\":[{\"name\":\"a\",\"space\":{\"totalUsed\":7567497502089497349,\"unique\":139470996676573926,\"snapshots\":6535557112338213795,\"shared\":3668993683436233870},\"provisionedSize\":1553799518740160274,\"serialNumber\":\"crjdqnsdfzpbgtg\"},{\"name\":\"ylkdghrje\",\"space\":{\"totalUsed\":1227018782544045486,\"unique\":936542577768609185,\"snapshots\":1758043806434431493,\"shared\":1009311549009303700},\"provisionedSize\":7727093725893197364,\"serialNumber\":\"bwnhhtql\"},{\"name\":\"ehgpp\",\"space\":{\"totalUsed\":5570476078731290428,\"unique\":7501552405577940234,\"snapshots\":1067145587705319922,\"shared\":4565777370436633304},\"provisionedSize\":6741191716385680342,\"serialNumber\":\"xtxj\"}],\"provisioningState\":\"Canceled\"},\"id\":\"afidltugsres\",\"name\":\"kssjhoiftxfk\",\"type\":\"wegprh\"}],\"nextLink\":\"ill\"}") + .toObject(VolumeGroupSnapshotListResult.class); + Assertions.assertEquals("iv", model.value().get(0).properties().sourceSnapshotResourceId()); + Assertions.assertEquals("ill", model.nextLink()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotPostListResultInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotPostListResultInnerTests.java new file mode 100644 index 000000000000..e551e2b9ad3a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotPostListResultInnerTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupSnapshotPostListResultInner; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupSnapshotPostListResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupSnapshotPostListResultInner model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"sourceSnapshotResourceId\":\"hbqzmizakakankjp\",\"createdAt\":\"2021-01-24T05:25:27Z\",\"createdByPolicy\":false,\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-05-28T06:55:36Z\",\"previousName\":\"hjlmu\",\"eradicationTimestamp\":\"2021-05-07T15:16:26Z\"},\"space\":{\"totalUsed\":5307099698841432407,\"unique\":7770760945515751937,\"snapshots\":9155299688767986885,\"shared\":8744366569550226962},\"volumeSnapshots\":[{\"name\":\"cjmeislstvasy\",\"space\":{\"totalUsed\":3861293141992364966,\"unique\":4021129053674716546,\"snapshots\":9189422401055080216,\"shared\":7836828809124615972},\"provisionedSize\":6634575196127684016,\"serialNumber\":\"uufuz\"}],\"provisioningState\":\"Accepted\"},\"id\":\"athwt\",\"name\":\"olbaemwmdx\",\"type\":\"ebwjscjpahlxvea\"}],\"count\":1992463367,\"totalCount\":180775994}") + .toObject(VolumeGroupSnapshotPostListResultInner.class); + Assertions.assertEquals("hbqzmizakakankjp", model.value().get(0).properties().sourceSnapshotResourceId()); + Assertions.assertEquals(1992463367, model.count()); + Assertions.assertEquals(180775994, model.totalCount()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotPropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotPropertiesTests.java new file mode 100644 index 000000000000..823ea0e5f481 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotProperties; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupSnapshotPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupSnapshotProperties model = BinaryData.fromString( + "{\"sourceSnapshotResourceId\":\"vl\",\"createdAt\":\"2021-01-02T10:02:50Z\",\"createdByPolicy\":true,\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-03-05T03:27:21Z\",\"previousName\":\"etnwsdtutnw\",\"eradicationTimestamp\":\"2021-07-12T02:33:43Z\"},\"space\":{\"totalUsed\":7262865565378143928,\"unique\":8287505031249354372,\"snapshots\":6309793722676444539,\"shared\":793469490971138478},\"volumeSnapshots\":[{\"name\":\"ipmve\",\"space\":{\"totalUsed\":8907961782132128735,\"unique\":8109919139634438052,\"snapshots\":8567067499815632576,\"shared\":4852272634133491768},\"provisionedSize\":7170229052989784839,\"serialNumber\":\"dxgketwzhhzjhfj\"},{\"name\":\"hvvmuvgpmun\",\"space\":{\"totalUsed\":1828974423617688269,\"unique\":7044404403763024646,\"snapshots\":8748286705499502370,\"shared\":7774174200378008918},\"provisionedSize\":6599129160288865847,\"serialNumber\":\"hsasbhu\"},{\"name\":\"ypoh\",\"space\":{\"totalUsed\":2798000155301001189,\"unique\":3611131723683837588,\"snapshots\":3866044914607599160,\"shared\":3075885746767216016},\"provisionedSize\":7808085382692454438,\"serialNumber\":\"oobrlttyms\"}],\"provisioningState\":\"Deleting\"}") + .toObject(VolumeGroupSnapshotProperties.class); + Assertions.assertEquals("vl", model.sourceSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupSnapshotProperties model = new VolumeGroupSnapshotProperties().withSourceSnapshotResourceId("vl"); + model = BinaryData.fromObject(model).toObject(VolumeGroupSnapshotProperties.class); + Assertions.assertEquals("vl", model.sourceSnapshotResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsCreateMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsCreateMockTests.java new file mode 100644 index 000000000000..72cb949361a5 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsCreateMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshot; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupSnapshotsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"sourceSnapshotResourceId\":\"gzpraoxnyuffats\",\"createdAt\":\"2021-05-26T07:01:23Z\",\"createdByPolicy\":false,\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-04-22T08:41:55Z\",\"previousName\":\"ubhiqdxyur\",\"eradicationTimestamp\":\"2021-09-08T22:13:45Z\"},\"space\":{\"totalUsed\":3003431067981033050,\"unique\":3902179263706814233,\"snapshots\":9190164702141516565,\"shared\":6904094612591387910},\"volumeSnapshots\":[{\"name\":\"i\",\"space\":{\"totalUsed\":1445946431424437633,\"unique\":2437579960294431174,\"snapshots\":3379655053306892101,\"shared\":4122188769265507714},\"provisionedSize\":4382532019057936776,\"serialNumber\":\"crkdlbn\"}],\"provisioningState\":\"Succeeded\"},\"id\":\"h\",\"name\":\"syhzlwx\",\"type\":\"eaovurexdnds\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + VolumeGroupSnapshot response = manager.volumeGroupSnapshots() + .define("qraswugyxpqitwei") + .withExistingVolumeGroup("goadyedmzr", "jfoknubnoitpkp", "trgdgxvc") + .withProperties(new VolumeGroupSnapshotProperties().withSourceSnapshotResourceId("vskbuhzacaq")) + .create(); + + Assertions.assertEquals("gzpraoxnyuffats", response.properties().sourceSnapshotResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsGetWithResponseMockTests.java new file mode 100644 index 000000000000..15a67125d519 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsGetWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshot; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupSnapshotsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"sourceSnapshotResourceId\":\"bbaedorvvm\",\"createdAt\":\"2021-01-12T15:29:27Z\",\"createdByPolicy\":true,\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-09-06T23:54:43Z\",\"previousName\":\"umgxdgdhpab\",\"eradicationTimestamp\":\"2021-08-07T19:32:43Z\"},\"space\":{\"totalUsed\":487078818297817911,\"unique\":463748606364153067,\"snapshots\":8515901945064809666,\"shared\":24396190351465717},\"volumeSnapshots\":[{\"name\":\"tm\",\"space\":{\"totalUsed\":4964201215388711394,\"unique\":7895575263068629252,\"snapshots\":3562098594806077574,\"shared\":625826574849246251},\"provisionedSize\":4429149097064654737,\"serialNumber\":\"efh\"},{\"name\":\"xcgjokjljnhvlq\",\"space\":{\"totalUsed\":1293263662102456773,\"unique\":6560360410073945587,\"snapshots\":6124102039379894880,\"shared\":1114182945151696420},\"provisionedSize\":8589009432918484089,\"serialNumber\":\"qhjvyklxeslkhhu\"}],\"provisioningState\":\"Deleting\"},\"id\":\"oqmavnwqjwgo\",\"name\":\"nlejjjkxybwf\",\"type\":\"bkjbz\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + VolumeGroupSnapshot response = manager.volumeGroupSnapshots() + .getWithResponse("vvruxwi", "syeipqd", "mjtgrqg", "gkkileplkcsmkn", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("bbaedorvvm", response.properties().sourceSnapshotResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListByVolumeGroupMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListByVolumeGroupMockTests.java new file mode 100644 index 000000000000..2f649edc6dd6 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListByVolumeGroupMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshot; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupSnapshotsListByVolumeGroupMockTests { + @Test + public void testListByVolumeGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"sourceSnapshotResourceId\":\"zwfbcyaykmmfzs\",\"createdAt\":\"2021-02-27T19:41:03Z\",\"createdByPolicy\":false,\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-06-12T18:05:16Z\",\"previousName\":\"wsrsxkrplbja\",\"eradicationTimestamp\":\"2021-04-30T07:00:58Z\"},\"space\":{\"totalUsed\":794425914226467040,\"unique\":6127477052972652880,\"snapshots\":4293819616333583213,\"shared\":1213962015444390254},\"volumeSnapshots\":[{\"name\":\"brnnhjxsqw\",\"space\":{\"totalUsed\":6937576417289541897,\"unique\":7661684546434293571,\"snapshots\":3623682069561644356,\"shared\":245485455742565903},\"provisionedSize\":1381470462297048795,\"serialNumber\":\"yqiq\"},{\"name\":\"hgf\",\"space\":{\"totalUsed\":7927720832966205031,\"unique\":6048456306901522670,\"snapshots\":3198980706234164287,\"shared\":6926773934848202429},\"provisionedSize\":253617259141550801,\"serialNumber\":\"no\"}],\"provisioningState\":\"Failed\"},\"id\":\"uwfbzkkdtnhqsy\",\"name\":\"ljselp\",\"type\":\"pbafvafhlbylc\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.volumeGroupSnapshots() + .listByVolumeGroup("ensvkzykjtj", "nsxfwu", "hcdpkupnqrmgj", "bpkuwxeoio", "fiz", 318050159, 1229023980, + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("zwfbcyaykmmfzs", response.iterator().next().properties().sourceSnapshotResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListSnapshotsWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListSnapshotsWithResponseMockTests.java new file mode 100644 index 000000000000..36b41978c58d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupSnapshotsListSnapshotsWithResponseMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotListRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSnapshotPostListResult; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupSnapshotsListSnapshotsWithResponseMockTests { + @Test + public void testListSnapshotsWithResponse() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"sourceSnapshotResourceId\":\"s\",\"createdAt\":\"2021-09-12T08:30:14Z\",\"createdByPolicy\":false,\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-07-30T02:07:24Z\",\"previousName\":\"bvitvqkjya\",\"eradicationTimestamp\":\"2021-03-25T13:16:27Z\"},\"space\":{\"totalUsed\":8245968715262471950,\"unique\":5525940897759390897,\"snapshots\":9038858199460016040,\"shared\":3742774999158275735},\"volumeSnapshots\":[{\"name\":\"zfnkfexlvxno\"},{\"name\":\"kizvoa\"},{\"name\":\"knaqlnuwig\"}],\"provisioningState\":\"Canceled\"},\"id\":\"ykwphvxzcwxhmpe\",\"name\":\"tl\",\"type\":\"exaonwivkcq\"},{\"properties\":{\"sourceSnapshotResourceId\":\"hxknlccrmmkyupi\",\"createdAt\":\"2021-07-30T09:20:40Z\",\"createdByPolicy\":true,\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-02-10T16:07:26Z\",\"previousName\":\"fqfrkemyildudxja\",\"eradicationTimestamp\":\"2021-07-28T10:47:38Z\"},\"space\":{\"totalUsed\":634012631292957654,\"unique\":8092017430525315059,\"snapshots\":8948738934192393497,\"shared\":5793318342626519110},\"volumeSnapshots\":[{\"name\":\"lkksnmgzvyfi\"},{\"name\":\"dkz\"}],\"provisioningState\":\"Succeeded\"},\"id\":\"sith\",\"name\":\"q\",\"type\":\"ly\"},{\"properties\":{\"sourceSnapshotResourceId\":\"uqwqulsutrjbhxyk\",\"createdAt\":\"2021-01-05T17:55:45Z\",\"createdByPolicy\":false,\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-04-02T18:01:44Z\",\"previousName\":\"g\",\"eradicationTimestamp\":\"2021-11-02T15:06:31Z\"},\"space\":{\"totalUsed\":5629526306996291451,\"unique\":1786589388434980919,\"snapshots\":3221619392259941147,\"shared\":798811341522580180},\"volumeSnapshots\":[{\"name\":\"owtljvfw\"},{\"name\":\"reagkhyxvrqt\"},{\"name\":\"bczsulmdgglmepjp\"},{\"name\":\"s\"}],\"provisioningState\":\"Failed\"},\"id\":\"sa\",\"name\":\"gpszngafpg\",\"type\":\"lkvec\"}],\"count\":467125688,\"totalCount\":608285321}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + VolumeGroupSnapshotPostListResult response = manager.volumeGroupSnapshots() + .listSnapshotsWithResponse("bevxrhyzd", "wrso", "pl", + new VolumeGroupSnapshotListRequest().withFilter("bmairrhvhfnracwn") + .withOrderby("igtuu") + .withTop(655695841) + .withSkip(1503545228), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("s", response.value().get(0).properties().sourceSnapshotResourceId()); + Assertions.assertEquals(467125688, response.count()); + Assertions.assertEquals(608285321, response.totalCount()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupStatusInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupStatusInnerTests.java new file mode 100644 index 000000000000..e262c290dcd8 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupStatusInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeGroupStatusInner; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupStatusInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupStatusInner model = BinaryData.fromString( + "{\"space\":{\"totalUsed\":1647179486187324441,\"unique\":8397070858646825861,\"snapshots\":986144501680338970,\"shared\":4087094898287145867},\"connectedHostCount\":864919134}") + .toObject(VolumeGroupStatusInner.class); + Assertions.assertEquals(1647179486187324441L, model.space().totalUsed()); + Assertions.assertEquals(8397070858646825861L, model.space().unique()); + Assertions.assertEquals(986144501680338970L, model.space().snapshots()); + Assertions.assertEquals(4087094898287145867L, model.space().shared()); + Assertions.assertEquals(864919134, model.connectedHostCount()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupUpdatePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupUpdatePropertiesTests.java new file mode 100644 index 000000000000..ca7134da555d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupUpdatePropertiesTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdateProperties; +import java.time.Duration; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupUpdateProperties model = BinaryData.fromString( + "{\"performanceParameters\":{\"bandwidthLimitMbPerSec\":6041984448925911562,\"iopsLimit\":3721170241539736815},\"protectionParameters\":{\"retention\":\"PT134H33M20S\",\"frequency\":\"PT206H2M44S\"}}") + .toObject(VolumeGroupUpdateProperties.class); + Assertions.assertEquals(6041984448925911562L, model.performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(3721170241539736815L, model.performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT134H33M20S"), model.protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT206H2M44S"), model.protectionParameters().frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupUpdateProperties model = new VolumeGroupUpdateProperties() + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(6041984448925911562L) + .withIopsLimit(3721170241539736815L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT134H33M20S")) + .withFrequency(Duration.parse("PT206H2M44S"))); + model = BinaryData.fromObject(model).toObject(VolumeGroupUpdateProperties.class); + Assertions.assertEquals(6041984448925911562L, model.performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(3721170241539736815L, model.performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT134H33M20S"), model.protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT206H2M44S"), model.protectionParameters().frequency()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupUpdateTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupUpdateTests.java new file mode 100644 index 000000000000..2ff7d8c01ecc --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupUpdateTests.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdate; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupUpdateProperties; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class VolumeGroupUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeGroupUpdate model = BinaryData.fromString( + "{\"tags\":{\"utujba\":\"lenrd\",\"orwmduvwpklv\":\"pjuohminyfl\",\"ygdxpgpqchis\":\"w\",\"bjcrxgibbdaxco\":\"epn\"},\"properties\":{\"performanceParameters\":{\"bandwidthLimitMbPerSec\":2303455502372916888,\"iopsLimit\":3754579921352518306},\"protectionParameters\":{\"retention\":\"PT53H2M18S\",\"frequency\":\"PT7H1M30S\"}}}") + .toObject(VolumeGroupUpdate.class); + Assertions.assertEquals("lenrd", model.tags().get("utujba")); + Assertions.assertEquals(2303455502372916888L, + model.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(3754579921352518306L, model.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT53H2M18S"), model.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT7H1M30S"), model.properties().protectionParameters().frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupUpdate model = new VolumeGroupUpdate() + .withTags( + mapOf("utujba", "lenrd", "orwmduvwpklv", "pjuohminyfl", "ygdxpgpqchis", "w", "bjcrxgibbdaxco", "epn")) + .withProperties(new VolumeGroupUpdateProperties() + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(2303455502372916888L) + .withIopsLimit(3754579921352518306L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT53H2M18S")) + .withFrequency(Duration.parse("PT7H1M30S")))); + model = BinaryData.fromObject(model).toObject(VolumeGroupUpdate.class); + Assertions.assertEquals("lenrd", model.tags().get("utujba")); + Assertions.assertEquals(2303455502372916888L, + model.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(3754579921352518306L, model.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT53H2M18S"), model.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT7H1M30S"), model.properties().protectionParameters().frequency()); + } + + // 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/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateMockTests.java new file mode 100644 index 000000000000..7f36f9dceba8 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateMockTests.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"storagePoolInternalId\":\"ygaolnjpnnb\",\"volumeGroupInternalId\":\"ksibjgsjjxx\",\"sourceVolumeGroupResourceId\":\"mr\",\"sourceType\":\"volumeGroup\",\"sourceSnapshotResourceId\":\"yqegx\",\"sourceRecoverableVolumeGroupResourceId\":\"vpinbmhwbj\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":2985268787925124036,\"iopsLimit\":7996102492362131367},\"protectionParameters\":{\"retention\":\"PT86H35M11S\",\"frequency\":\"PT110H2M14S\"},\"provisioningState\":\"Succeeded\"},\"location\":\"ujvaannggi\",\"tags\":{\"wfekaumrrqmb\":\"kdtaaw\",\"bnxwbjsidbirkf\":\"mqkra\",\"dgo\":\"kso\"},\"id\":\"ewijymrhbguz\",\"name\":\"zkye\",\"type\":\"nfnzhhh\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + VolumeGroup response = manager.volumeGroups() + .define("npxqwodi") + .withRegion("ttxpnrupza") + .withExistingStoragePool("xjcmmzrrsc", "biwsd") + .withTags(mapOf("swyskbruffg", "dixtreki", "lcouqehbhbcdszir", "lukkutvlxhrpqhvm")) + .withProperties(new VolumeGroupProperties().withSourceVolumeGroupResourceId("cyefoyzbamwine") + .withSourceType(VolumeGroupSourceType.SNAPSHOT) + .withSourceSnapshotResourceId("kak") + .withSourceRecoverableVolumeGroupResourceId("ldtve") + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(1969122542815354620L) + .withIopsLimit(5615001113903101303L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT121H20M6S")) + .withFrequency(Duration.parse("PT162H49M16S")))) + .create(); + + Assertions.assertEquals("ujvaannggi", response.location()); + Assertions.assertEquals("kdtaaw", response.tags().get("wfekaumrrqmb")); + Assertions.assertEquals("mr", response.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeGroupSourceType.VOLUME_GROUP, response.properties().sourceType()); + Assertions.assertEquals("yqegx", response.properties().sourceSnapshotResourceId()); + Assertions.assertEquals("vpinbmhwbj", response.properties().sourceRecoverableVolumeGroupResourceId()); + Assertions.assertEquals(2985268787925124036L, + response.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(7996102492362131367L, response.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT86H35M11S"), + response.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT110H2M14S"), + response.properties().protectionParameters().frequency()); + } + + // 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/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetStatusWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetStatusWithResponseMockTests.java new file mode 100644 index 000000000000..60dc12683d10 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetStatusWithResponseMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupsGetStatusWithResponseMockTests { + @Test + public void testGetStatusWithResponse() throws Exception { + String responseStr + = "{\"space\":{\"totalUsed\":8329988246873401375,\"unique\":4243574362843562853,\"snapshots\":1681972863105027832,\"shared\":3617358359862666203},\"connectedHostCount\":1068696548}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + VolumeGroupStatus response = manager.volumeGroups() + .getStatusWithResponse("jchnta", "faymxbulpz", "albmqkyojwyvfk", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(8329988246873401375L, response.space().totalUsed()); + Assertions.assertEquals(4243574362843562853L, response.space().unique()); + Assertions.assertEquals(1681972863105027832L, response.space().snapshots()); + Assertions.assertEquals(3617358359862666203L, response.space().shared()); + Assertions.assertEquals(1068696548, response.connectedHostCount()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetWithResponseMockTests.java new file mode 100644 index 000000000000..afe4f088b38d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetWithResponseMockTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"storagePoolInternalId\":\"mknbnxwcdommpv\",\"volumeGroupInternalId\":\"awz\",\"sourceVolumeGroupResourceId\":\"brttuiacl\",\"sourceType\":\"volumeGroup\",\"sourceSnapshotResourceId\":\"hajlfn\",\"sourceRecoverableVolumeGroupResourceId\":\"iqfyuttdi\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":2836499147655086338,\"iopsLimit\":5137579880157949112},\"protectionParameters\":{\"retention\":\"PT51H36M10S\",\"frequency\":\"PT152H10M15S\"},\"provisioningState\":\"Deleting\"},\"location\":\"wwgzwxjlmecvog\",\"tags\":{\"fg\":\"yvneeza\",\"rkjjjavfqnvhnq\":\"tmoqqtlffhzb\",\"vidbztjhqtfb\":\"ewdogiyetesy\",\"etnjuhpsprkz\":\"vnynkb\"},\"id\":\"aupia\",\"name\":\"cxnafbwqrooh\",\"type\":\"uovmaonurjt\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + VolumeGroup response = manager.volumeGroups() + .getWithResponse("uzivensrpmeyyvp", "patlbijp", "gsksrfhf", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("wwgzwxjlmecvog", response.location()); + Assertions.assertEquals("yvneeza", response.tags().get("fg")); + Assertions.assertEquals("brttuiacl", response.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeGroupSourceType.VOLUME_GROUP, response.properties().sourceType()); + Assertions.assertEquals("hajlfn", response.properties().sourceSnapshotResourceId()); + Assertions.assertEquals("iqfyuttdi", response.properties().sourceRecoverableVolumeGroupResourceId()); + Assertions.assertEquals(2836499147655086338L, + response.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(5137579880157949112L, response.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT51H36M10S"), + response.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT152H10M15S"), + response.properties().protectionParameters().frequency()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListByStoragePoolMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListByStoragePoolMockTests.java new file mode 100644 index 000000000000..910457bbb66e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListByStoragePoolMockTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroup; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupSourceType; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupsListByStoragePoolMockTests { + @Test + public void testListByStoragePool() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"storagePoolInternalId\":\"lt\",\"volumeGroupInternalId\":\"juscvsfx\",\"sourceVolumeGroupResourceId\":\"ctmgxuupbezqccy\",\"sourceType\":\"none\",\"sourceSnapshotResourceId\":\"eukdqkkyih\",\"sourceRecoverableVolumeGroupResourceId\":\"geqmgqzgwldoych\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":6090826264173048120,\"iopsLimit\":3544355500089917382},\"protectionParameters\":{\"retention\":\"PT217H25M36S\",\"frequency\":\"PT228H52M34S\"},\"provisioningState\":\"Succeeded\"},\"location\":\"h\",\"tags\":{\"ac\":\"llizs\",\"wqejpmvsse\":\"jvhrweft\",\"upeuknijduyye\":\"aepwamcxtcz\"},\"id\":\"pydjfboc\",\"name\":\"v\",\"type\":\"hulrtywikdmhla\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.volumeGroups().listByStoragePool("mghihp", "ecmslclbl", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("h", response.iterator().next().location()); + Assertions.assertEquals("llizs", response.iterator().next().tags().get("ac")); + Assertions.assertEquals("ctmgxuupbezqccy", + response.iterator().next().properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeGroupSourceType.NONE, response.iterator().next().properties().sourceType()); + Assertions.assertEquals("eukdqkkyih", response.iterator().next().properties().sourceSnapshotResourceId()); + Assertions.assertEquals("geqmgqzgwldoych", + response.iterator().next().properties().sourceRecoverableVolumeGroupResourceId()); + Assertions.assertEquals(6090826264173048120L, + response.iterator().next().properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(3544355500089917382L, + response.iterator().next().properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT217H25M36S"), + response.iterator().next().properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT228H52M34S"), + response.iterator().next().properties().protectionParameters().frequency()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListConnectionParametersWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListConnectionParametersWithResponseMockTests.java new file mode 100644 index 000000000000..b340dc63dcc1 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListConnectionParametersWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.ConnectionParametersResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumeGroupsListConnectionParametersWithResponseMockTests { + @Test + public void testListConnectionParametersWithResponse() throws Exception { + String responseStr + = "{\"iscsi\":{\"endpoints\":[{\"ip\":\"zoeo\",\"port\":1305732905,\"iqn\":\"vjhvefgwbm\"}]}}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ConnectionParametersResponse response = manager.volumeGroups() + .listConnectionParametersWithResponse("uflgbhgauacdixm", "ufr", "ryjqgdkf", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("zoeo", response.iscsi().endpoints().get(0).ip()); + Assertions.assertEquals(1305732905, response.iscsi().endpoints().get(0).port()); + Assertions.assertEquals("vjhvefgwbm", response.iscsi().endpoints().get(0).iqn()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeInnerTests.java new file mode 100644 index 000000000000..8f8214b9a035 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeInnerTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner; +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +import com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotSource; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; +import org.junit.jupiter.api.Assertions; + +public final class VolumeInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeInner model = BinaryData.fromString( + "{\"properties\":{\"space\":{\"totalUsed\":5164618573145789870,\"unique\":5385185048993104627,\"snapshots\":8978405524874438339,\"shared\":3112819342949717126},\"provisionedSize\":4609142412513709253,\"serialNumber\":\"vsjcswsmystuluqy\",\"createdAt\":\"2021-07-06T16:20:37Z\",\"sourceVolumeResourceId\":\"lerchpq\",\"sourceVolumeGroupResourceId\":\"f\",\"sourceType\":\"none\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"bwidfcxsspuunn\",\"volumeSnapshotName\":\"xyh\"},\"sourceSerialNumber\":\"g\",\"sourceRecoverableVolumeResourceId\":\"drihpfhoqcaaewda\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-07-05T17:34:11Z\",\"previousName\":\"pjxxkzb\",\"eradicationTimestamp\":\"2021-07-29T14:30:38Z\"},\"provisioningState\":\"Failed\"},\"id\":\"vsiykzkdncjdxon\",\"name\":\"zoggculapz\",\"type\":\"y\"}") + .toObject(VolumeInner.class); + Assertions.assertEquals(4609142412513709253L, model.properties().provisionedSize()); + Assertions.assertEquals("lerchpq", model.properties().sourceVolumeResourceId()); + Assertions.assertEquals("f", model.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeSourceType.NONE, model.properties().sourceType()); + Assertions.assertEquals("bwidfcxsspuunn", + model.properties().sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("xyh", model.properties().sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("g", model.properties().sourceSerialNumber()); + Assertions.assertEquals("drihpfhoqcaaewda", model.properties().sourceRecoverableVolumeResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeInner model + = new VolumeInner().withProperties(new AzureVolumeProperties().withProvisionedSize(4609142412513709253L) + .withSourceVolumeResourceId("lerchpq") + .withSourceVolumeGroupResourceId("f") + .withSourceType(VolumeSourceType.NONE) + .withSourceVolumeSnapshot(new VolumeSnapshotSource().withVolumeGroupSnapshotResourceId("bwidfcxsspuunn") + .withVolumeSnapshotName("xyh")) + .withSourceSerialNumber("g") + .withSourceRecoverableVolumeResourceId("drihpfhoqcaaewda")); + model = BinaryData.fromObject(model).toObject(VolumeInner.class); + Assertions.assertEquals(4609142412513709253L, model.properties().provisionedSize()); + Assertions.assertEquals("lerchpq", model.properties().sourceVolumeResourceId()); + Assertions.assertEquals("f", model.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeSourceType.NONE, model.properties().sourceType()); + Assertions.assertEquals("bwidfcxsspuunn", + model.properties().sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("xyh", model.properties().sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("g", model.properties().sourceSerialNumber()); + Assertions.assertEquals("drihpfhoqcaaewda", model.properties().sourceRecoverableVolumeResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeLimitsTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeLimitsTests.java index afa865ce8372..667179f4200a 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeLimitsTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeLimitsTests.java @@ -12,9 +12,9 @@ public final class VolumeLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeLimits model - = BinaryData.fromString("{\"provisionedSize\":{\"min\":4526568806695806079,\"max\":918544931908903685}}") + = BinaryData.fromString("{\"provisionedSize\":{\"min\":427909718246627778,\"max\":6452586290893910496}}") .toObject(VolumeLimits.class); - Assertions.assertEquals(4526568806695806079L, model.provisionedSize().min()); - Assertions.assertEquals(918544931908903685L, model.provisionedSize().max()); + Assertions.assertEquals(427909718246627778L, model.provisionedSize().min()); + Assertions.assertEquals(6452586290893910496L, model.provisionedSize().max()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeListResultTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeListResultTests.java new file mode 100644 index 000000000000..9349ad2db410 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeListResultTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.implementation.models.VolumeListResult; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; +import org.junit.jupiter.api.Assertions; + +public final class VolumeListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"space\":{\"totalUsed\":463203845595880149,\"unique\":1882372627701234548,\"snapshots\":6958921108876978916,\"shared\":703774380341403145},\"provisionedSize\":1991609817956957761,\"serialNumber\":\"vu\",\"createdAt\":\"2021-06-26T17:11:18Z\",\"sourceVolumeResourceId\":\"cktyh\",\"sourceVolumeGroupResourceId\":\"qedcgzulwm\",\"sourceType\":\"recoverableVolume\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"zrrjvpgly\",\"volumeSnapshotName\":\"zgkrvqe\"},\"sourceSerialNumber\":\"toepryu\",\"sourceRecoverableVolumeResourceId\":\"wytpzdmovz\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-04-03T17:18:44Z\",\"previousName\":\"zqadf\",\"eradicationTimestamp\":\"2021-07-15T18:15:52Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"glae\",\"name\":\"xndticokpvzmlqtm\",\"type\":\"dgxobfircl\"},{\"properties\":{\"space\":{\"totalUsed\":4446387025967127401,\"unique\":4792946731310711053,\"snapshots\":7574999034676246955,\"shared\":4767053638441284929},\"provisionedSize\":2638896199399411626,\"serialNumber\":\"wf\",\"createdAt\":\"2021-09-09T23:45:53Z\",\"sourceVolumeResourceId\":\"oxqvkjlmxhomdynh\",\"sourceVolumeGroupResourceId\":\"digumbnr\",\"sourceType\":\"snapshot\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"zptjazysd\",\"volumeSnapshotName\":\"hezwwvaiq\"},\"sourceSerialNumber\":\"vv\",\"sourceRecoverableVolumeResourceId\":\"nk\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2020-12-22T05:58:08Z\",\"previousName\":\"kvylauyavl\",\"eradicationTimestamp\":\"2021-04-17T07:31:38Z\"},\"provisioningState\":\"Accepted\"},\"id\":\"ttijfybvpoekrs\",\"name\":\"sgbdhuz\",\"type\":\"gnjdgkynscliqhz\"},{\"properties\":{\"space\":{\"totalUsed\":2288883432059892927,\"unique\":6655292245170296205,\"snapshots\":620897221549417842,\"shared\":33264543630937640},\"provisionedSize\":4043359579426698154,\"serialNumber\":\"nvdxzxhihfrbbc\",\"createdAt\":\"2021-01-24T22:47:35Z\",\"sourceVolumeResourceId\":\"gtltdhlf\",\"sourceVolumeGroupResourceId\":\"ojpykvgtrdc\",\"sourceType\":\"recoverableVolume\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"zzsdym\",\"volumeSnapshotName\":\"rnysux\"},\"sourceSerialNumber\":\"rafwgckhocxvdf\",\"sourceRecoverableVolumeResourceId\":\"wafqroud\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-08-21T06:21:18Z\",\"previousName\":\"h\",\"eradicationTimestamp\":\"2021-07-31T01:35:35Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"n\",\"name\":\"oz\",\"type\":\"dhcxgkmoy\"},{\"properties\":{\"space\":{\"totalUsed\":5828382130633681813,\"unique\":6989479455559512040,\"snapshots\":7989786417456516086,\"shared\":2557149039383671323},\"provisionedSize\":2086600607092923630,\"serialNumber\":\"dvfvfcjnaeoi\",\"createdAt\":\"2021-04-06T16:13:31Z\",\"sourceVolumeResourceId\":\"mgorffukisc\",\"sourceVolumeGroupResourceId\":\"mzhwplefaxvxi\",\"sourceType\":\"volume\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"gnhnzeyq\",\"volumeSnapshotName\":\"tjj\"},\"sourceSerialNumber\":\"qlqhycavodg\",\"sourceRecoverableVolumeResourceId\":\"dbeesmie\",\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-08-23T03:30:29Z\",\"previousName\":\"iaa\",\"eradicationTimestamp\":\"2021-11-28T06:42:14Z\"},\"provisioningState\":\"Failed\"},\"id\":\"dwqf\",\"name\":\"ylyrfgiagtco\",\"type\":\"ocqwogfnzjvus\"}],\"nextLink\":\"ld\"}") + .toObject(VolumeListResult.class); + Assertions.assertEquals(1991609817956957761L, model.value().get(0).properties().provisionedSize()); + Assertions.assertEquals("cktyh", model.value().get(0).properties().sourceVolumeResourceId()); + Assertions.assertEquals("qedcgzulwm", model.value().get(0).properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeSourceType.RECOVERABLE_VOLUME, model.value().get(0).properties().sourceType()); + Assertions.assertEquals("zrrjvpgly", + model.value().get(0).properties().sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("zgkrvqe", + model.value().get(0).properties().sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("toepryu", model.value().get(0).properties().sourceSerialNumber()); + Assertions.assertEquals("wytpzdmovz", model.value().get(0).properties().sourceRecoverableVolumeResourceId()); + Assertions.assertEquals("ld", model.nextLink()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeOverwriteRequestTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeOverwriteRequestTests.java new file mode 100644 index 000000000000..ae224daa668b --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeOverwriteRequestTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.VolumeOverwriteRequest; +import com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotSource; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; +import org.junit.jupiter.api.Assertions; + +public final class VolumeOverwriteRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeOverwriteRequest model = BinaryData.fromString( + "{\"sourceType\":\"volume\",\"sourceVolumeGroupResourceId\":\"uxylfsbtkadpy\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"wn\",\"volumeSnapshotName\":\"tgkbugrjqctojc\"},\"sourceSerialNumber\":\"sofieypefojyqd\",\"sourceVolumeResourceId\":\"u\"}") + .toObject(VolumeOverwriteRequest.class); + Assertions.assertEquals(VolumeSourceType.VOLUME, model.sourceType()); + Assertions.assertEquals("uxylfsbtkadpy", model.sourceVolumeGroupResourceId()); + Assertions.assertEquals("wn", model.sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("tgkbugrjqctojc", model.sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("sofieypefojyqd", model.sourceSerialNumber()); + Assertions.assertEquals("u", model.sourceVolumeResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeOverwriteRequest model = new VolumeOverwriteRequest().withSourceType(VolumeSourceType.VOLUME) + .withSourceVolumeGroupResourceId("uxylfsbtkadpy") + .withSourceVolumeSnapshot(new VolumeSnapshotSource().withVolumeGroupSnapshotResourceId("wn") + .withVolumeSnapshotName("tgkbugrjqctojc")) + .withSourceSerialNumber("sofieypefojyqd") + .withSourceVolumeResourceId("u"); + model = BinaryData.fromObject(model).toObject(VolumeOverwriteRequest.class); + Assertions.assertEquals(VolumeSourceType.VOLUME, model.sourceType()); + Assertions.assertEquals("uxylfsbtkadpy", model.sourceVolumeGroupResourceId()); + Assertions.assertEquals("wn", model.sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("tgkbugrjqctojc", model.sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("sofieypefojyqd", model.sourceSerialNumber()); + Assertions.assertEquals("u", model.sourceVolumeResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumePropertiesTests.java index 9b75f71c221f..e614759521d2 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumePropertiesTests.java +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumePropertiesTests.java @@ -12,8 +12,8 @@ public final class VolumePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeProperties model = BinaryData.fromString( - "{\"storagePoolInternalId\":\"aivwitqscywu\",\"storagePoolResourceId\":\"woluhczbwemhair\",\"volumeInternalId\":\"rgzdwmsweyp\",\"displayName\":\"dxggicccnxqhuexm\",\"space\":{\"totalUsed\":3156915060684863023,\"unique\":6329699081347667156,\"snapshots\":3065309169479098927,\"shared\":8425311151798703351},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"mhzrn\"},\"createdTimestamp\":\"dtclusiypb\",\"provisionedSize\":3348711626603759532,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"sl\",\"diskName\":\"eadcygqukyhejhz\",\"folder\":\"sx\",\"avsVmInternalId\":\"fpel\",\"avsVmResourceId\":\"lppvksrpq\",\"avsVmName\":\"ujzra\",\"avsStorageContainerResourceId\":\"htwdwrftswibyrcd\"},\"provisioningState\":\"Failed\"}") + "{\"storagePoolInternalId\":\"rfdwoyu\",\"storagePoolResourceId\":\"ziuiefozbhdm\",\"volumeInternalId\":\"l\",\"displayName\":\"qhoftrmaequiah\",\"space\":{\"totalUsed\":8019424807793011172,\"unique\":7362779030746859122,\"snapshots\":5475411267046068461,\"shared\":6940065807913814544},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"yylhalnswhccsp\"},\"createdTimestamp\":\"aivwitqscywu\",\"provisionedSize\":7899440760081636989,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"czbwemhairsbr\",\"diskName\":\"z\",\"folder\":\"wmsweypqwd\",\"avsVmInternalId\":\"ggicccnxqhue\",\"avsVmResourceId\":\"mkttlstvlzywem\",\"avsVmName\":\"zrncsdt\",\"avsStorageContainerResourceId\":\"lusiy\"},\"provisioningState\":\"Failed\"}") .toObject(VolumeProperties.class); - Assertions.assertFalse(model.softDeletion().destroyed()); + Assertions.assertTrue(model.softDeletion().destroyed()); } } diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeSnapshotInfoTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeSnapshotInfoTests.java new file mode 100644 index 000000000000..4ae09c132e0e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeSnapshotInfoTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotInfo; + +public final class VolumeSnapshotInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeSnapshotInfo model = BinaryData.fromString( + "{\"name\":\"gqdnfwqzd\",\"space\":{\"totalUsed\":6824838811661161914,\"unique\":1556043116493772567,\"snapshots\":8411386465772459775,\"shared\":7115029312461679715},\"provisionedSize\":7313105022887427849,\"serialNumber\":\"vi\"}") + .toObject(VolumeSnapshotInfo.class); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeSnapshotSourceTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeSnapshotSourceTests.java new file mode 100644 index 000000000000..2589f628db43 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeSnapshotSourceTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotSource; +import org.junit.jupiter.api.Assertions; + +public final class VolumeSnapshotSourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeSnapshotSource model = BinaryData + .fromString("{\"volumeGroupSnapshotResourceId\":\"eqvldspast\",\"volumeSnapshotName\":\"bkkd\"}") + .toObject(VolumeSnapshotSource.class); + Assertions.assertEquals("eqvldspast", model.volumeGroupSnapshotResourceId()); + Assertions.assertEquals("bkkd", model.volumeSnapshotName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeSnapshotSource model + = new VolumeSnapshotSource().withVolumeGroupSnapshotResourceId("eqvldspast").withVolumeSnapshotName("bkkd"); + model = BinaryData.fromObject(model).toObject(VolumeSnapshotSource.class); + Assertions.assertEquals("eqvldspast", model.volumeGroupSnapshotResourceId()); + Assertions.assertEquals("bkkd", model.volumeSnapshotName()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeUpdatePropertiesTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeUpdatePropertiesTests.java new file mode 100644 index 000000000000..cacaabfd2905 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeUpdatePropertiesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class VolumeUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeUpdateProperties model + = BinaryData.fromString("{\"provisionedSize\":2016702722100674013}").toObject(VolumeUpdateProperties.class); + Assertions.assertEquals(2016702722100674013L, model.provisionedSize()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeUpdateProperties model = new VolumeUpdateProperties().withProvisionedSize(2016702722100674013L); + model = BinaryData.fromObject(model).toObject(VolumeUpdateProperties.class); + Assertions.assertEquals(2016702722100674013L, model.provisionedSize()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeUpdateTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeUpdateTests.java new file mode 100644 index 000000000000..a6f5e83a6a48 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeUpdateTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdate; +import com.azure.resourcemanager.purestorageblock.models.VolumeUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class VolumeUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeUpdate model = BinaryData.fromString("{\"properties\":{\"provisionedSize\":3000055829145832796}}") + .toObject(VolumeUpdate.class); + Assertions.assertEquals(3000055829145832796L, model.properties().provisionedSize()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeUpdate model + = new VolumeUpdate().withProperties(new VolumeUpdateProperties().withProvisionedSize(3000055829145832796L)); + model = BinaryData.fromObject(model).toObject(VolumeUpdate.class); + Assertions.assertEquals(3000055829145832796L, model.properties().provisionedSize()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesCreateMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesCreateMockTests.java new file mode 100644 index 000000000000..862062f4ddf2 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesCreateMockTests.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +import com.azure.resourcemanager.purestorageblock.models.Volume; +import com.azure.resourcemanager.purestorageblock.models.VolumeSnapshotSource; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumesCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"space\":{\"totalUsed\":7272701627069650879,\"unique\":2472774019659326082,\"snapshots\":7933391244988575874,\"shared\":8684909044016683484},\"provisionedSize\":3402203405839683593,\"serialNumber\":\"lz\",\"createdAt\":\"2021-07-17T07:38:44Z\",\"sourceVolumeResourceId\":\"pgvdwnapfdqw\",\"sourceVolumeGroupResourceId\":\"ftptnuwj\",\"sourceType\":\"recoverableVolume\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"h\",\"volumeSnapshotName\":\"cgqyhleseyq\"},\"sourceSerialNumber\":\"vyeldot\",\"sourceRecoverableVolumeResourceId\":\"dkwisw\",\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-10-06T19:19:04Z\",\"previousName\":\"asbvw\",\"eradicationTimestamp\":\"2021-10-11T15:26:48Z\"},\"provisioningState\":\"Succeeded\"},\"id\":\"dtxfkndlqvtwknvg\",\"name\":\"mb\",\"type\":\"gtywatmqaqkue\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Volume response = manager.volumes() + .define("blxydkxr") + .withExistingVolumeGroup("tl", "uhqawmoaianc", "nvodrrs") + .withProperties(new AzureVolumeProperties().withProvisionedSize(4574022459670740011L) + .withSourceVolumeResourceId("urqlrqffawey") + .withSourceVolumeGroupResourceId("kphyjdxrav") + .withSourceType(VolumeSourceType.NONE) + .withSourceVolumeSnapshot(new VolumeSnapshotSource().withVolumeGroupSnapshotResourceId("brxmrgch") + .withVolumeSnapshotName("apx")) + .withSourceSerialNumber("y") + .withSourceRecoverableVolumeResourceId("j")) + .create(); + + Assertions.assertEquals(3402203405839683593L, response.properties().provisionedSize()); + Assertions.assertEquals("pgvdwnapfdqw", response.properties().sourceVolumeResourceId()); + Assertions.assertEquals("ftptnuwj", response.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeSourceType.RECOVERABLE_VOLUME, response.properties().sourceType()); + Assertions.assertEquals("h", response.properties().sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("cgqyhleseyq", response.properties().sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("vyeldot", response.properties().sourceSerialNumber()); + Assertions.assertEquals("dkwisw", response.properties().sourceRecoverableVolumeResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesGetWithResponseMockTests.java new file mode 100644 index 000000000000..cd2da377d7b0 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesGetWithResponseMockTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.Volume; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"space\":{\"totalUsed\":3497541113855101252,\"unique\":8889561514355390788,\"snapshots\":5499743059471221914,\"shared\":4097196550705529487},\"provisionedSize\":2105387065749403748,\"serialNumber\":\"jzcfyjzptwr\",\"createdAt\":\"2021-02-12T21:55:52Z\",\"sourceVolumeResourceId\":\"pqinf\",\"sourceVolumeGroupResourceId\":\"pyglqdhmrjzral\",\"sourceType\":\"volume\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"byypsjoqcjenky\",\"volumeSnapshotName\":\"fq\"},\"sourceSerialNumber\":\"sqxfxjelgcmpz\",\"sourceRecoverableVolumeResourceId\":\"hhhqxuwyv\",\"softDeletion\":{\"destroyed\":false,\"destroyedAt\":\"2021-10-26T05:34:42Z\",\"previousName\":\"i\",\"eradicationTimestamp\":\"2021-01-01T23:01:17Z\"},\"provisioningState\":\"Failed\"},\"id\":\"sjsz\",\"name\":\"bscm\",\"type\":\"lzijiufehgmvflnw\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + Volume response = manager.volumes() + .getWithResponse("o", "mffjkutycyarn", "oohguabzoghkt", "pyc", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(2105387065749403748L, response.properties().provisionedSize()); + Assertions.assertEquals("pqinf", response.properties().sourceVolumeResourceId()); + Assertions.assertEquals("pyglqdhmrjzral", response.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeSourceType.VOLUME, response.properties().sourceType()); + Assertions.assertEquals("byypsjoqcjenky", + response.properties().sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("fq", response.properties().sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("sqxfxjelgcmpz", response.properties().sourceSerialNumber()); + Assertions.assertEquals("hhhqxuwyv", response.properties().sourceRecoverableVolumeResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesListByVolumeGroupMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesListByVolumeGroupMockTests.java new file mode 100644 index 000000000000..e403af4fe207 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesListByVolumeGroupMockTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.purestorageblock.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.purestorageblock.PureStorageBlockManager; +import com.azure.resourcemanager.purestorageblock.models.Volume; +import com.azure.resourcemanager.purestorageblock.models.VolumeSourceType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class VolumesListByVolumeGroupMockTests { + @Test + public void testListByVolumeGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"space\":{\"totalUsed\":8532939228242434812,\"unique\":1120972131002395824,\"snapshots\":7520011247090907409,\"shared\":7561137759085900451},\"provisionedSize\":4441560949553170947,\"serialNumber\":\"bujftaben\",\"createdAt\":\"2021-01-12T16:08:29Z\",\"sourceVolumeResourceId\":\"qpxzucafeddwwn\",\"sourceVolumeGroupResourceId\":\"a\",\"sourceType\":\"volume\",\"sourceVolumeSnapshot\":{\"volumeGroupSnapshotResourceId\":\"dgnhgookrtalvnbw\",\"volumeSnapshotName\":\"pbeme\"},\"sourceSerialNumber\":\"clvdjjukyrdnqod\",\"sourceRecoverableVolumeResourceId\":\"hhxhq\",\"softDeletion\":{\"destroyed\":true,\"destroyedAt\":\"2021-08-18T05:09:55Z\",\"previousName\":\"oqgyipemchgav\",\"eradicationTimestamp\":\"2021-05-29T11:47:50Z\"},\"provisioningState\":\"Accepted\"},\"id\":\"dtx\",\"name\":\"tlghwzhomew\",\"type\":\"j\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + PureStorageBlockManager manager = PureStorageBlockManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.volumes() + .listByVolumeGroup("v", "kxrerlniylylyfwx", "utgqztwh", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(4441560949553170947L, response.iterator().next().properties().provisionedSize()); + Assertions.assertEquals("qpxzucafeddwwn", response.iterator().next().properties().sourceVolumeResourceId()); + Assertions.assertEquals("a", response.iterator().next().properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(VolumeSourceType.VOLUME, response.iterator().next().properties().sourceType()); + Assertions.assertEquals("dgnhgookrtalvnbw", + response.iterator().next().properties().sourceVolumeSnapshot().volumeGroupSnapshotResourceId()); + Assertions.assertEquals("pbeme", + response.iterator().next().properties().sourceVolumeSnapshot().volumeSnapshotName()); + Assertions.assertEquals("clvdjjukyrdnqod", response.iterator().next().properties().sourceSerialNumber()); + Assertions.assertEquals("hhxhq", response.iterator().next().properties().sourceRecoverableVolumeResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/tsp-location.yaml b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/tsp-location.yaml index 064951af79b6..4aac3fddba2d 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/tsp-location.yaml +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/purestorage/PureStorage.Block.Management -commit: 6267b64842af3d744c5b092a3f3beef49729ad6d +commit: 4e4e3db9215718d25d91aa5d0bf971ab922db5a8 repo: Azure/azure-rest-api-specs additionalDirectories: