diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/CHANGELOG.md b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/CHANGELOG.md index c81c7232d255..dce83828c5a8 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/CHANGELOG.md +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/CHANGELOG.md @@ -1,14 +1,237 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2026-05-14) -### 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-01-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.ProtectionParameters` 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.VolumeGroup$DefinitionStages` was added + +* `models.VolumeUpdate` was added + +* `models.PerformanceParameters` was added + +* `models.Volume$Update` was added + +* `models.Volume$UpdateStages` was added + +* `models.VolumeGroup$Update` was added + +* `models.ConnectionParametersResponse` was added + +* `models.Volume$DefinitionStages` was added + +* `models.VolumeGroupUpdate` was added + +* `models.Volume` was added + +* `models.AzureVolumeProperties` was added + +* `models.VolumeGroupUpdateProperties` was added + +* `models.VolumeUpdateProperties` was added + +* `models.IscsiEndpoint` was added + +* `models.VolumeGroup` was added + +* `models.VolumeGroupStatus` was added + +* `models.Volumes` was added + +#### `PureStorageBlockManager` was modified -### Other Changes +* `volumes()` was added +* `volumeGroups()` 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..e905abdaf046 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-01-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..844f91ff91c7 100644 --- a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/SAMPLE.md +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/SAMPLE.md @@ -34,9 +34,15 @@ ## Reservations +- [Create](#reservations_create) +- [Delete](#reservations_delete) - [GetBillingReport](#reservations_getbillingreport) - [GetBillingStatus](#reservations_getbillingstatus) +- [GetByResourceGroup](#reservations_getbyresourcegroup) - [GetResourceLimits](#reservations_getresourcelimits) +- [List](#reservations_list) +- [ListByResourceGroup](#reservations_listbyresourcegroup) +- [Update](#reservations_update) ## StoragePools @@ -53,6 +59,24 @@ - [ListByResourceGroup](#storagepools_listbyresourcegroup) - [RepairAvsConnection](#storagepools_repairavsconnection) - [Update](#storagepools_update) + +## VolumeGroups + +- [Create](#volumegroups_create) +- [Delete](#volumegroups_delete) +- [Get](#volumegroups_get) +- [GetStatus](#volumegroups_getstatus) +- [ListByStoragePool](#volumegroups_listbystoragepool) +- [ListConnectionParameters](#volumegroups_listconnectionparameters) +- [Update](#volumegroups_update) + +## Volumes + +- [Create](#volumes_create) +- [Delete](#volumes_delete) +- [Get](#volumes_get) +- [ListByVolumeGroup](#volumes_listbyvolumegroup) +- [Update](#volumes_update) ### AvsStorageContainerVolumes_Delete ```java @@ -61,7 +85,7 @@ */ public final class AvsStorageContainerVolumesDeleteSamples { /* - * x-ms-original-file: 2024-11-01/AvsStorageContainerVolumes_Delete_MaximumSet_Gen.json + * x-ms-original-file: 2026-01-01-preview/AvsStorageContainerVolumes_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Delete. @@ -71,7 +95,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 +109,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-01-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Get. @@ -94,7 +119,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 +133,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-01-01-preview/AvsStorageContainerVolumes_ListByAvsStorageContainer_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_ListByAvsStorageContainer. @@ -118,7 +143,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 +161,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-01-01-preview/AvsStorageContainerVolumes_Update_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainerVolumes_Update. @@ -145,7 +171,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 +187,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-01-01-preview/AvsStorageContainers_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_Delete. @@ -171,7 +197,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 +210,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-01-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_Get. @@ -194,8 +220,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 +233,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-01-01-preview/AvsStorageContainers_ListByStoragePool_MaximumSet_Gen.json */ /** * Sample code: AvsStorageContainers_ListByStoragePool. @@ -230,7 +255,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-01-01-preview/AvsVmVolumes_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Delete. @@ -239,7 +264,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 +278,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-01-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Get. @@ -261,7 +287,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 +301,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-01-01-preview/AvsVmVolumes_ListByAvsVm_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_ListByAvsVm. @@ -285,7 +311,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 +328,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-01-01-preview/AvsVmVolumes_Update_MaximumSet_Gen.json */ /** * Sample code: AvsVmVolumes_Update. @@ -311,7 +337,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 +353,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-01-01-preview/AvsVms_Delete_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Delete. @@ -335,7 +361,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 +374,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-01-01-preview/AvsVms_Get_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Get. @@ -357,7 +383,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 +396,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-01-01-preview/AvsVms_ListByStoragePool_MaximumSet_Gen.json */ /** * Sample code: AvsVms_ListByStoragePool. @@ -379,7 +405,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 +422,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-01-01-preview/AvsVms_Update_MaximumSet_Gen.json */ /** * Sample code: AvsVms_Update. @@ -405,7 +431,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 +447,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-01-01-preview/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List. @@ -433,7 +459,7 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: 2024-11-01/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: 2026-01-01-preview/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumGen_Set. @@ -447,6 +473,96 @@ public final class OperationsListSamples { } ``` +### 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-01-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-01-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 +571,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-01-01-preview/Reservations_GetBillingReport_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetBillingReport_MaximumSet. @@ -478,7 +594,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-01-01-preview/Reservations_GetBillingStatus_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetBillingStatus_MaximumSet. @@ -493,6 +609,28 @@ public final class ReservationsGetBillingStatusSamples { } ``` +### Reservations_GetByResourceGroup + +```java +/** + * Samples for Reservations GetByResourceGroup. + */ +public final class ReservationsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-01-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 +639,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-01-01-preview/Reservations_GetResourceLimits_MaximumSet_Gen.json */ /** * Sample code: Reservations_GetResourceLimits. @@ -511,7 +649,110 @@ 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_List + +```java +/** + * Samples for Reservations List. + */ +public final class ReservationsListSamples { + /* + * x-ms-original-file: 2026-01-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-01-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-01-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; } } ``` @@ -532,7 +773,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-01-01-preview/StoragePools_Create_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Create. @@ -541,17 +782,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 +821,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-01-01-preview/StoragePools_Delete_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Delete. @@ -585,7 +829,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 +842,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-01-01-preview/StoragePools_DisableAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_DisableAvsConnection. @@ -608,7 +852,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 +867,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-01-01-preview/StoragePools_EnableAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_EnableAvsConnection. @@ -633,7 +877,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 +895,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-01-01-preview/StoragePools_FinalizeAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_FinalizeAvsConnection. @@ -661,7 +905,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 +924,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-01-01-preview/StoragePools_GetAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetAvsConnection. @@ -690,7 +934,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 +947,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-01-01-preview/StoragePools_GetAvsStatus_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetAvsStatus. @@ -713,7 +957,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 +970,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-01-01-preview/StoragePools_Get_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Get. @@ -735,7 +979,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 +992,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-01-01-preview/StoragePools_GetHealthStatus_MaximumSet_Gen.json */ /** * Sample code: StoragePools_GetHealthStatus. @@ -758,7 +1002,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 +1015,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-01-01-preview/StoragePools_ListBySubscription_MaximumSet_Gen.json */ /** * Sample code: StoragePools_ListBySubscription. @@ -793,7 +1037,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-01-01-preview/StoragePools_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: StoragePools_ListByResourceGroup. @@ -815,7 +1059,7 @@ public final class StoragePoolsListByResourceGroupSamples { */ public final class StoragePoolsRepairAvsConnectionSamples { /* - * x-ms-original-file: 2024-11-01/StoragePools_RepairAvsConnection_MaximumSet_Gen.json + * x-ms-original-file: 2026-01-01-preview/StoragePools_RepairAvsConnection_MaximumSet_Gen.json */ /** * Sample code: StoragePools_RepairAvsConnection. @@ -824,8 +1068,7 @@ 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); } } ``` @@ -846,7 +1089,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-01-01-preview/StoragePools_Update_MaximumSet_Gen.json */ /** * Sample code: StoragePools_Update. @@ -855,12 +1098,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 +1122,343 @@ public final class StoragePoolsUpdateSamples { } ``` +### 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 java.time.Duration; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for VolumeGroups Create. + */ +public final class VolumeGroupsCreateSamples { + /* + * x-ms-original-file: 2026-01-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() + .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-01-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-01-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-01-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-01-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-01-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_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-01-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; + +/** + * Samples for Volumes Create. + */ +public final class VolumesCreateSamples { + /* + * x-ms-original-file: 2026-01-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")) + .create(); + } +} +``` + +### Volumes_Delete + +```java +/** + * Samples for Volumes Delete. + */ +public final class VolumesDeleteSamples { + /* + * x-ms-original-file: 2026-01-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-01-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-01-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_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-01-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 b62cef6dec2e..e8addab2bbdb 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-01-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..0bd70fb03124 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 @@ -33,6 +33,8 @@ import com.azure.resourcemanager.purestorageblock.implementation.PureStorageBlockMgmtClientBuilder; import com.azure.resourcemanager.purestorageblock.implementation.ReservationsImpl; import com.azure.resourcemanager.purestorageblock.implementation.StoragePoolsImpl; +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; @@ -40,6 +42,8 @@ import com.azure.resourcemanager.purestorageblock.models.Operations; import com.azure.resourcemanager.purestorageblock.models.Reservations; import com.azure.resourcemanager.purestorageblock.models.StoragePools; +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 +70,10 @@ public final class PureStorageBlockManager { private AvsVmVolumes avsVmVolumes; + private VolumeGroups volumeGroups; + + private Volumes volumes; + private final PureStorageBlockMgmtClient clientObject; private PureStorageBlockManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -366,6 +374,30 @@ 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 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..417d350ddb6e 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,18 @@ 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(); } 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..6dbfbcbde18c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumeGroupsClient.java @@ -0,0 +1,331 @@ +// 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.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); +} 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..d4df6d81df03 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/fluent/VolumesClient.java @@ -0,0 +1,286 @@ +// 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.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. + * @param context The context to associate with this 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + * @param context The context to associate with this 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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. + * @param context The context to associate with this 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); +} 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/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/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/PureStorageBlockMgmtClientImpl.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/PureStorageBlockMgmtClientImpl.java index 7c963dbf87a3..dafa718b4518 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 @@ -34,6 +34,8 @@ import com.azure.resourcemanager.purestorageblock.fluent.PureStorageBlockMgmtClient; import com.azure.resourcemanager.purestorageblock.fluent.ReservationsClient; import com.azure.resourcemanager.purestorageblock.fluent.StoragePoolsClient; +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 +232,34 @@ 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; + } + /** * Initializes an instance of PureStorageBlockMgmtClient client. * @@ -247,7 +277,7 @@ public AvsVmVolumesClient getAvsVmVolumes() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2024-11-01"; + this.apiVersion = "2026-01-01-preview"; this.operations = new OperationsClientImpl(this); this.reservations = new ReservationsClientImpl(this); this.storagePools = new StoragePoolsClientImpl(this); @@ -255,6 +285,8 @@ 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); } /** 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..07e74910060a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupImpl.java @@ -0,0 +1,209 @@ +// 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.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 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/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..5cbf49dddec2 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsClientImpl.java @@ -0,0 +1,1179 @@ +// 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.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({ "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(); + } + + /** + * 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..1a0cacbbd0c7 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeGroupsImpl.java @@ -0,0 +1,196 @@ +// 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.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 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..72e221389e75 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumeImpl.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.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.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 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..cb5e6d4364be --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesClientImpl.java @@ -0,0 +1,1033 @@ +// 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.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.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({ "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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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)); + } + + /** + * 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..7fa9d6814339 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/implementation/VolumesImpl.java @@ -0,0 +1,178 @@ +// 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.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 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/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/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/AzureVolumeProperties.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/AzureVolumeProperties.java new file mode 100644 index 000000000000..1dbdcdc8ce4d --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/AzureVolumeProperties.java @@ -0,0 +1,209 @@ +// 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; + + /* + * 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 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); + 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 ("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/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/PerformanceParameters.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PerformanceParameters.java new file mode 100644 index 000000000000..7a8a0b171a30 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/PerformanceParameters.java @@ -0,0 +1,113 @@ +// 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; + +/** + * Performance parameters for volume group. + */ +@Fluent +public final class PerformanceParameters 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/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/Volume.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volume.java new file mode 100644 index 000000000000..dd67e4fbd79e --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volume.java @@ -0,0 +1,191 @@ +// 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); +} 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..d022e21b9d98 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroup.java @@ -0,0 +1,307 @@ +// 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(); +} 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..2d8e991bf26c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroupProperties.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.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; + + /* + * 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 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.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 ("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/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..665008757285 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/VolumeGroups.java @@ -0,0 +1,201 @@ +// 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); + + /** + * 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/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..e04b279803c9 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/main/java/com/azure/resourcemanager/purestorageblock/models/Volumes.java @@ -0,0 +1,152 @@ +// 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. + * @param context The context to associate with this 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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. + * @param context The context to associate with this 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); + + /** + * 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..1e6de27c874b 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-01-01-preview"},"crossLanguagePackageId":"PureStorage.Block","crossLanguageVersion":"ecf81d558321","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.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.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.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.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.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.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.fluent.models.VolumeGroupInner":"PureStorage.Block.VolumeGroup","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.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.VolumeListResult":"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.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.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.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.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.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.VolumeGroupProperties":"PureStorage.Block.VolumeGroupProperties","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.VolumeProperties":"PureStorage.Block.VolumeProperties","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/ReservationsClient.java","src/main/java/com/azure/resourcemanager/purestorageblock/fluent/StoragePoolsClient.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/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/VolumeGroupInner.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/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/VolumeGroupImpl.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/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/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/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/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/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/PerformanceParameters.java","src/main/java/com/azure/resourcemanager/purestorageblock/models/PerformancePolicyLimits.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/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/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/VolumeGroupProperties.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/VolumeProperties.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..6029ddef5817 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.ReservationsClientImpl$ReservationsService"],["com.azure.resourcemanager.purestorageblock.implementation.StoragePoolsClientImpl$StoragePoolsService"],["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..807427f25889 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-01-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..dd3bf8461cd1 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-01-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..db6861a6371e 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-01-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..b4639bcee7f0 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-01-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..4c690fb735db 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-01-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..946d1ddbfb6a 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-01-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..15e647e28313 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-01-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..f59a54bee8e2 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-01-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..ba186ef93438 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-01-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..fc1350da6731 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-01-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..47e4691bf2a1 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-01-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..86e27f191859 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-01-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..e5c28f5a70eb 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-01-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..b86ddcbd6d62 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-01-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..275e90b1a3b1 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-01-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..5a8377986257 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-01-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-01-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/ReservationsCreateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsCreateSamples.java index 0550c5326779..4c8b8bb8ffdb 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-01-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..6aa34eab5179 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-01-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..059f349739e6 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-01-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..0da91af5e0dc 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-01-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..7b96b5320a1b 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-01-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..699ab78e0046 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-01-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/ReservationsListByResourceGroupSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/ReservationsListByResourceGroupSamples.java index 3d6842cebcba..f1db7abc98b9 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-01-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..6698fbf901ab 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-01-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..513d448effe2 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-01-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/StoragePoolsCreateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsCreateSamples.java index 7f03004e45f0..9509fa37a1ba 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-01-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..f97747bd42e8 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-01-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..dca74d106466 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-01-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..36b0539e7665 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-01-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..16e660ef2499 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-01-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..3296d2479dda 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-01-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..2d23588bc41c 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-01-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..b22696c5cdff 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-01-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..72a3d415fdf7 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-01-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..7fcc525b4787 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-01-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/StoragePoolsListSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/StoragePoolsListSamples.java index 8209e4a39c36..f5d0ec88f99e 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-01-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..2f298dfeeaf2 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-01-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..0b94df74ff26 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-01-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/VolumeGroupsCreateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateSamples.java new file mode 100644 index 000000000000..7ebe10148851 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateSamples.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.resourcemanager.purestorageblock.models.PerformanceParameters; +import com.azure.resourcemanager.purestorageblock.models.ProtectionParameters; +import com.azure.resourcemanager.purestorageblock.models.VolumeGroupProperties; +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-01-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() + .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..e1a566216f41 --- /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-01-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..fe0bfbc15f93 --- /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-01-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..78df1946520c --- /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-01-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..61b68ccd8fe6 --- /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-01-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..9507574f5258 --- /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-01-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/VolumeGroupsUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsUpdateSamples.java new file mode 100644 index 000000000000..200da49d878d --- /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-01-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..803f26446dea --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesCreateSamples.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.AzureVolumeProperties; + +/** + * Samples for Volumes Create. + */ +public final class VolumesCreateSamples { + /* + * x-ms-original-file: 2026-01-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")) + .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..49f4e902f598 --- /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-01-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..dc070b347898 --- /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-01-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..af42a4cf72ff --- /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-01-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/VolumesUpdateSamples.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/samples/java/com/azure/resourcemanager/purestorageblock/generated/VolumesUpdateSamples.java new file mode 100644 index 000000000000..cbf6295315b8 --- /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-01-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/AvsStorageContainerVolumesGetWithResponseMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsStorageContainerVolumesGetWithResponseMockTests.java index f286a2114a93..3b01ac3141b7 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\":\"kpzvcpopmxelnwc\",\"storagePoolResourceId\":\"yjede\",\"volumeInternalId\":\"mlfmkqs\",\"displayName\":\"zuawxtzxpuamwa\",\"space\":{\"totalUsed\":5681353698337068642,\"unique\":6737615589227473915,\"snapshots\":3578038999561407028,\"shared\":166767772147299373},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"haivm\"},\"createdTimestamp\":\"asflvg\",\"provisionedSize\":7685895950417389638,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"koih\",\"diskName\":\"nsmjbl\",\"folder\":\"ljhlnymzotq\",\"avsVmInternalId\":\"ryuzcbmqqv\",\"avsVmResourceId\":\"mv\",\"avsVmName\":\"fgtayxonsup\",\"avsStorageContainerResourceId\":\"ujlzqnhcvsqltn\"},\"provisioningState\":\"Canceled\"},\"id\":\"gsxgnxfyqon\",\"name\":\"p\",\"type\":\"ox\"}"; 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("wjutifdwfmv", "gorqjbttzh", "aglkafhon", "juj", 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..7275dac3e35b 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\":\"qpofvwbc\",\"storagePoolResourceId\":\"embnkbw\",\"volumeInternalId\":\"vxkdivqihebwtswb\",\"displayName\":\"wfmdurage\",\"space\":{\"totalUsed\":8212495412619748670,\"unique\":5639292583520635769,\"snapshots\":377873191870367631,\"shared\":2970204567624224767},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"jubggbqigkxkb\"},\"createdTimestamp\":\"zgakgacyrcmj\",\"provisionedSize\":3103718277552317709,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"pv\",\"diskName\":\"hryl\",\"folder\":\"iofrzgbzjedmstk\",\"avsVmInternalId\":\"nlvxbcuii\",\"avsVmResourceId\":\"nktwfansnvpdibmi\",\"avsVmName\":\"ostbzbkiwb\",\"avsStorageContainerResourceId\":\"qnyophzfyls\"},\"provisioningState\":\"Failed\"},\"id\":\"fbcunezz\",\"name\":\"e\",\"type\":\"elfwy\"}]}"; 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("dofdbxiqx", "iiqbi", "htmwwinh", 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..26a2138cdf11 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\":\"mfqwa\",\"storagePoolResourceId\":\"nqnm\",\"volumeInternalId\":\"ngz\",\"displayName\":\"qxtbjwgnyf\",\"space\":{\"totalUsed\":1558174861143110150,\"unique\":5416320252455363516,\"snapshots\":1005110077026259439,\"shared\":9008468523752983121},\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"ajqglcf\"},\"createdTimestamp\":\"l\",\"provisionedSize\":1393224994853931983,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"qnzrd\",\"diskName\":\"sovwxznptgoeiyb\",\"folder\":\"abpfhvfs\",\"avsVmInternalId\":\"kvntjlrigjkskyri\",\"avsVmResourceId\":\"ovzidsx\",\"avsVmName\":\"aabzmif\",\"avsStorageContainerResourceId\":\"ygznmmaxrizk\"},\"provisioningState\":\"Succeeded\"},\"id\":\"opxlhslnelxieixy\",\"name\":\"llxecwc\",\"type\":\"ojphslhc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,11 +34,11 @@ public void testUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsStorageContainerVolume response = manager.avsStorageContainerVolumes() - .update("jhhn", "kzyb", "jjidjk", "yxkyxvx", + .update("pud", "dabtqwp", "yawbzasqbu", "ljgkyex", new AvsStorageContainerVolumeUpdate().withProperties(new AvsStorageContainerVolumeUpdateProperties() .withSoftDeletion(new SoftDeletion().withDestroyed(false))), com.azure.core.util.Context.NONE); - Assertions.assertTrue(response.properties().softDeletion().destroyed()); + Assertions.assertFalse(response.properties().softDeletion().destroyed()); } } 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..229976f9561f 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\":5642009321604531897,\"unique\":8320087394217577004,\"snapshots\":3274938663203869419,\"shared\":4220293765327614026},\"resourceName\":\"cgsbost\",\"provisionedLimit\":3005843877546789595,\"datastore\":\"la\",\"mounted\":true},\"id\":\"zlbiojlvfhrbbpn\",\"name\":\"qvcww\",\"type\":\"yurmochpprprs\"}"; 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("pqxbkwvzgnzvdf", "zdix", "mqpnoda", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(9156957823967073009L, response.properties().provisionedLimit()); + Assertions.assertEquals(3005843877546789595L, 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..9069214fc6fc 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\":7819263829241557940,\"unique\":1322748423438420767,\"snapshots\":326883131469492313,\"shared\":1718820549593481354},\"resourceName\":\"echndbnwieholew\",\"provisionedLimit\":1432187533240943633,\"datastore\":\"bwefqsfapaqtfer\",\"mounted\":true},\"id\":\"x\",\"name\":\"kmfx\",\"type\":\"pjwogqqno\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListByStoragePool() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.avsStorageContainers() - .listByStoragePool("ealzxwhcansymoyq", "lwigdivbkbx", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.avsStorageContainers().listByStoragePool("mo", "ayzejnhlbkpbz", com.azure.core.util.Context.NONE); - Assertions.assertEquals(8392675363801599974L, response.iterator().next().properties().provisionedLimit()); + Assertions.assertEquals(1432187533240943633L, response.iterator().next().properties().provisionedLimit()); } } 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..517872319559 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\":\"flqo\",\"storagePoolResourceId\":\"uvr\",\"volumeInternalId\":\"mrnjh\",\"displayName\":\"ujztcz\",\"space\":{\"totalUsed\":8438013242932958240,\"unique\":766561893445657103,\"snapshots\":819512383979134559,\"shared\":8005566597813828665},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"prnjletlxsmr\"},\"createdTimestamp\":\"do\",\"provisionedSize\":1946513057158400175,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"aziynknlqwzdv\",\"diskName\":\"iwhxqszdtmaajq\",\"folder\":\"huxy\",\"avsVmInternalId\":\"rjvmtygjbmzyosp\",\"avsVmResourceId\":\"p\",\"avsVmName\":\"hckfkyjpmspbps\",\"avsStorageContainerResourceId\":\"df\"},\"provisioningState\":\"Failed\"},\"id\":\"gt\",\"name\":\"eyujtvczkcnyxrx\",\"type\":\"unjdx\"}"; 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)); AvsVmVolume response = manager.avsVmVolumes() - .getWithResponse("fuxtyasiibmiybnn", "stgnl", "hnmgixhcm", "vmqfoud", com.azure.core.util.Context.NONE) + .getWithResponse("qaclnapxbiy", "nugj", "nfsm", "cttuxuu", 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/AvsVmVolumesListByAvsVmMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesListByAvsVmMockTests.java index 7f57070fc628..94cc052c0027 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\":\"bcpzgpxtivh\",\"storagePoolResourceId\":\"nidibgqjxg\",\"volumeInternalId\":\"r\",\"displayName\":\"ov\",\"space\":{\"totalUsed\":6131768695545339790,\"unique\":2071499549618341176,\"snapshots\":4084484216418195821,\"shared\":5672061659832825147},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"jrmzvupor\"},\"createdTimestamp\":\"dfuyd\",\"provisionedSize\":7661627240347689089,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"nq\",\"diskName\":\"xqpswok\",\"folder\":\"vkhlggdhbemz\",\"avsVmInternalId\":\"kzsz\",\"avsVmResourceId\":\"wiwtglxxhl\",\"avsVmName\":\"fpgpicrmnzhrgm\",\"avsStorageContainerResourceId\":\"gjsxv\"},\"provisioningState\":\"Failed\"},\"id\":\"frmbodthsqq\",\"name\":\"vriibakclacjfr\",\"type\":\"xousxauzl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ 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("glnkvxlxpagl", "ivbgkcv", "hpzvuqdflvoniyp", 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/AvsVmVolumesUpdateMockTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AvsVmVolumesUpdateMockTests.java index 5bded63c7ff4..f11000ab16e1 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\":\"ytunlbfjkwr\",\"storagePoolResourceId\":\"nkqbhsyrq\",\"volumeInternalId\":\"jqhden\",\"displayName\":\"ulkpakd\",\"space\":{\"totalUsed\":2001869363644606291,\"unique\":9213659724068694938,\"snapshots\":907702570913496206,\"shared\":2755469222712772213},\"softDeletion\":{\"destroyed\":true,\"eradicationTimestamp\":\"bpxuckpggqoweyi\"},\"createdTimestamp\":\"hlisngw\",\"provisionedSize\":5405797443088065857,\"volumeType\":\"avs\",\"avs\":{\"diskId\":\"zruwn\",\"diskName\":\"qxpxiwfcngjsaa\",\"folder\":\"iixtmkzj\",\"avsVmInternalId\":\"kv\",\"avsVmResourceId\":\"irhgfgrwsdp\",\"avsVmName\":\"ra\",\"avsStorageContainerResourceId\":\"zvzbglbyv\"},\"provisioningState\":\"Succeeded\"},\"id\":\"tbrxkjz\",\"name\":\"rgxffmshkw\",\"type\":\"bkgozxwopdbydpi\"}"; 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("oqeq", "larvlagunbtg", "ebwlnbmhyreeudzq", "vbpdqmjxlyyzglgo", 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..9a6f0cd697ce 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\":\"zvners\",\"storagePoolResourceId\":\"cucrwnamikze\",\"displayName\":\"qbsms\",\"createdTimestamp\":\"iqg\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"kzruswh\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"znvfbycjsxjww\",\"vmName\":\"xzv\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"wmxqhndvnoamlds\"},\"space\":{\"totalUsed\":6474089368224609245,\"unique\":8393933592705631363,\"snapshots\":7147676870437061439,\"shared\":267938470106769023},\"provisioningState\":\"Failed\"},\"id\":\"kxcoxpelnje\",\"name\":\"agltsxoa\",\"type\":\"ftgz\"}"; 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)); AvsVm response = manager.avsVms() - .getWithResponse("amurvzmlovuan", "shcxlpmjerbdk", "lvidizozs", com.azure.core.util.Context.NONE) + .getWithResponse("wcobie", "stmninwjizcilng", "gshejjtbxqmulux", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.properties().softDeletion().destroyed()); + Assertions.assertFalse(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..5d08faacd596 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\":\"wtxxpkyjcx\",\"storagePoolResourceId\":\"xgrytfmp\",\"displayName\":\"cil\",\"createdTimestamp\":\"caykggnoxuz\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"xwpndfcpf\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"hjtwkjaosrx\",\"vmName\":\"zvoamktc\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"os\"},\"space\":{\"totalUsed\":8116683592498918635,\"unique\":3564054239080397044,\"snapshots\":3433394033702639925,\"shared\":7652180722953630761},\"provisioningState\":\"Failed\"},\"id\":\"tlt\",\"name\":\"ap\",\"type\":\"ltzkatbhjmznnb\"}]}"; 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("npbs", "vefloccsrmozihmi", 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..0abe81cfb97c 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\":\"qwztcmwqkc\",\"storagePoolResourceId\":\"xwaxfewzjkj\",\"displayName\":\"fdeqvhpsyl\",\"createdTimestamp\":\"shk\",\"softDeletion\":{\"destroyed\":false,\"eradicationTimestamp\":\"bmxzjrgywwpg\"},\"volumeContainerType\":\"avs\",\"avs\":{\"vmId\":\"ptfujgicgaaoept\",\"vmName\":\"aqutdewemxswvruu\",\"vmType\":\"vvol\",\"avsVmInternalId\":\"zjgehkfkim\"},\"space\":{\"totalUsed\":1525323814581678348,\"unique\":9025463474014922269,\"snapshots\":8667135923506770358,\"shared\":5182793984668664248},\"provisioningState\":\"Succeeded\"},\"id\":\"jqepqwhi\",\"name\":\"monstshiyxgve\",\"type\":\"fclduccbirdsv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,11 +34,11 @@ public void testUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AvsVm response = manager.avsVms() - .update("jaeukmrsieekpn", "zaapmudqmeqwi", "pibudqwyxebeybpm", + .update("wl", "xjwet", "psihcla", 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()); + Assertions.assertFalse(response.properties().softDeletion().destroyed()); } } 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..eb46c9e01d1c --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/AzureVolumePropertiesTests.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.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +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\":6108199465615319832,\"unique\":3662268656068136217,\"snapshots\":8489497744265220755,\"shared\":3400282192203398629},\"provisionedSize\":3592277160586581576,\"serialNumber\":\"jxkcgxxlxsff\",\"createdAt\":\"2021-09-08T02:34:48Z\",\"sourceVolumeResourceId\":\"zqzdw\",\"sourceVolumeGroupResourceId\":\"w\",\"provisioningState\":\"Succeeded\"}") + .toObject(AzureVolumeProperties.class); + Assertions.assertEquals(3592277160586581576L, model.provisionedSize()); + Assertions.assertEquals("zqzdw", model.sourceVolumeResourceId()); + Assertions.assertEquals("w", model.sourceVolumeGroupResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AzureVolumeProperties model = new AzureVolumeProperties().withProvisionedSize(3592277160586581576L) + .withSourceVolumeResourceId("zqzdw") + .withSourceVolumeGroupResourceId("w"); + model = BinaryData.fromObject(model).toObject(AzureVolumeProperties.class); + Assertions.assertEquals(3592277160586581576L, model.provisionedSize()); + Assertions.assertEquals("zqzdw", model.sourceVolumeResourceId()); + Assertions.assertEquals("w", model.sourceVolumeGroupResourceId()); + } +} 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..49df3c4aa08a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/ConnectionParametersResponseInnerTests.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.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\":\"uvwpklvxwmyg\",\"port\":1138704794,\"iqn\":\"pgpqchiszepnnb\"},{\"ip\":\"crxgibb\",\"port\":596533166,\"iqn\":\"xconfozauors\"},{\"ip\":\"kokwbqplhlvnu\",\"port\":991430117,\"iqn\":\"pzlrphw\"},{\"ip\":\"soldweyuqdunv\",\"port\":375067057,\"iqn\":\"nrwrbiork\"}]}}") + .toObject(ConnectionParametersResponseInner.class); + Assertions.assertEquals("uvwpklvxwmyg", model.iscsi().endpoints().get(0).ip()); + Assertions.assertEquals(1138704794, model.iscsi().endpoints().get(0).port()); + Assertions.assertEquals("pgpqchiszepnnb", model.iscsi().endpoints().get(0).iqn()); + } +} 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..5dc690c64c69 --- /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\":\"lywjhh\",\"port\":1788432373,\"iqn\":\"nhxmsi\"},{\"ip\":\"fomiloxgg\",\"port\":1119272163,\"iqn\":\"fi\"},{\"ip\":\"ndieuzaofj\",\"port\":34759276,\"iqn\":\"vcyy\"}]}") + .toObject(IscsiConnectionParameters.class); + Assertions.assertEquals("lywjhh", model.endpoints().get(0).ip()); + Assertions.assertEquals(1788432373, model.endpoints().get(0).port()); + Assertions.assertEquals("nhxmsi", 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..24fcf1ee13e0 --- /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\":\"s\",\"port\":1812829551,\"iqn\":\"dotcubiipuip\"}") + .toObject(IscsiEndpoint.class); + Assertions.assertEquals("s", model.ip()); + Assertions.assertEquals(1812829551, model.port()); + Assertions.assertEquals("dotcubiipuip", model.iqn()); + } +} 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..a3025cc8bbeb 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\":\"zivj\",\"isDataAction\":true,\"display\":{\"provider\":\"tbajlkatn\",\"resource\":\"yiopi\",\"operation\":\"qqfkuv\",\"description\":\"xkdmligo\"},\"origin\":\"user\",\"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..2f9ca48c5cfc --- /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\":6609744951905332825,\"iopsLimit\":5424898922081085206}") + .toObject(PerformanceParameters.class); + Assertions.assertEquals(6609744951905332825L, model.bandwidthLimitMbPerSec()); + Assertions.assertEquals(5424898922081085206L, model.iopsLimit()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PerformanceParameters model = new PerformanceParameters().withBandwidthLimitMbPerSec(6609744951905332825L) + .withIopsLimit(5424898922081085206L); + model = BinaryData.fromObject(model).toObject(PerformanceParameters.class); + Assertions.assertEquals(6609744951905332825L, model.bandwidthLimitMbPerSec()); + Assertions.assertEquals(5424898922081085206L, model.iopsLimit()); + } +} 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..cce3f7765f4a --- /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\":\"PT213H5M50S\",\"frequency\":\"PT182H55M9S\"}") + .toObject(ProtectionParameters.class); + Assertions.assertEquals(Duration.parse("PT213H5M50S"), model.retention()); + Assertions.assertEquals(Duration.parse("PT182H55M9S"), model.frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProtectionParameters model = new ProtectionParameters().withRetention(Duration.parse("PT213H5M50S")) + .withFrequency(Duration.parse("PT182H55M9S")); + model = BinaryData.fromObject(model).toObject(ProtectionParameters.class); + Assertions.assertEquals(Duration.parse("PT213H5M50S"), model.retention()); + Assertions.assertEquals(Duration.parse("PT182H55M9S"), model.frequency()); + } +} 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..9f23458add5c 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\":\"qojpy\",\"billingUsageProperties\":[{\"propertyId\":\"gtrd\",\"propertyName\":\"nifmzzsdymbrnysu\",\"currentValue\":\"m\",\"previousValue\":\"a\",\"severity\":\"alert\",\"statusMessage\":\"ckh\",\"subProperties\":[{\"propertyId\":\"vdff\",\"propertyName\":\"wafqroud\",\"currentValue\":\"spave\",\"previousValue\":\"r\",\"severity\":\"information\",\"statusMessage\":\"unzo\",\"subProperties\":[{\"propertyId\":\"hcxgkmoyx\",\"propertyName\":\"dyuib\",\"currentValue\":\"mfdn\",\"severity\":\"information\"},{\"propertyId\":\"ydvfvfcjnae\",\"propertyName\":\"isrvhm\",\"currentValue\":\"orffukiscv\",\"severity\":\"none\"},{\"propertyId\":\"zhwplefaxvxilc\",\"propertyName\":\"tg\",\"currentValue\":\"hnze\",\"severity\":\"none\"}]}]},{\"propertyId\":\"xtjjfzqlqhycav\",\"propertyName\":\"dggxdbeesmi\",\"currentValue\":\"knlrariaawiuagy\",\"previousValue\":\"qfby\",\"severity\":\"alert\",\"statusMessage\":\"fgiagtcojocqwo\",\"subProperties\":[{\"propertyId\":\"zjvusfzldmo\",\"propertyName\":\"uxylfsbtkadpy\",\"currentValue\":\"own\",\"previousValue\":\"gkbugrjqct\",\"severity\":\"alert\",\"statusMessage\":\"mi\",\"subProperties\":[{\"propertyId\":\"ieypef\",\"propertyName\":\"jy\",\"currentValue\":\"dh\",\"severity\":\"alert\"},{\"propertyId\":\"plcplcwkhi\",\"propertyName\":\"ihlhzdsqtzb\",\"currentValue\":\"rgnowcjhfgm\",\"severity\":\"information\"},{\"propertyId\":\"cact\",\"propertyName\":\"mwotey\",\"currentValue\":\"wcluqovekqvgq\",\"severity\":\"warning\"},{\"propertyId\":\"wifzmp\",\"propertyName\":\"wyivqikf\",\"currentValue\":\"cvhrfsp\",\"severity\":\"none\"}]},{\"propertyId\":\"agr\",\"propertyName\":\"tikteusqczkvykl\",\"currentValue\":\"ubyjaffmmf\",\"previousValue\":\"cqc\",\"severity\":\"alert\",\"statusMessage\":\"gqibrtalmetttw\",\"subProperties\":[{\"propertyId\":\"lqxihhrmooiz\",\"propertyName\":\"seypxiutcxapz\",\"currentValue\":\"y\",\"severity\":\"warning\"},{\"propertyId\":\"etoge\",\"propertyName\":\"joxslhvnhla\",\"currentValue\":\"rqnkkzjcjbtr\",\"severity\":\"none\"}]},{\"propertyId\":\"ehvvib\",\"propertyName\":\"xjjs\",\"currentValue\":\"oqbeitpkxzt\",\"previousValue\":\"ob\",\"severity\":\"none\",\"statusMessage\":\"tidgfcwq\",\"subProperties\":[{\"propertyId\":\"maqxzhemjyh\",\"propertyName\":\"hujswtwkozzwcul\",\"currentValue\":\"bawpfajnjwltlwt\",\"severity\":\"alert\"}]}]},{\"propertyId\":\"guk\",\"propertyName\":\"alhsnvkc\",\"currentValue\":\"mxzrpoa\",\"previousValue\":\"lnwiaaomylwe\",\"severity\":\"alert\",\"statusMessage\":\"lcsethwwnpj\",\"subProperties\":[{\"propertyId\":\"zswpchwa\",\"propertyName\":\"fb\",\"currentValue\":\"usnfepgfewet\",\"previousValue\":\"yxgncxykxhdjhli\",\"severity\":\"warning\",\"statusMessage\":\"cxfhbcporxv\",\"subProperties\":[{\"propertyId\":\"zhqizxf\",\"propertyName\":\"xtgqscjavftjuh\",\"currentValue\":\"qaz\",\"severity\":\"information\"}]}]},{\"propertyId\":\"tgguwpijrajcivmm\",\"propertyName\":\"hfcf\",\"currentValue\":\"wrxgkneuvy\",\"previousValue\":\"zqodfvpgshox\",\"severity\":\"warning\",\"statusMessage\":\"bpfgzdj\",\"subProperties\":[{\"propertyId\":\"zflbqvg\",\"propertyName\":\"qvlgafcqusrdvetn\",\"currentValue\":\"sdtutnwlduyc\",\"previousValue\":\"zhyrmewipmve\",\"severity\":\"none\",\"statusMessage\":\"ukuqgsj\",\"subProperties\":[{\"propertyId\":\"n\",\"propertyName\":\"xgketwz\",\"currentValue\":\"hzjhf\",\"severity\":\"alert\"},{\"propertyId\":\"hvvmuvgpmun\",\"propertyName\":\"qsxvmhf\",\"currentValue\":\"uzjyihsasbhudypo\",\"severity\":\"alert\"},{\"propertyId\":\"uemsly\",\"propertyName\":\"sqy\",\"currentValue\":\"pfoobr\",\"severity\":\"information\"}]},{\"propertyId\":\"tyms\",\"propertyName\":\"nygq\",\"currentValue\":\"nfwqzdzgtilaxhn\",\"previousValue\":\"qlyvijo\",\"severity\":\"information\",\"statusMessage\":\"vk\",\"subProperties\":[{\"propertyId\":\"zunbixx\",\"propertyName\":\"ti\",\"currentValue\":\"vcpwpgclrc\",\"severity\":\"information\"},{\"propertyId\":\"tso\",\"propertyName\":\"frkenxpmyyefrp\",\"currentValue\":\"pdnqqskawaoqvmmb\",\"severity\":\"warning\"},{\"propertyId\":\"qfr\",\"propertyName\":\"qlkzme\",\"currentValue\":\"nitgvkxlz\",\"severity\":\"none\"},{\"propertyId\":\"drf\",\"propertyName\":\"gcealzxwh\",\"currentValue\":\"ansym\",\"severity\":\"none\"}]}]}],\"overallStatusMessage\":\"qhlwigdivbkbxgo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,35 +32,34 @@ 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("bbc", "vqagtltdhlf", 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", - response.billingUsageProperties().get(0).subProperties().get(0).propertyId()); - Assertions.assertEquals("dsrhnjiv", + Assertions.assertEquals("qojpy", response.timestamp()); + Assertions.assertEquals("gtrd", response.billingUsageProperties().get(0).propertyId()); + Assertions.assertEquals("nifmzzsdymbrnysu", response.billingUsageProperties().get(0).propertyName()); + Assertions.assertEquals("m", response.billingUsageProperties().get(0).currentValue()); + Assertions.assertEquals("a", response.billingUsageProperties().get(0).previousValue()); + Assertions.assertEquals(UsageSeverity.ALERT, response.billingUsageProperties().get(0).severity()); + Assertions.assertEquals("ckh", response.billingUsageProperties().get(0).statusMessage()); + Assertions.assertEquals("vdff", response.billingUsageProperties().get(0).subProperties().get(0).propertyId()); + Assertions.assertEquals("wafqroud", response.billingUsageProperties().get(0).subProperties().get(0).propertyName()); - Assertions.assertEquals("lvtno", + Assertions.assertEquals("spave", response.billingUsageProperties().get(0).subProperties().get(0).currentValue()); - Assertions.assertEquals("fzg", response.billingUsageProperties().get(0).subProperties().get(0).previousValue()); + Assertions.assertEquals("r", response.billingUsageProperties().get(0).subProperties().get(0).previousValue()); Assertions.assertEquals(UsageSeverity.INFORMATION, response.billingUsageProperties().get(0).subProperties().get(0).severity()); - Assertions.assertEquals("dftuljltduce", + Assertions.assertEquals("unzo", response.billingUsageProperties().get(0).subProperties().get(0).statusMessage()); - Assertions.assertEquals("mczuo", + Assertions.assertEquals("hcxgkmoyx", response.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).propertyId()); - Assertions.assertEquals("ejwcwwqiok", + Assertions.assertEquals("dyuib", response.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).propertyName()); - Assertions.assertEquals("ssxmojms", + Assertions.assertEquals("mfdn", response.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).currentValue()); - Assertions.assertEquals(UsageSeverity.ALERT, + Assertions.assertEquals(UsageSeverity.INFORMATION, response.billingUsageProperties().get(0).subProperties().get(0).subProperties().get(0).severity()); - Assertions.assertEquals("jplmagstcy", response.overallStatusMessage()); + Assertions.assertEquals("qhlwigdivbkbxgo", 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..796d3979c54b 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\":\"gnjdgkynscliqhz\",\"totalUsedCapacityReported\":1086161776680069290,\"lowDrrPoolCount\":532922203,\"drrWeightedAverage\":73.51830357429998,\"totalNonReducibleReported\":2722871880542183100,\"extraUsedCapacityNonReducible\":4358047867231153645,\"extraUsedCapacityLowUsageRounding\":1926641413233899179,\"extraUsedCapacityNonReduciblePlanDiscount\":4043359579426698154,\"totalUsedCapacityBilled\":6225423458510634939,\"totalUsedCapacityIncludedPlan\":4803122191376067499,\"totalUsedCapacityOverage\":1479306936525030102,\"totalPerformanceReported\":8531774854785485311,\"totalPerformanceIncludedPlan\":2942328619662803752,\"totalPerformanceOverage\":5184735928624525939}"; 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("ttijfybvpoekrs", "sgbdhuz", 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("gnjdgkynscliqhz", response.timestamp()); + Assertions.assertEquals(1086161776680069290L, response.totalUsedCapacityReported()); + Assertions.assertEquals(532922203, response.lowDrrPoolCount()); + Assertions.assertEquals(73.51830357429998, response.drrWeightedAverage()); + Assertions.assertEquals(2722871880542183100L, response.totalNonReducibleReported()); + Assertions.assertEquals(4358047867231153645L, response.extraUsedCapacityNonReducible()); + Assertions.assertEquals(1926641413233899179L, response.extraUsedCapacityLowUsageRounding()); + Assertions.assertEquals(4043359579426698154L, response.extraUsedCapacityNonReduciblePlanDiscount()); + Assertions.assertEquals(6225423458510634939L, response.totalUsedCapacityBilled()); + Assertions.assertEquals(4803122191376067499L, response.totalUsedCapacityIncludedPlan()); + Assertions.assertEquals(1479306936525030102L, response.totalUsedCapacityOverage()); + Assertions.assertEquals(8531774854785485311L, response.totalPerformanceReported()); + Assertions.assertEquals(2942328619662803752L, response.totalPerformanceIncludedPlan()); + Assertions.assertEquals(5184735928624525939L, 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..970b9abfaef8 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\":8263718862766737851,\"max\":4054203991023073101},\"provisionedIops\":{\"min\":3202980934281786678,\"max\":67075187560460490},\"physicalAvailabilityZones\":[\"a\",\"ysdzhez\",\"wva\",\"qyuvvfonkp\"]},\"volume\":{\"provisionedSize\":{\"min\":7483475078710435538,\"max\":3436433297526020089}},\"protectionPolicy\":{\"frequency\":{\"min\":1965716702826065901,\"max\":650828533296238528},\"retention\":{\"min\":2375033842484078793,\"max\":3906408479065658472}},\"performancePolicy\":{\"iopsLimit\":{\"min\":3474591298556028282,\"max\":6780011056073060109},\"bandwidthLimit\":{\"min\":5660344912391881497,\"max\":7204567247878937925}}}"; 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("xqvkjlmxhomdyn", "dwdigumb", 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(8263718862766737851L, response.storagePool().provisionedBandwidthMbPerSec().min()); + Assertions.assertEquals(4054203991023073101L, response.storagePool().provisionedBandwidthMbPerSec().max()); + Assertions.assertEquals(3202980934281786678L, response.storagePool().provisionedIops().min()); + Assertions.assertEquals(67075187560460490L, response.storagePool().provisionedIops().max()); + Assertions.assertEquals("a", response.storagePool().physicalAvailabilityZones().get(0)); + Assertions.assertEquals(7483475078710435538L, response.volume().provisionedSize().min()); + Assertions.assertEquals(3436433297526020089L, response.volume().provisionedSize().max()); + Assertions.assertEquals(1965716702826065901L, response.protectionPolicy().frequency().min()); + Assertions.assertEquals(650828533296238528L, response.protectionPolicy().frequency().max()); + Assertions.assertEquals(2375033842484078793L, response.protectionPolicy().retention().min()); + Assertions.assertEquals(3906408479065658472L, response.protectionPolicy().retention().max()); + Assertions.assertEquals(3474591298556028282L, response.performancePolicy().iopsLimit().min()); + Assertions.assertEquals(6780011056073060109L, response.performancePolicy().iopsLimit().max()); + Assertions.assertEquals(5660344912391881497L, response.performancePolicy().bandwidthLimit().min()); + Assertions.assertEquals(7204567247878937925L, response.performancePolicy().bandwidthLimit().max()); } } 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..fc8768f7e92b 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 @@ -28,7 +28,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\":\"iibmi\",\"availabilityZone\":\"bnn\",\"vnetInjection\":{\"subnetId\":\"stgnl\",\"vnetId\":\"hnmgixhcm\"},\"dataRetentionPeriod\":118792158515928824,\"provisionedBandwidthMbPerSec\":5824035631104177539,\"provisionedIops\":1064299527686939227,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"gyyprotwy\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"d\"},\"identity\":{\"principalId\":\"hu\",\"tenantId\":\"mjkavlgorbmft\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"qwthmky\":{\"principalId\":\"fjltfvnzcyjtotp\",\"clientId\":\"pvpbdbzqgqqiheds\"},\"hohsd\":{\"principalId\":\"cysihs\",\"clientId\":\"cw\"}}},\"location\":\"cdzsu\",\"tags\":{\"muapcvhdbevw\":\"hdxbzlm\",\"qzinkfkbg\":\"qxeysko\",\"owxeqocljmy\":\"z\"},\"id\":\"vkzqk\",\"name\":\"jeokbzefezrxccz\",\"type\":\"rtle\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,27 +38,27 @@ 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("oqq") + .withRegion("cevehjkuyxoafg") + .withExistingResourceGroup("ijpstte") + .withTags(mapOf("aeylinm", "lt", "irpghriypoqeyh", "gv")) + .withProperties(new StoragePoolProperties().withAvailabilityZone("qspkcdqzhlctd") + .withVnetInjection(new VnetInjection().withSubnetId("unqndyfpchrqb").withVnetId("jjrcgegydc")) + .withProvisionedBandwidthMbPerSec(7870018990823622078L) + .withReservationResourceId("loqxfuojrngif")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities( + mapOf("dgug", new UserAssignedIdentity(), "ojeevy", new UserAssignedIdentity(), "qgleohibetnluank", + new UserAssignedIdentity(), "nw", 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("cdzsu", response.location()); + Assertions.assertEquals("hdxbzlm", response.tags().get("muapcvhdbevw")); + Assertions.assertEquals("bnn", response.properties().availabilityZone()); + Assertions.assertEquals("stgnl", response.properties().vnetInjection().subnetId()); + Assertions.assertEquals("hnmgixhcm", response.properties().vnetInjection().vnetId()); + Assertions.assertEquals(5824035631104177539L, response.properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals("d", response.properties().reservationResourceId()); 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..ee26957fd4ad 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\":\"zpgepqty\",\"serviceInitializationHandle\":{\"sddcResourceId\":\"wpgdak\",\"serviceAccountUsername\":\"zyvli\"}}"; 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("fuurutlwexx", "lalniex", 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("zpgepqty", response.serviceInitializationHandleEnc()); + Assertions.assertEquals("wpgdak", response.serviceInitializationHandle().clusterResourceId()); + Assertions.assertEquals("zyvli", 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..11193d542dfe 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\":\"nxm\",\"sddcResourceId\":\"uxswqrntvl\"}"; 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("q", "rkcxkj", 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("nxm", response.currentConnectionStatus()); + Assertions.assertEquals("uxswqrntvl", 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..d31c548715e3 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\":\"slhhxudbxv\",\"availabilityZone\":\"d\",\"vnetInjection\":{\"subnetId\":\"tnsi\",\"vnetId\":\"ud\"},\"dataRetentionPeriod\":522814180418790552,\"provisionedBandwidthMbPerSec\":1178624651848849936,\"provisionedIops\":4640627057702516457,\"avs\":{\"avsEnabled\":true,\"sddcResourceId\":\"gzrcxfailcfxwmdb\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"fgsftufqob\"},\"identity\":{\"principalId\":\"nac\",\"tenantId\":\"ckknhxkizvy\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"gukkjqnvbroy\":{\"principalId\":\"uljraae\",\"clientId\":\"nok\"},\"jrwhryvy\":{\"principalId\":\"xxulcdi\",\"clientId\":\"osfjbjsv\"}}},\"location\":\"t\",\"tags\":{\"btmvpdvjdhttza\":\"xgccknfnw\",\"rjdqnsdfzp\":\"fedxihchrphkm\",\"euutlwxezwzh\":\"gtgkylkdghr\",\"ppipifhpfeoa\":\"kvbwnhhtqlgeh\"},\"id\":\"vgcxtx\",\"name\":\"csheafidltugsr\",\"type\":\"smkss\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ 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("dmdqb", "pypqtgsfj", 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("t", response.location()); + Assertions.assertEquals("xgccknfnw", response.tags().get("btmvpdvjdhttza")); + Assertions.assertEquals("d", response.properties().availabilityZone()); + Assertions.assertEquals("tnsi", response.properties().vnetInjection().subnetId()); + Assertions.assertEquals("ud", response.properties().vnetInjection().vnetId()); + Assertions.assertEquals(1178624651848849936L, response.properties().provisionedBandwidthMbPerSec()); + Assertions.assertEquals("fgsftufqob", response.properties().reservationResourceId()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_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..85a3bd6599d0 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\":16.17100967570293,\"bandwidthUsage\":{\"current\":6361654229159363258,\"provisioned\":7104035762189802588,\"max\":7722169149749400177},\"iopsUsage\":{\"current\":8602411594331406396,\"provisioned\":1325596444504577900,\"max\":5473347801245581276},\"space\":{\"totalUsed\":199833503819632386,\"unique\":2859095376940736760,\"snapshots\":2589313714101269318,\"shared\":8393955549840736725},\"dataReductionRatio\":70.98802720145449,\"estimatedMaxCapacity\":694175225161920900},\"alerts\":[{\"level\":\"warning\",\"message\":\"hahnomdrkywuhps\"}]}"; 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("hfovvacqpbtu", "dxe", 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(AlertLevel.INFO, response.alerts().get(0).level()); - Assertions.assertEquals("iaa", response.alerts().get(0).message()); + Assertions.assertEquals(16.17100967570293, response.health().usedCapacityPercentage()); + Assertions.assertEquals(6361654229159363258L, response.health().bandwidthUsage().current()); + Assertions.assertEquals(7104035762189802588L, response.health().bandwidthUsage().provisioned()); + Assertions.assertEquals(7722169149749400177L, response.health().bandwidthUsage().max()); + Assertions.assertEquals(8602411594331406396L, response.health().iopsUsage().current()); + Assertions.assertEquals(1325596444504577900L, response.health().iopsUsage().provisioned()); + Assertions.assertEquals(5473347801245581276L, response.health().iopsUsage().max()); + Assertions.assertEquals(199833503819632386L, response.health().space().totalUsed()); + Assertions.assertEquals(2859095376940736760L, response.health().space().unique()); + Assertions.assertEquals(2589313714101269318L, response.health().space().snapshots()); + Assertions.assertEquals(8393955549840736725L, response.health().space().shared()); + Assertions.assertEquals(70.98802720145449, response.health().dataReductionRatio()); + Assertions.assertEquals(694175225161920900L, response.health().estimatedMaxCapacity()); + Assertions.assertEquals(AlertLevel.WARNING, response.alerts().get(0).level()); + Assertions.assertEquals("hahnomdrkywuhps", 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..a1788b971dc5 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\":\"txfkfweg\",\"availabilityZone\":\"rhptilluc\",\"vnetInjection\":{\"subnetId\":\"iqtgdqoh\",\"vnetId\":\"cwsldri\"},\"dataRetentionPeriod\":3904002199419630886,\"provisionedBandwidthMbPerSec\":7410279931737005304,\"provisionedIops\":809827059140233177,\"avs\":{\"avsEnabled\":false,\"sddcResourceId\":\"bphbqzmizakakank\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"n\"},\"identity\":{\"principalId\":\"ajoylhjl\",\"tenantId\":\"oyxprimr\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"sylwxdzaumweooh\":{\"principalId\":\"ecj\",\"clientId\":\"islstv\"},\"a\":{\"principalId\":\"ufuzboy\",\"clientId\":\"thwtzol\"},\"xveabf\":{\"principalId\":\"wm\",\"clientId\":\"mebwjscjpah\"}}},\"location\":\"nmwmqtibx\",\"tags\":{\"dija\":\"ddtvqctt\",\"sieekpndzaapm\":\"ukm\"},\"id\":\"dqmeqwigpibudq\",\"name\":\"yxeb\",\"type\":\"ybpmzznrtffyaq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,17 @@ 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("h", 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("nmwmqtibx", response.iterator().next().location()); + Assertions.assertEquals("ddtvqctt", response.iterator().next().tags().get("dija")); + Assertions.assertEquals("rhptilluc", response.iterator().next().properties().availabilityZone()); + Assertions.assertEquals("iqtgdqoh", response.iterator().next().properties().vnetInjection().subnetId()); + Assertions.assertEquals("cwsldri", response.iterator().next().properties().vnetInjection().vnetId()); + Assertions.assertEquals(7410279931737005304L, response.iterator().next().properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("z", response.iterator().next().properties().reservationResourceId()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("n", response.iterator().next().properties().reservationResourceId()); + 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..8f79efa70913 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\":\"hheioqaqhvseuf\",\"availabilityZone\":\"qyrxp\",\"vnetInjection\":{\"subnetId\":\"lcgqlsismj\",\"vnetId\":\"frddgamquhiosrsj\"},\"dataRetentionPeriod\":1565802673451378202,\"provisionedBandwidthMbPerSec\":7632126345733001237,\"provisionedIops\":6374226112338292700,\"avs\":{\"avsEnabled\":false,\"sddcResourceId\":\"xzhczexrxz\"},\"provisioningState\":\"Succeeded\",\"reservationResourceId\":\"rtrhqvwrevkhgnl\"},\"identity\":{\"principalId\":\"nzlrpiqywncvjt\",\"tenantId\":\"cof\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"uanashcxlp\":{\"principalId\":\"dhgbjkvre\",\"clientId\":\"eamurvzmlo\"}}},\"location\":\"erbdk\",\"tags\":{\"fdgnwncypuuwwlt\":\"idizozsdbccxjmo\",\"tzenk\":\"uqj\",\"zhmkdasvflyh\":\"if\"},\"id\":\"xcudchxgsr\",\"name\":\"oldforobw\",\"type\":\"lvizb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,14 +34,14 @@ 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("erbdk", response.iterator().next().location()); + Assertions.assertEquals("idizozsdbccxjmo", response.iterator().next().tags().get("fdgnwncypuuwwlt")); + Assertions.assertEquals("qyrxp", response.iterator().next().properties().availabilityZone()); + Assertions.assertEquals("lcgqlsismj", response.iterator().next().properties().vnetInjection().subnetId()); + Assertions.assertEquals("frddgamquhiosrsj", response.iterator().next().properties().vnetInjection().vnetId()); + Assertions.assertEquals(7632126345733001237L, response.iterator().next().properties().provisionedBandwidthMbPerSec()); - Assertions.assertEquals("p", response.iterator().next().properties().reservationResourceId()); + Assertions.assertEquals("rtrhqvwrevkhgnl", response.iterator().next().properties().reservationResourceId()); 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/VolumeGroupInnerTests.java b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupInnerTests.java new file mode 100644 index 000000000000..4f27e9805029 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupInnerTests.java @@ -0,0 +1,64 @@ +// 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 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\":\"bgye\",\"volumeGroupInternalId\":\"ymsgaojfmwnc\",\"sourceVolumeGroupResourceId\":\"mrfhirctymox\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":5632238878555686719,\"iopsLimit\":7211099122712031561},\"protectionParameters\":{\"retention\":\"PT120H16M32S\",\"frequency\":\"PT89H37M26S\"},\"provisioningState\":\"Canceled\"},\"location\":\"pqjlihhyusps\",\"tags\":{\"cvpa\":\"dvlmfwdgzxul\",\"zvxurisjnhny\":\"rsre\",\"hu\":\"xifqjzgxm\",\"cesutrgjupauut\":\"lw\"},\"id\":\"woqhihe\",\"name\":\"qg\",\"type\":\"zpnfqntcypsxj\"}") + .toObject(VolumeGroupInner.class); + Assertions.assertEquals("pqjlihhyusps", model.location()); + Assertions.assertEquals("dvlmfwdgzxul", model.tags().get("cvpa")); + Assertions.assertEquals("mrfhirctymox", model.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(5632238878555686719L, + model.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(7211099122712031561L, model.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT120H16M32S"), model.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT89H37M26S"), model.properties().protectionParameters().frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupInner model = new VolumeGroupInner().withLocation("pqjlihhyusps") + .withTags(mapOf("cvpa", "dvlmfwdgzxul", "zvxurisjnhny", "rsre", "hu", "xifqjzgxm", "cesutrgjupauut", "lw")) + .withProperties(new VolumeGroupProperties().withSourceVolumeGroupResourceId("mrfhirctymox") + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(5632238878555686719L) + .withIopsLimit(7211099122712031561L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT120H16M32S")) + .withFrequency(Duration.parse("PT89H37M26S")))); + model = BinaryData.fromObject(model).toObject(VolumeGroupInner.class); + Assertions.assertEquals("pqjlihhyusps", model.location()); + Assertions.assertEquals("dvlmfwdgzxul", model.tags().get("cvpa")); + Assertions.assertEquals("mrfhirctymox", model.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(5632238878555686719L, + model.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(7211099122712031561L, model.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT120H16M32S"), model.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT89H37M26S"), 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..8eeb13d618c3 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupListResultTests.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.implementation.models.VolumeGroupListResult; +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\":\"uljltduceamtmcz\",\"volumeGroupInternalId\":\"m\",\"sourceVolumeGroupResourceId\":\"wcw\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":8484446413664727337,\"iopsLimit\":9063413586675832676},\"protectionParameters\":{\"retention\":\"PT169H3M40S\",\"frequency\":\"PT218H8M47S\"},\"provisioningState\":\"Deleting\"},\"location\":\"kjprvk\",\"tags\":{\"ydbsd\":\"zqljyxgtczh\"},\"id\":\"hmkxmaehvbb\",\"name\":\"uripltfnhtba\",\"type\":\"kgxywr\"},{\"properties\":{\"storagePoolInternalId\":\"yklyhpluodpvruud\",\"volumeGroupInternalId\":\"zibt\",\"sourceVolumeGroupResourceId\":\"stgktst\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":4845849003671363565,\"iopsLimit\":5984900477114318975},\"protectionParameters\":{\"retention\":\"PT8H2M6S\",\"frequency\":\"PT234H7M48S\"},\"provisioningState\":\"Succeeded\"},\"location\":\"h\",\"tags\":{\"lkxt\":\"dqkdlwwqfbu\",\"fwsrtawcoezbrhu\":\"qjfsmlmbtxhw\",\"dyg\":\"skh\"},\"id\":\"ookk\",\"name\":\"fqjbvleo\",\"type\":\"fmluiqtqzfavyvn\"},{\"properties\":{\"storagePoolInternalId\":\"bar\",\"volumeGroupInternalId\":\"uayjkqa\",\"sourceVolumeGroupResourceId\":\"gzslesjcbhernnti\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":4357873187020820575,\"iopsLimit\":994473261476719427},\"protectionParameters\":{\"retention\":\"PT2H18M10S\",\"frequency\":\"PT139H6M55S\"},\"provisioningState\":\"Deleting\"},\"location\":\"gohbuffkmrq\",\"tags\":{\"acoebj\":\"vhmxtdrjfu\",\"guaadraufactkahz\":\"ewzcjznmwcp\",\"jjziuxxpsh\":\"v\"},\"id\":\"eekulfgslqubkwd\",\"name\":\"enr\",\"type\":\"sutujba\"}],\"nextLink\":\"juohminyflnorw\"}") + .toObject(VolumeGroupListResult.class); + Assertions.assertEquals("kjprvk", model.value().get(0).location()); + Assertions.assertEquals("zqljyxgtczh", model.value().get(0).tags().get("ydbsd")); + Assertions.assertEquals("wcw", model.value().get(0).properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(8484446413664727337L, + model.value().get(0).properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(9063413586675832676L, + model.value().get(0).properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT169H3M40S"), + model.value().get(0).properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT218H8M47S"), + model.value().get(0).properties().protectionParameters().frequency()); + Assertions.assertEquals("juohminyflnorw", model.nextLink()); + } +} 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..964d49f9f3e2 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupPropertiesTests.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.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 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\":\"oimwkslirc\",\"volumeGroupInternalId\":\"jxv\",\"sourceVolumeGroupResourceId\":\"fceacvlhvygd\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":2478564510622036028,\"iopsLimit\":8526636886938814175},\"protectionParameters\":{\"retention\":\"PT222H4M38S\",\"frequency\":\"PT198H47M11S\"},\"provisioningState\":\"Succeeded\"}") + .toObject(VolumeGroupProperties.class); + Assertions.assertEquals("fceacvlhvygd", model.sourceVolumeGroupResourceId()); + Assertions.assertEquals(2478564510622036028L, model.performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(8526636886938814175L, model.performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT222H4M38S"), model.protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT198H47M11S"), model.protectionParameters().frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupProperties model = new VolumeGroupProperties().withSourceVolumeGroupResourceId("fceacvlhvygd") + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(2478564510622036028L) + .withIopsLimit(8526636886938814175L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT222H4M38S")) + .withFrequency(Duration.parse("PT198H47M11S"))); + model = BinaryData.fromObject(model).toObject(VolumeGroupProperties.class); + Assertions.assertEquals("fceacvlhvygd", model.sourceVolumeGroupResourceId()); + Assertions.assertEquals(2478564510622036028L, model.performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(8526636886938814175L, model.performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT222H4M38S"), model.protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT198H47M11S"), model.protectionParameters().frequency()); + } +} 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..cea53dacb56d --- /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\":6052800431566278425,\"unique\":2436750194722502720,\"snapshots\":6966224071626794024,\"shared\":3105367851088822288},\"connectedHostCount\":914015459}") + .toObject(VolumeGroupStatusInner.class); + Assertions.assertEquals(6052800431566278425L, model.space().totalUsed()); + Assertions.assertEquals(2436750194722502720L, model.space().unique()); + Assertions.assertEquals(6966224071626794024L, model.space().snapshots()); + Assertions.assertEquals(3105367851088822288L, model.space().shared()); + Assertions.assertEquals(914015459, 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..3ab4c1487e5d --- /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\":8443985313013696238,\"iopsLimit\":4451851087565796629},\"protectionParameters\":{\"retention\":\"PT139H25M28S\",\"frequency\":\"PT13H58M24S\"}}") + .toObject(VolumeGroupUpdateProperties.class); + Assertions.assertEquals(8443985313013696238L, model.performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(4451851087565796629L, model.performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT139H25M28S"), model.protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT13H58M24S"), model.protectionParameters().frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupUpdateProperties model = new VolumeGroupUpdateProperties() + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(8443985313013696238L) + .withIopsLimit(4451851087565796629L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT139H25M28S")) + .withFrequency(Duration.parse("PT13H58M24S"))); + model = BinaryData.fromObject(model).toObject(VolumeGroupUpdateProperties.class); + Assertions.assertEquals(8443985313013696238L, model.performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(4451851087565796629L, model.performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT139H25M28S"), model.protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT13H58M24S"), 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..c01f67b952bc --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupUpdateTests.java @@ -0,0 +1,60 @@ +// 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\":{\"nrnrp\":\"mznbaeqphch\",\"bydvkhbejdz\":\"ehuwrykqgaifmvik\"},\"properties\":{\"performanceParameters\":{\"bandwidthLimitMbPerSec\":9195569848009574946,\"iopsLimit\":6667498634919390562},\"protectionParameters\":{\"retention\":\"PT180H2M30S\",\"frequency\":\"PT56H59M16S\"}}}") + .toObject(VolumeGroupUpdate.class); + Assertions.assertEquals("mznbaeqphch", model.tags().get("nrnrp")); + Assertions.assertEquals(9195569848009574946L, + model.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(6667498634919390562L, model.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT180H2M30S"), model.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT56H59M16S"), model.properties().protectionParameters().frequency()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeGroupUpdate model = new VolumeGroupUpdate() + .withTags(mapOf("nrnrp", "mznbaeqphch", "bydvkhbejdz", "ehuwrykqgaifmvik")) + .withProperties(new VolumeGroupUpdateProperties() + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(9195569848009574946L) + .withIopsLimit(6667498634919390562L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT180H2M30S")) + .withFrequency(Duration.parse("PT56H59M16S")))); + model = BinaryData.fromObject(model).toObject(VolumeGroupUpdate.class); + Assertions.assertEquals("mznbaeqphch", model.tags().get("nrnrp")); + Assertions.assertEquals(9195569848009574946L, + model.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(6667498634919390562L, model.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT180H2M30S"), model.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT56H59M16S"), 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..136cf6a794d3 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsCreateMockTests.java @@ -0,0 +1,73 @@ +// 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 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\":\"coi\",\"volumeGroupInternalId\":\"bxncnwfepbnw\",\"sourceVolumeGroupResourceId\":\"m\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":2756113830001887416,\"iopsLimit\":8272551243622322022},\"protectionParameters\":{\"retention\":\"PT121H54M55S\",\"frequency\":\"PT25H22M1S\"},\"provisioningState\":\"Succeeded\"},\"location\":\"snaquf\",\"tags\":{\"zeqyjleziun\":\"ctqhamzjrwdk\",\"eg\":\"xdfzantkw\",\"uooqjagmdit\":\"amlbnseqacjjvpil\"},\"id\":\"ueio\",\"name\":\"kjbsah\",\"type\":\"tdtpdelqacslmo\"}"; + + 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("ixjawrtm") + .withRegion("idttgepus") + .withExistingStoragePool("nszonwpngaj", "n") + .withTags(mapOf("uughtuqfecjxeyg", "jtcvuwkasizies", "cbuewmrswnjlxuz", "uhxu")) + .withProperties(new VolumeGroupProperties().withSourceVolumeGroupResourceId("khenlus") + .withPerformanceParameters(new PerformanceParameters().withBandwidthLimitMbPerSec(3187562872816518418L) + .withIopsLimit(5543480129250496386L)) + .withProtectionParameters(new ProtectionParameters().withRetention(Duration.parse("PT88H14M21S")) + .withFrequency(Duration.parse("PT228H18S")))) + .create(); + + Assertions.assertEquals("snaquf", response.location()); + Assertions.assertEquals("ctqhamzjrwdk", response.tags().get("zeqyjleziun")); + Assertions.assertEquals("m", response.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(2756113830001887416L, + response.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(8272551243622322022L, response.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT121H54M55S"), + response.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT25H22M1S"), 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..2a1860b7f2b7 --- /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\":8277471349386213590,\"unique\":2338140268331229797,\"snapshots\":7016664533046634570,\"shared\":340255574964569858},\"connectedHostCount\":713536788}"; + + 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("tefypococtfjgti", "rjvzuyt", "rmlmuowo", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(8277471349386213590L, response.space().totalUsed()); + Assertions.assertEquals(2338140268331229797L, response.space().unique()); + Assertions.assertEquals(7016664533046634570L, response.space().snapshots()); + Assertions.assertEquals(340255574964569858L, response.space().shared()); + Assertions.assertEquals(713536788, 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..220d0a6f2a28 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsGetWithResponseMockTests.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.VolumeGroup; +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\":\"ribi\",\"volumeGroupInternalId\":\"tgplucfota\",\"sourceVolumeGroupResourceId\":\"c\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":3529923026429367089,\"iopsLimit\":4628609097306866985},\"protectionParameters\":{\"retention\":\"PT138H37M\",\"frequency\":\"PT235H34M3S\"},\"provisioningState\":\"Canceled\"},\"location\":\"zqwmvt\",\"tags\":{\"pdkvg\":\"mxmcuqudtcvclxy\",\"ibuz\":\"abuiy\",\"xgjiuqh\":\"hdugneiknpg\"},\"id\":\"btozipqwje\",\"name\":\"mur\",\"type\":\"xxgewpk\"}"; + + 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("vsg", "wohqfzizvu", "mmkjsvthnwpztek", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("zqwmvt", response.location()); + Assertions.assertEquals("mxmcuqudtcvclxy", response.tags().get("pdkvg")); + Assertions.assertEquals("c", response.properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(3529923026429367089L, + response.properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(4628609097306866985L, response.properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT138H37M"), response.properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT235H34M3S"), + 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..ac832d0f9514 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListByStoragePoolMockTests.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.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 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\":\"loxoebqin\",\"volumeGroupInternalId\":\"pnwjfujq\",\"sourceVolumeGroupResourceId\":\"fcbahhp\",\"performanceParameters\":{\"bandwidthLimitMbPerSec\":3207483054269322394,\"iopsLimit\":3747105856881920185},\"protectionParameters\":{\"retention\":\"PT192H50M7S\",\"frequency\":\"PT16M26S\"},\"provisioningState\":\"Accepted\"},\"location\":\"kholvd\",\"tags\":{\"iukyefchnmna\":\"iauogphuartv\",\"xffi\":\"mnxhkxjqirwrweo\",\"rsnewmozqvbubqma\":\"hx\"},\"id\":\"hsycxhxzgaz\",\"name\":\"taboidvmf\",\"type\":\"hppubowsepdfgkmt\"}]}"; + + 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("vqylkmqpzoyhl", "bcg", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("kholvd", response.iterator().next().location()); + Assertions.assertEquals("iauogphuartv", response.iterator().next().tags().get("iukyefchnmna")); + Assertions.assertEquals("fcbahhp", response.iterator().next().properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals(3207483054269322394L, + response.iterator().next().properties().performanceParameters().bandwidthLimitMbPerSec()); + Assertions.assertEquals(3747105856881920185L, + response.iterator().next().properties().performanceParameters().iopsLimit()); + Assertions.assertEquals(Duration.parse("PT192H50M7S"), + response.iterator().next().properties().protectionParameters().retention()); + Assertions.assertEquals(Duration.parse("PT16M26S"), + 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..fc5646f9988a --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeGroupsListConnectionParametersWithResponseMockTests.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.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\":\"bkau\",\"port\":1897917187,\"iqn\":\"fshfph\"},{\"ip\":\"pnulaiywzej\",\"port\":1948173913,\"iqn\":\"hs\"},{\"ip\":\"wkojpllndnpd\",\"port\":1233897437,\"iqn\":\"pqafgfugsnnfhy\"}]}}"; + + 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("herngb", "c", "uahokq", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("bkau", response.iscsi().endpoints().get(0).ip()); + Assertions.assertEquals(1897917187, response.iscsi().endpoints().get(0).port()); + Assertions.assertEquals("fshfph", 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..3d0c322a06ab --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeInnerTests.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.core.util.BinaryData; +import com.azure.resourcemanager.purestorageblock.fluent.models.VolumeInner; +import com.azure.resourcemanager.purestorageblock.models.AzureVolumeProperties; +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\":3710084328619196753,\"unique\":1517216245064921581,\"snapshots\":4375368204973701545,\"shared\":8892495531853240884},\"provisionedSize\":4003459946037532227,\"serialNumber\":\"fgmblrrilbywdxsm\",\"createdAt\":\"2021-01-12T14:00:36Z\",\"sourceVolumeResourceId\":\"rwfscjfnynszquj\",\"sourceVolumeGroupResourceId\":\"dvoqyt\",\"provisioningState\":\"Canceled\"},\"id\":\"wb\",\"name\":\"lgy\",\"type\":\"vutpthjoxo\"}") + .toObject(VolumeInner.class); + Assertions.assertEquals(4003459946037532227L, model.properties().provisionedSize()); + Assertions.assertEquals("rwfscjfnynszquj", model.properties().sourceVolumeResourceId()); + Assertions.assertEquals("dvoqyt", model.properties().sourceVolumeGroupResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeInner model + = new VolumeInner().withProperties(new AzureVolumeProperties().withProvisionedSize(4003459946037532227L) + .withSourceVolumeResourceId("rwfscjfnynszquj") + .withSourceVolumeGroupResourceId("dvoqyt")); + model = BinaryData.fromObject(model).toObject(VolumeInner.class); + Assertions.assertEquals(4003459946037532227L, model.properties().provisionedSize()); + Assertions.assertEquals("rwfscjfnynszquj", model.properties().sourceVolumeResourceId()); + Assertions.assertEquals("dvoqyt", model.properties().sourceVolumeGroupResourceId()); + } +} 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..367f442cd6cd --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumeListResultTests.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.implementation.models.VolumeListResult; +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\":2838239073104354079,\"unique\":7578973114042008670,\"snapshots\":2756435310727991857,\"shared\":812888591965397352},\"provisionedSize\":4124544827733339549,\"serialNumber\":\"wzf\",\"createdAt\":\"2021-08-27T16:45:57Z\",\"sourceVolumeResourceId\":\"t\",\"sourceVolumeGroupResourceId\":\"lahb\",\"provisioningState\":\"Deleting\"},\"id\":\"xtgzukxitmmqtgqq\",\"name\":\"x\",\"type\":\"rnxrxcpj\"}],\"nextLink\":\"savokqdzf\"}") + .toObject(VolumeListResult.class); + Assertions.assertEquals(4124544827733339549L, model.value().get(0).properties().provisionedSize()); + Assertions.assertEquals("t", model.value().get(0).properties().sourceVolumeResourceId()); + Assertions.assertEquals("lahb", model.value().get(0).properties().sourceVolumeGroupResourceId()); + Assertions.assertEquals("savokqdzf", model.nextLink()); + } +} 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..c465a7e383fb --- /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\":7840356601497751767}").toObject(VolumeUpdateProperties.class); + Assertions.assertEquals(7840356601497751767L, model.provisionedSize()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeUpdateProperties model = new VolumeUpdateProperties().withProvisionedSize(7840356601497751767L); + model = BinaryData.fromObject(model).toObject(VolumeUpdateProperties.class); + Assertions.assertEquals(7840356601497751767L, 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..71918f14f3da --- /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\":4149594913386983887}}") + .toObject(VolumeUpdate.class); + Assertions.assertEquals(4149594913386983887L, model.properties().provisionedSize()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeUpdate model + = new VolumeUpdate().withProperties(new VolumeUpdateProperties().withProvisionedSize(4149594913386983887L)); + model = BinaryData.fromObject(model).toObject(VolumeUpdate.class); + Assertions.assertEquals(4149594913386983887L, 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..6c4ac6038316 --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesCreateMockTests.java @@ -0,0 +1,46 @@ +// 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 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\":4019415133317346863,\"unique\":2802654392668853799,\"snapshots\":126482280398130370,\"shared\":2216541675914214649},\"provisionedSize\":2745746767380408812,\"serialNumber\":\"eizjcpeogkhnmg\",\"createdAt\":\"2021-03-04T14:43:37Z\",\"sourceVolumeResourceId\":\"xddbhfhpfpaz\",\"sourceVolumeGroupResourceId\":\"oywjxhpdulont\",\"provisioningState\":\"Succeeded\"},\"id\":\"qwtehtuevr\",\"name\":\"rljyoogwxhnsdu\",\"type\":\"gwbsreurf\"}"; + + 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("szizoyuelyetndnb") + .withExistingVolumeGroup("lwntsjgqrs", "y", "ruuuybnch") + .withProperties(new AzureVolumeProperties().withProvisionedSize(6306001604361954536L) + .withSourceVolumeResourceId("hkpigqfusuckzmkw") + .withSourceVolumeGroupResourceId("snoxaxmqeqa")) + .create(); + + Assertions.assertEquals(2745746767380408812L, response.properties().provisionedSize()); + Assertions.assertEquals("xddbhfhpfpaz", response.properties().sourceVolumeResourceId()); + Assertions.assertEquals("oywjxhpdulont", response.properties().sourceVolumeGroupResourceId()); + } +} 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..642378a24acf --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesGetWithResponseMockTests.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.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 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\":2115399404569016391,\"unique\":5507533803137155051,\"snapshots\":8857231861651524068,\"shared\":4251807303057644449},\"provisionedSize\":4495626237459310184,\"serialNumber\":\"m\",\"createdAt\":\"2021-08-22T13:20:48Z\",\"sourceVolumeResourceId\":\"u\",\"sourceVolumeGroupResourceId\":\"lkyqltqsrog\",\"provisioningState\":\"Deleting\"},\"id\":\"ffdjktsysidfvclg\",\"name\":\"xnfuijtkbusqogs\",\"type\":\"ikayiansharuj\"}"; + + 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("oebn", "xofvcjk", "dirazf", "xejw", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(4495626237459310184L, response.properties().provisionedSize()); + Assertions.assertEquals("u", response.properties().sourceVolumeResourceId()); + Assertions.assertEquals("lkyqltqsrog", response.properties().sourceVolumeGroupResourceId()); + } +} 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..1cd39a8806ec --- /dev/null +++ b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/src/test/java/com/azure/resourcemanager/purestorageblock/generated/VolumesListByVolumeGroupMockTests.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.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 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\":6130586229705056651,\"unique\":5057300681887067424,\"snapshots\":3737188129159271188,\"shared\":599437381235397754},\"provisionedSize\":9106557899505537051,\"serialNumber\":\"gbqe\",\"createdAt\":\"2021-08-10T09:47:34Z\",\"sourceVolumeResourceId\":\"ewvnqvcdlgu\",\"sourceVolumeGroupResourceId\":\"cmfdjwnlax\",\"provisioningState\":\"Accepted\"},\"id\":\"qikczvvita\",\"name\":\"gx\",\"type\":\"fcsserxhtvsox\"}]}"; + + 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("ji", "xfz", "j", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(9106557899505537051L, response.iterator().next().properties().provisionedSize()); + Assertions.assertEquals("ewvnqvcdlgu", response.iterator().next().properties().sourceVolumeResourceId()); + Assertions.assertEquals("cmfdjwnlax", response.iterator().next().properties().sourceVolumeGroupResourceId()); + } +} diff --git a/sdk/purestorageblock/azure-resourcemanager-purestorageblock/tsp-location.yaml b/sdk/purestorageblock/azure-resourcemanager-purestorageblock/tsp-location.yaml index 064951af79b6..04eae87dd6e5 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: ced46686079690b9f9116cc03fac68f8afe4d1af repo: Azure/azure-rest-api-specs additionalDirectories: